11.8 Surface
Defines a surface object that mostly parallels Cubit’s RefFace class. More...
#include <CubitInterfaceEx.hpp>
11.8.1 Inheritance diagram for Surface:

|
|
| |
|
|
| |
|
|
| |
| |
|
|
| |
|
|
| |
|
|
| |
|
|
| |
|
|
|
|
|
|
| |
|
|
| |
| |
| |
|
|
|
|
| |
|
|
| |
| |
| |
Defines a surface object that mostly parallels Cubit’s RefFace class.
Member Function Documentation
area()
double area ( )
Returns:
The area of the Surface
closest_point_along_vector()
std::array<double,3> closest_point_along_vector ( std::array< double, 3 > location, std::array< double, 3 > along_vector )
std::array<double,3> point(3, 0); |
std::array<double,3> along_vector{1,1,1}; |
std::array<double,3> nearest = surface->closest_point_trimmed(point); |
nearest = surface.closest_point_along_vector([0,0,0], [1,1,1]) |
|
|
|
Returns:
A vector (or list) of doubles representing values of nearest point as follows:
0 - x coordinate
1 - y coordinate
2 - z coordinate
closest_point_trimmed() [1/2]
std::array<double,3> closest_point_trimmed ( CubitInterface::Loc location)
std::array<double,3> point(3, 0); |
std::array<double,3> nearest = surface->closest_point_trimmed(point); |
nearest = surface.closest_point_trimmed([0,0,0]) |
|
|
|
Returns:
A vector (or list) of doubles representing values of nearest point as follows:
0 - x coordinate
1 - y coordinate
2 - z coordinate
closest_point_trimmed() [2/2]
std::array<double,3> closest_point_trimmed ( std::array< double, 3 > location)
std::array<double,3> point(3, 0); |
std::array<double,3> nearest = surface->closest_point_trimmed(point); |
nearest = surface.closest_point_trimmed([0,0,0]) |
|
|
|
Returns:
A vector (or list) of doubles representing values of nearest point as follows:
0 - x coordinate
1 - y coordinate
2 - z coordinate
color() [1/2]
int color ( )
Returns:
The color value associated with the surface’s current color
color() [2/2]
void color ( int value)
|
|
|
double dihedral_angle ( Surface other, double fraction )
Get the dihedral angle between this surface and another surface at a fraction along the shared curve between them.
|
|
|
|
Returns:
the dihedral angle between the surfaces, in radians
get_param_range_U()
std::array<double,2> get_param_range_U ( )
std::vector<double> bounds = surface->get_param_range_U(); |
bounds = surface.get_param_range_U() |
Returns:
The curvature values:
0 - The lowest value in the u direction
1 - The highest value in the u direction
get_param_range_V()
std::array<double,2> get_param_range_V ( )
std::vector<double> bounds = surface->get_param_range_V(); |
lower_bound, upper_bound = surface.get_param_range_V() |
Returns:
The curvature values:
0 - The lowest value in the v direction
1 - The highest value in the v direction
is_cylindrical()
bool is_cylindrical ( )
bool cyl = surface->is_cylindrical(); |
cyl = surface.is_cylindrical() |
Returns:
Whether the Surface is cylindrical or not
is_planar()
bool is_planar ( )
Returns:
Whether the Surface is planar or not
normal_at()
std::array<double,3> normal_at ( std::array< double, 3 > location)
|
|
|
Returns:
A vector (or list) of doubles representing values of normal vector as follows:
0 - x value
1 - y value
2 - z value
ordered_loops()
std::vector<std::vector<Curve> > ordered_loops ( )
std::vector<std::vector<Curve> > loops = surface->ordered_loops(); |
loops = surface.ordered_loops() |
Returns:
A vector of vectors (or list of lists) of Curves in loops:
0, 0 - loop 1 curve 1
0, 1 - loop 1 curve 2
1, 0 - loop 2 curve 1
etc...
point_containment()
int point_containment ( std::array< double, 3 > point_in)
std::array<double,3> point(3, 0); |
int on_off = surface->point_containment(point); |
on_off = surface.point_containment([0,0,0]) |
|
|
|
Returns:
A python boolean representing whether the point is off (0) or on (1) the Surface
position_from_u_v()
std::array<double,3> position_from_u_v ( double u, double v )
std::vector<double> pos = surface->position_from_u_v(0, 0); |
pos = surface.position_from_u_v(0, 0) |
|
|
|
|
|
|
Returns:
The Cartesian coordinates of the supplied uv coordinates as a vector:
0 - x coordinate
1 - y coordinate
2 - z coordinate
principal_curvatures()
std::array<double,2> principal_curvatures ( std::array< double, 3 > point)
std::vector<double> point(3, 0); |
std::vector<double> curvatures = surface->principal_curvatures(point); |
curvatures = surface.principal_curvatures([0,0,0]) |
|
|
|
Returns:
A list of two floats representing the curvatures
0 - curvature 1
1 - curvature 2
set_color()
void set_color ( int value)
|
|
|
std::array<double,2> u_v_from_position ( std::array< double, 3 > location)
std::vector<double> location(3, 0); |
std::vector<double> uv = surface->u_v_from_position(location); |
uv = surface.position_from_u_v([0,0,0]) |
|
|
|
Returns:
The curvature values:
0 - The u parameter
1 - The v parameter