|
Cubit Python API 2026.6
|
Defines a curve object that mostly parallels Cubit's RefEdge class. More...
Public Member Functions | |
| arc_center_radius (self) | |
| Get the center and radius of an arc curve, otherwise returns 0 for non-arc. | |
| closest_point (self, point) | |
| Get the curvature of the Curve at a particular point. | |
| closest_point_along_vector (self, location, along_vector) | |
| Get the nearest point on the Curve to point specified along the specified vector. | |
| closest_point_trimmed (self, point) | |
| Get the closest location on the Curve from a particular point. | |
| color (self) | |
| Get the color of the Curve. | |
| curvature (self, point) | |
| Get the curvature of the Curve at a particular point. | |
| curve_center (self) | |
| Get the center point of the Curve. | |
| dihedral_angle (self, other, common_surface) | |
| Get the dihedral angle between this curve and another curve relate to the given surface. | |
| end_param (self) | |
| Get the highest value of the Curve in uv space. | |
| fraction_from_arc_length (self, root_vertex, length) | |
| Get the fraction along the Curve a specified arc length is away from a given Vertex. | |
| is_periodic (self) | |
| Get whether the Curve is periodic or not. | |
| length (self) | |
| Get the length of the Curve. | |
| length_from_u (self, parameter1, parameter2) | |
| Get the length between two specified parameters on a Curve. | |
| point_from_arc_length (self, root_param, arc_length) | |
| Get the position on a Curve that is a specified arc length away from the specified root parameter. | |
| position_from_fraction (self, fraction_along_curve) | |
| Get the position of the point a specified fraction along the Curve. | |
| position_from_u (self, u_value) | |
| Get the position of a particular u value for the Curve. | |
| set_color (self, value) | |
| Set the color of the Curve. | |
| spline_params (self) | |
| Retrieve the full set of spline parameters for this curve. | |
| start_param (self) | |
| Get the lowest value of the Curve in uv space. | |
| tangent (self, point) | |
| Get the tangent to the Curve at a particular point. | |
| u_from_arc_length (self, root_param, arc_length) | |
| Get the u value for a point a specified arc length away from a specified root parameter on the Curve. | |
| u_from_position (self, position) | |
| Get the u value of a particular position on the Curve. | |
Public Member Functions inherited from GeomEntity | |
| bodies (self) | |
| Retrieve bodies contained within the geometry entity. | |
| curves (self) | |
| Retrieve curves (edges) associated with the geometry entity. | |
| dimension (self) | |
| Get the topological dimension of the geometry entity. | |
| entity_name (self) | |
| Retrieve the primary name of the geometry entity. | |
| entity_names (self) | |
| Retrieve all names assigned to the geometry entity. | |
| is_meshed (self) | |
| Returns the current mesh state of the GeomEntity. | |
| is_transparent (self) | |
| Get the transparency state of the geometry entity. | |
| is_visible (self) | |
| Get the visibility state of the geometry entity. | |
| mesh (self) | |
| Generates mesh on a GeomEntity and verifies meshing status. | |
| num_names (self) | |
| Get the count of names assigned to the geometry entity. | |
| remove_entity_name (self, name) | |
| Remove a specific name from the geometry entity. | |
| remove_entity_names (self) | |
| Remove all non-default names from the geometry entity. | |
| remove_mesh (self) | |
| Remove any mesh associated with the geometry entity. | |
| set_entity_name (self, name) | |
| Assign a name to the geometry entity. | |
| set_transparent (self, transparency_flag) | |
| Set the transparency state of the geometry entity. | |
| set_visible (self, visibility_flag) | |
| Set and verify the visibility state of the geometry entity. | |
| smooth (self) | |
| Smooths the mesh on a GeomEntity to improve element quality. | |
| surfaces (self) | |
| Retrieve surfaces associated with the geometry entity. | |
| vertices (self) | |
| Retrieve vertices (points) associated with the geometry entity. | |
| volumes (self) | |
| Retrieve volumes associated with the geometry entity. | |
Public Member Functions inherited from Entity | |
| bounding_box (self) | |
| Returns the axis-aligned bounding box of the Entity. | |
| center_point (self) | |
| Returns the geometric center point of the Entity. | |
| id (self) | |
| Retrieves the unique identifier of the Entity. | |
Detailed Description
Defines a curve object that mostly parallels Cubit's RefEdge class.
Member Function Documentation
◆ arc_center_radius()
| arc_center_radius | ( | self | ) |
Get the center and radius of an arc curve, otherwise returns 0 for non-arc.
.. code-block:: python
@n return type of : std:: array< double,4 >
- Returns
- A vector containing the coordinates of the Curve's center according to the following:
- 0 x coordinate
- 1 y coordinate
- 2 z coordinate
- 3 radius
◆ closest_point()
| closest_point | ( | self, | |
| point ) |
Get the curvature of the Curve at a particular point.
.. code-block:: python
@n type of point: std::array< double,3 >, in
- Parameters
-
point A vector containing 3 doubles representing coordinates of a location on the Curve.
return type of : std:: array< double,3 >
- Returns
- The closest point to the Curve from the location specified.
◆ closest_point_along_vector()
| closest_point_along_vector | ( | self, | |
| location, | |||
| along_vector ) |
Get the nearest point on the Curve to point specified along the specified vector.
.. code-block:: python
@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::pair< bool,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()
| closest_point_trimmed | ( | self, | |
| point ) |
Get the closest location on the Curve from a particular point.
.. code-block:: python
@n type of point: std::array< double,3 >, in
- Parameters
-
point A vector containing 3 doubles representing coordinates of a location on the Curve.
return type of : std:: array< double,3 >
- Returns
- The closest point to the Curve from the location specified
◆ color()
| color | ( | self | ) |
Get the color of the Curve.
.. code-block:: python
@n return type of : std:: array< double,4 >
- Returns
- The color value associated with the curve's current color.
◆ curvature()
| curvature | ( | self, | |
| point ) |
Get the curvature of the Curve at a particular point.
.. code-block:: python
@n type of point: std::array< double,3 >, in
- Parameters
-
point A curvature vector containing 3 doubles. This is related to the 2nd derivative of the curve.
return type of : std:: array< double,3 >
- Returns
- The curvature of the Curve at the location specified
◆ curve_center()
| curve_center | ( | self | ) |
◆ dihedral_angle()
| dihedral_angle | ( | self, | |
| other, | |||
| common_surface ) |
Get the dihedral angle between this curve and another curve relate to the given surface.
:type other: :py:class:Curve
- Parameters
-
other The other curve object that forms a dihedral angle with this one. :type common_surface: :py:class: Surfacecommon_surface Surface object that contains both curves. :rtype: float
- Returns
- the dihedral angle between the curves, in radians
◆ end_param()
| end_param | ( | self | ) |
Get the highest value of the Curve in uv space.
.. code-block:: python
@n return type of : float
- Returns
- The ending value of the parameter.
◆ fraction_from_arc_length()
| fraction_from_arc_length | ( | self, | |
| root_vertex, | |||
| length ) |
Get the fraction along the Curve a specified arc length is away from a given Vertex.
.. code-block:: python
@n type of root_vertex: :py:class:`Vertex`, in
◆ is_periodic()
| is_periodic | ( | self | ) |
◆ length()
| length | ( | self | ) |
◆ length_from_u()
| length_from_u | ( | self, | |
| parameter1, | |||
| parameter2 ) |
Get the length between two specified parameters on a Curve.
.. code-block:: python
@n type of parameter1: float, in
- Parameters
-
parameter1 The beginning parameter.
type of parameter2: float, inparameter2 The ending parameter.
return type of : float
- Returns
- The length between the two specified paramters along the Curve.
◆ point_from_arc_length()
| point_from_arc_length | ( | self, | |
| root_param, | |||
| arc_length ) |
Get the position on a Curve that is a specified arc length away from the specified root parameter.
.. code-block:: python
@n type of root_param: float, in
- Parameters
-
root_param The root parameter from which the arc length is added to.
type of arc_length: float, inarc_length The arc length along the Curve away from the root parameter.
return type of : std:: array< double,3 >
- Returns
- A vector that contains the coordinates of a position a specified arc length away from the root parameter.
◆ position_from_fraction()
| position_from_fraction | ( | self, | |
| fraction_along_curve ) |
Get the position of the point a specified fraction along the Curve.
.. code-block:: python
@n type of fraction_along_curve: float, in
- Parameters
-
fraction_along_curve A decimal value between 0 and 1 to determine a particular position along the Curve.
return type of : std:: array< double,3 >
- Returns
- A vector containing the coordinates of the position a specified fraction along the Curve:
- 0 x coordinate
- 1 y coordinate
- 2 z coordinate
◆ position_from_u()
| position_from_u | ( | self, | |
| u_value ) |
Get the position of a particular u value for the Curve.
.. code-block:: python
@n type of u_value: float, in
- Parameters
-
u_value The u value of the position along the Curve.
return type of : std:: array< double,3 >
- Returns
- A vector containing the coordinates of the output position
◆ set_color()
| set_color | ( | self, | |
| value ) |
Set the color of the Curve.
.. code-block:: python
@n type of value: std::array< double,4 >, in
- Parameters
-
value The color value that the curve will have.
◆ spline_params()
| spline_params | ( | self | ) |
Retrieve the full set of spline parameters for this curve.
This method wraps the underlying geometry engine's spline-parameter routine (e.g., ACIS), extracting control point positions, weights, and knot data into a uniform flat vector. It throws InvalidEntityException for invalid entities and reports failure on non-spline curves.
- Let
- N = number of control points, M = number of weights, D = polynomial degree, K = number of knots (should equal D + N - 1). The total vector length S satisfies: which expands as: [0] : rational flag (1.0 if rational, 0.0 otherwise) [1] : D (polynomial degree) [2] : N (control points count) [3 ... 3+3*N-1] : control-point coordinates (x, y, z) for each of the N points [3+3*N] : M (weight count) [3+3*N+1 ... 3+3*N+M] : weight values [3+3*N+M+1] : K (knot count) [3+3*N+M+2 ... 3+3*N+M+1+K] : knot values [S-1] : reverse flag (1.0 if reversed, 0.0 otherwise)S = 6 + 3*N + M + K
.. code-block:: python
for p in pts: print(f" {p}") print(f"Weights({m_w}): {weights}") print {knots}") print {reversed_flag}")
@n return type of : std::vector< double,std:: allocator< double > >
- Returns
- Packed spline parameters as a float sequence (std::vector<double> in C++, tuple in Python).
◆ start_param()
| start_param | ( | self | ) |
Get the lowest value of the Curve in uv space.
.. code-block:: python
@n return type of : float
- Returns
- The beginning value of the parameter.
◆ tangent()
| tangent | ( | self, | |
| point ) |
Get the tangent to the Curve at a particular point.
.. code-block:: python
@n type of point: std::array< double,3 >, in
- Parameters
-
point A vector containing 3 doubles representing coordinates of a location on the Curve.
return type of : std:: array< double,3 >
- Returns
- The tangent to the Curve at the location specified
◆ u_from_arc_length()
| u_from_arc_length | ( | self, | |
| root_param, | |||
| arc_length ) |
Get the u value for a point a specified arc length away from a specified root parameter on the Curve.
.. code-block:: python
@n type of root_param: float, in
- Parameters
-
root_param The beginning parameter from which the arc length is added to.
type of arc_length: float, inarc_length The length away from the root parameter of the output parameter.
return type of : float
- Returns
- The u value of the Curve the arc length away from the root parameter.
◆ u_from_position()
| u_from_position | ( | self, | |
| position ) |
Get the u value of a particular position on the Curve.
.. code-block:: python
@n type of position: std::array< double,3 >, in
- Parameters
-
position A vector containing the coordinates of the input position
return type of : float
- Returns
- The u value of the position along the Curve.
Generated on Tue Jun 9 2026 13:00:43 for Cubit Python API by
Public Member Functions inherited from