|
Cubit Python API 17.10
|
Defines a curve object that mostly parallels Cubit's RefEdge class. More...
Public Member Functions |
|
| def | arc_center_radius (self) |
| Get the center and radius of an arc curve, otherwise returns 0 for non-arc. More... |
|
| def | closest_point (self, point) |
| Get the curvature of the Curve at a particular point. More... |
|
| def | closest_point_along_vector (self, location, along_vector) |
| Get the nearest point on the Curve to point specified along the specified vector. More... |
|
| def | closest_point_trimmed (self, point) |
| Get the closest location on the Curve from a particular point. More... |
|
| def | color (self) |
| Get the color of the Curve. More... |
|
| def | curvature (self, point) |
| Get the curvature of the Curve at a particular point. More... |
|
| def | curve_center (self) |
| Get the center point of the Curve. More... |
|
| def | end_param (self) |
| Get the highest value of the Curve in uv space. More... |
|
| def | fraction_from_arc_length (self, root_vertex, length) |
| Get the fraction along the Curve a specified arc length is away from a given Vertex. More... |
|
| def | is_periodic (self) |
| Get whether the Curve is periodic or not. More... |
|
| def | length (self) |
| Get the length of the Curve. More... |
|
| def | length_from_u (self, parameter1, parameter2) |
| Get the length between two specified parameters on a Curve. More... |
|
| def | 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. More... |
|
| def | position_from_fraction (self, fraction_along_curve) |
| Get the position of the point a specified fraction along the Curve. More... |
|
| def | position_from_u (self, u_value) |
| Get the position of a particular u value for the Curve. More... |
|
| def | set_color (self, value) |
| Set the color of the Curve. More... |
|
| def | spline_params (self) |
| Retrieve the full set of spline parameters for this curve. More... |
|
| def | start_param (self) |
| Get the lowest value of the Curve in uv space. More... |
|
| def | tangent (self, point) |
| Get the tangent to the Curve at a particular point. More... |
|
| def | 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. More... |
|
| def | u_from_position (self, position) |
| Get the u value of a particular position on the Curve. 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 curve object that mostly parallels Cubit's RefEdge class.
Member Function Documentation
◆ arc_center_radius()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def curve_center | ( | self | ) |
◆ end_param()
| def 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()
| def 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()
| def is_periodic | ( | self | ) |
◆ length()
| def length | ( | self | ) |
◆ length_from_u()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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()
| def 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.
Public Member Functions inherited from