Surface Class Reference

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

Inheritance

Entity
GeomEntity
Body Volume Surface Curve Vertex

Public Member Functions

void
color( int value)
Set the color of the surface.

void
set_color( int value)
Set the color of the surface.

int
color()
Get the color of the surface.

std::vector< std::vector< Curve > >
ordered_loops()
Get the ordered loops of the Surface.

std::array< double, 3 >
normal_at( std::array< double, 3 > location)
Get the normal at a particular point on the Surface.

std::array< double, 3 >
closest_point_trimmed( std::array< double, 3 > location)
Get the nearest point on the Surface to point specified.
std::array< double, 3 >
closest_point_along_vector( std::array< double, 3 > location, std::array< double, 3 > along_vector)
Get the nearest point on the Surface to point specified along the specified vector.

std::array< double, 3 >
closest_point_trimmed( CubitInterface::Loc location)
Get the nearest point on the Surface to point specified.

int
point_containment( std::array< double, 3 > point_in)
Get whether a point is on or off of the Surface.

std::array< double, 2 >
principal_curvatures( std::array< double, 3 > point)
Get the principal curvatures of the Surface.

std::array< double, 3 >
position_from_u_v( double u, double v)
Get the Cartesian coordinates from the uv coordinates on the Surface.

std::array< double, 2 >
u_v_from_position( std::array< double, 3 > location)
Get the uv coordinates from the supplied Cartesian coordinates on the Surface.

std::array< double, 2 >
get_param_range_U()
Get range of u for the Surface.

std::array< double, 2 >
get_param_range_V()
Get range of v for the Surface.

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

Surface()

~Surface()

Surface( const Surface & other)

Surface( CubitEntity * entity_ptr)

Detailed Description

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

Member Function Documentation

double area()
    Returns The area of the Surface
    std::array< double, 3 > closest_point_along_vector(
    • std::array< double, 3 > location,
    • std::array< double, 3 > along_vector)
    Parameters
    • [in] location
      A vector containing three values that are the coordinates of a point
    Returns A vector (or list) of doubles representing values of nearest point as follows:
    0 - x coordinate
    1 - y coordinate
    2 - z coordinate
    std::array< double, 3 > closest_point_trimmed(
    Parameters
    • [in] location
      A vector containing three values that are the coordinates of a point
    Returns A vector (or list) of doubles representing values of nearest point as follows:
    0 - x coordinate
    1 - y coordinate
    2 - z coordinate
    std::array< double, 3 > closest_point_trimmed(
    • std::array< double, 3 > location)
    Parameters
    • [in] location
      A vector containing three values that are the coordinates of a point
    Returns A vector (or list) of doubles representing values of nearest point as follows:
    0 - x coordinate
    1 - y coordinate
    2 - z coordinate
    int color()
      Returns The color value associated with the surface's current color
      void color(
      • int value)
      Parameters
      • [in] value
        The color value that the surface will have
      std::array< double, 2 > get_param_range_U()
        Returns The curvature values:
        0 - The lowest value in the u direction
        1 - The highest value in the u direction
        std::array< double, 2 > get_param_range_V()
          Returns The curvature values:
          0 - The lowest value in the v direction
          1 - The highest value in the v direction
          bool is_cylindrical()
            Returns Whether the Surface is cylindrical or not
            bool is_planar()
              Returns Whether the Surface is planar or not
              std::array< double, 3 > normal_at(
              • std::array< double, 3 > location)
              Parameters
              • [in] location
                A vector containing three values that are the coordinates of a point
              Returns A vector (or list) of doubles representing values of normal vector as follows:
              0 - x value
              1 - y value
              2 - z value
              std::vector< std::vector< Curve > > 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...
                int point_containment(
                • std::array< double, 3 > point_in)
                Parameters
                • [in] point_in
                  A vector containing three values that are the coordinates of a point
                Returns A python boolean representing whether the point is off (0) or on (1) the Surface
                std::array< double, 3 > position_from_u_v(
                • double u,
                • double v)
                Parameters
                • [in] u
                  The u parameter
                • [in] v
                  The v parameter
                Returns The Cartesian coordinates of the supplied uv coordinates as a vector:
                0 - x coordinate
                1 - y coordinate
                2 - z coordinate
                std::array< double, 2 > principal_curvatures(
                • std::array< double, 3 > point)
                Parameters
                • [in] point
                  A vector containing three values that are the coordinates of a point
                Returns A list of two floats representing the curvatures
                0 - curvature 1
                1 - curvature 2
                void set_color(
                • int value)
                Parameters
                • [in] value
                  The color value that the surface will have
                std::array< double, 2 > u_v_from_position(
                • std::array< double, 3 > location)
                Parameters
                • [in] location
                  A vector containing the Cartesian coordinates
                Returns The curvature values:
                0 - The u parameter
                1 - The v parameter