Cubit Python API  17.05
Public Member Functions
Surface

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

Inheritance diagram for Surface:
GeomEntity Entity

Public Member Functions

def  area (self)
  Get area of the Surface. More...
 
def  closest_point_along_vector (self, location, along_vector)
  Get the nearest point on the Surface to point specified along the specified vector. More...
 
def  closest_point_trimmed (self, location)
  Get the nearest point on the Surface to point specified. More...
 
def  color (self)
  Get the color of the surface. More...
 
def  get_param_range_U (self)
  Get range of u for the Surface. More...
 
def  get_param_range_V (self)
  Get range of v for the Surface. More...
 
def  is_cylindrical (self)
  Get whether the Surface is cylindrical or not. More...
 
def  is_planar (self)
  Get whether the Surface is planar or not. More...
 
def  normal_at (self, location)
  Get the normal at a particular point on the Surface. More...
 
def  ordered_loops (self)
  Get the ordered loops of the Surface. More...
 
def  point_containment (self, point_in)
  Get whether a point is on or off of the Surface. More...
 
def  position_from_u_v (self, u, v)
  Get the Cartesian coordinates from the uv coordinates on the Surface. More...
 
def  principal_curvatures (self, point)
  Get the principal curvatures of the Surface. More...
 
def  set_color (self, value)
  Set the color of the surface. More...
 
def  u_v_from_position (self, location)
  Get the uv coordinates from the supplied Cartesian coordinates on the Surface. More...
 
- Public Member Functions inherited from GeomEntity
def  bodies (self)
  Retrieve bodies contained within the geometry entity. More...
 
def  curves (self)
  Retrieve curves (edges) associated with the geometry entity. More...
 
def  dimension (self)
  Get the topological dimension of the geometry entity. More...
 
def  entity_name (self)
  Retrieve the primary name of the geometry entity. More...
 
def  entity_names (self)
  Retrieve all names assigned to the geometry entity. More...
 
def  is_meshed (self)
  Returns the current mesh state of the GeomEntity. More...
 
def  is_transparent (self)
  Get the transparency state of the geometry entity. More...
 
def  is_visible (self)
  Get the visibility state of the geometry entity. More...
 
def  mesh (self)
  Generates mesh on a GeomEntity and verifies meshing status. More...
 
def  num_names (self)
  Get the count of names assigned to the geometry entity. More...
 
def  remove_entity_name (self, name)
  Remove a specific name from the geometry entity. More...
 
def  remove_entity_names (self)
  Remove all non-default names from the geometry entity. More...
 
def  remove_mesh (self)
  Remove any mesh associated with the geometry entity. More...
 
def  set_entity_name (self, name)
  Assign a name to the geometry entity. More...
 
def  set_transparent (self, transparency_flag)
  Set the transparency state of the geometry entity. More...
 
def  set_visible (self, visibility_flag)
  Set and verify the visibility state of the geometry entity. More...
 
def  smooth (self)
  Smooths the mesh on a GeomEntity to improve element quality. More...
 
def  surfaces (self)
  Retrieve surfaces associated with the geometry entity. More...
 
def  vertices (self)
  Retrieve vertices (points) associated with the geometry entity. More...
 
def  volumes (self)
  Retrieve volumes associated with the geometry entity. More...
 
- Public Member Functions inherited from Entity
def  bounding_box (self)
  Returns the axis-aligned bounding box of the Entity. More...
 
def  center_point (self)
  Returns the geometric center point of the Entity. More...
 
def  id (self)
  Retrieves the unique identifier of the Entity. More...
 

Detailed Description

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

Member Function Documentation

◆ area()

def area (   self )

Get area of the Surface .

.. code-block:: python

area = surface.area()
   @n return type of :  float
Returns
The area of the Surface.

◆ closest_point_along_vector()

def closest_point_along_vector (   self,
  location,
  along_vector 
)

Get the nearest point on the Surface to point specified along the specified vector.

.. code-block:: python

nearest = surface.closest_point_along_vector([0,0,0], [1,1,1])
     @n type of location:  std::array< double,3 >, in
Parameters
location A vector containing three values that are the coordinates of a point.
return type of : std:: array< double,3 >
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()

def closest_point_trimmed (   self,
  location 
)

