Surface

Defines a surface object that mostly parallels Cubit's RefFace class.

Inheritance

PyObservable
Entity
GeomEntity
Surface

Class Member Functions

  color Set the color of the surface.
int color Get the color of the surface.
[[Curve]] ordered_loops Get the ordered loops of the Surface.
[ float ] normal_at Get the normal at a particular point on the Surface.
[ float ] closest_point_trimmed Get the nearest point on the Surface to point specified.
[ float ] closest_point_trimmed Get the nearest point on the Surface to point specified.
int point_containment Get whether a point is on or off of the Surface.
[ float ] principal_curvatures Get the principal curvatures of the Surface.
[ float ] position_from_u_v Get the Cartesian coordinates from the uv coordinates on the Surface.
[ float ] u_v_from_position Get the uv coordinates from the supplied Cartesian coordinates on the Surface.
[ float ] get_param_range_U Get range of u for the Surface.
[ float ] get_param_range_V Get range of v for the Surface.
float area Get area of the Surface.
Bool is_planar Get whether the Surface is planar or not.
Bool is_cylindrical Get whether the Surface is cylindrical or not.

Member Function Documentation


color(value)

Set the color of the surface.

Example

 surface.color(0)

Parameters

value The color value that the surface will have

int color()

Get the color of the surface.

Example

 col = surface.color()

Return

The color value associated with the surface's current color


[[Curve]] ordered_loops()

Get the ordered loops of the Surface.

Example

 loops = surface.ordered_loops()

Return

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...


[ float ] normal_at(location)

Get the normal at a particular point on the Surface.

Example

 norm = surface.normal_at([0,0,0])

Parameters

location A vector containing three values that are the coordinates of a point

Return

A vector (or list) of doubles representing values of normal vector as follows: 0 - x value 1 - y value 2 - z value


[ float ] closest_point_trimmed(location)

Get the nearest point on the Surface to point specified.

Example

 nearest = surface.closest_point_trimmed([0,0,0])

Parameters

location A vector containing three values that are the coordinates of a point

Return

A vector (or list) of doubles representing values of nearest point as follows: 0 - x coordinate 1 - y coordinate 2 - z coordinate


[ float ] closest_point_trimmed(location)

Get the nearest point on the Surface to point specified.

Example

 nearest = surface.closest_point_trimmed([0,0,0])

Parameters

location A vector containing three values that are the coordinates of a point

Return

A vector (or list) of doubles representing values of nearest point as follows: 0 - x coordinate 1 - y coordinate 2 - z coordinate


int point_containment(point_in)

Get whether a point is on or off of the Surface.

Example

 on_off = surface.point_containment([0,0,0])

Parameters

point_in A vector containing three values that are the coordinates of a point

Return

A python boolean representing whether the point is off (0) or on (1) the Surface


[ float ] principal_curvatures(point)

Get the principal curvatures of the Surface.

Example

 curvatures = surface.principal_curvatures([0,0,0])

Parameters

point A vector containing three values that are the coordinates of a point

Return

A list of two floats representing the curvatures 0 - curvature 1 1 - curvature 2


[ float ] position_from_u_v(u, v)

Get the Cartesian coordinates from the uv coordinates on the Surface.

Example

 pos = surface.position_from_u_v(0, 0)

Parameters

u The u parameter
v The v parameter

Return

The Cartesian coordinates of the supplied uv coordinates as a vector: 0 - x coordinate 1 - y coordinate 2 - z coordinate


[ float ] u_v_from_position(location)

Get the uv coordinates from the supplied Cartesian coordinates on the Surface.

Example

 uv = surface.position_from_u_v([0,0,0])

Parameters

location A vector containing the Cartesian coordinates

Return

The curvature values: 0 - The u parameter 1 - The v parameter


[ float ] get_param_range_U()

Get range of u for the Surface.

Example

 bounds = surface.get_param_range_U()

Return

The curvature values: 0 - The lowest value in the u direction 1 - The highest value in the u direction


[ float ] get_param_range_V()

Get range of v for the Surface.

Example

 lower_bound, upper_bound = surface.get_param_range_V()

Return

The curvature values: 0 - The lowest value in the v direction 1 - The highest value in the v direction


float area()

Get area of the Surface.

Example

 area = surface.area()

Return

The area of the Surface


Bool is_planar()

Get whether the Surface is planar or not.

Example

 planar = surface.is_planar()

Return

Whether the Surfaceis planar or not


Bool is_cylindrical()

Get whether the Surface is cylindrical or not.

Example

 cyl = surface.is_cylindrical()

Return

Whether the Surfaceis cylindrical or not