Get the nearest point on the Surface to point specified.

.. code-block:: python

nearest = surface.closest_point_trimmed([0,0,0])
     @n type of location:  std::array< double,3 >, in
Parameters
location A vector containing three values that are the coordinates of a point.
return type of : std:: array< double,3 >
Returns
A vector (or list) of doubles representing values of nearest point as follows:
0 x coordinate
1 y coordinate
2 z coordinate

◆ color()

def color (   self )

Get the color of the surface.

.. code-block:: python

col = surface.color()
   @n return type of : std:: array< double,4 >
Returns
The color value associated with the surface's current color.

◆ get_param_range_U()

def get_param_range_U (   self )

Get range of u for the Surface .

.. code-block:: python

bounds = surface.get_param_range_U()
         @n return type of : std:: array< double,2 >
Returns
The curvature values:
0 The lowest value in the u direction
1 The highest value in the u direction

◆ get_param_range_V()

def get_param_range_V (   self )

Get range of v for the Surface .

.. code-block:: python

lower_bound, upper_bound = surface.get_param_range_V()
         @n return type of : std:: array< double,2 >
Returns
The curvature values:
0 The lowest value in the v direction
1 The highest value in the v direction

◆ is_cylindrical()

def is_cylindrical (   self )

Get whether the Surface is cylindrical or not.

.. code-block:: python

cyl = surface.is_cylindrical()
   @n return type of :  boolean
Returns
Whether the Surface is cylindrical or not.

◆ is_planar()

def is_planar (   self )

Get whether the Surface is planar or not.

.. code-block:: python

planar = surface.is_planar()
   @n return type of :  boolean
Returns
Whether the Surface is planar or not.

◆ normal_at()

def normal_at (   self,
  location 
)

Get the normal at a particular point on the Surface .

.. code-block:: python

norm = surface.normal_at([0,0,0])
     @n type of location:  std::array< double,3 >, in
Parameters
location A vector containing three values that are the coordinates of a point.
return type of : std:: array< double,3 >
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()

def ordered_loops (   self )

Get the ordered loops of the Surface .

.. code-block:: python

loops = surface.ordered_loops()
     @n return type of : std::vector< std::vector< CubitInterface::Curve,std::allocator< CubitInterface::Curve > >,std::allocator< std::vector< CubitInterface::Curve,std::allocator< CubitInterface:: Curve > > > >
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

Returns
etc...

◆ point_containment()

def point_containment (   self,
  point_in 
)

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

.. code-block:: python

on_off = surface.point_containment([0,0,0])
   @n type of point_in:  std::array< double,3 >, in
Parameters
point_in A vector containing three values that are the coordinates of a point.
return type of : int
Returns
A python boolean representing whether the point is off (0) or on (1) the Surface.

◆ position_from_u_v()

def position_from_u_v (   self,
  u,
  v 
)

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

.. code-block:: python

pos = surface.position_from_u_v(0, 0)
     @n type of u:  float, in
Parameters
u The u parameter
type of v: float, in
v The v parameter
return type of : std:: array< double,3 >
Returns
The Cartesian coordinates of the supplied uv coordinates as a vector:
0 x coordinate
1 y coordinate
2 z coordinate

◆ principal_curvatures()

def principal_curvatures (   self,
  point 
)

Get the principal curvatures of the Surface .

.. code-block:: python

curvatures = surface.principal_curvatures([0,0,0])
     @n type of point:  std::array< double,3 >, in
Parameters
point A tuple containing 2 values that are the curvature in the principle u and v directions on the surface
return type of : std:: array< double,2 >
Returns
A list of two floats representing the curvatures.
0 curvature 1
1 curvature 2

◆ set_color()

def set_color (   self,
  value 
)

Set the color of the surface.

.. code-block:: python

surface.set_color(0)
   @n type of value:  std::array< double,4 >, in
Parameters
value The color value that the surface will have.

◆ u_v_from_position()

def u_v_from_position (   self,
  location 
)

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

.. code-block:: python

uv = surface.position_from_u_v([0,0,0])
     @n type of location:  std::array< double,3 >, in
Parameters
location A vector containing the Cartesian coordinates.
return type of : std:: array< double,2 >
Returns
The curvature values:
0 The u parameter
1 The v parameter