|
Cubit Python API 17.05
|
The base class for specifically the Geometry types (Body , Surface , etc.) More...
Public Member Functions |
|
| 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... |
|
| def bodies | ( | self | ) |
Retrieve bodies contained within the geometry entity.
Returns a list of Body objects associated with this GeomEntity , such as sheet bodies from a surface or volumes from a body.
.. code-block:: python
@n return type of : std::vector< CubitInterface::Body,std::allocator< CubitInterface:: Body > >
| def curves | ( | self | ) |
Retrieve curves (edges) associated with the geometry entity.
Returns a list of Curve objects that bound this GeomEntity , such as the edges of a brick or boundary curves of surfaces.
.. code-block:: python
@n return type of : std::vector< CubitInterface::Curve,std::allocator< CubitInterface:: Curve > >
| def dimension | ( | self | ) |
Get the topological dimension of the geometry entity.
Returns the dimension (0 for Vertex , 1 for Curve , 2 for Surface , 3 for Volume/Body) of this GeomEntity .
.. code-block:: python
for c in curves: print("Curve dimension:", c.dimension()) # Expected output: 1
@n return type of : int
| def entity_name | ( | self | ) |
Retrieve the primary name of the geometry entity.
Returns the first name assigned to this GeomEntity , useful for identification and labeling.
.. code-block:: python
@n return type of : string
| def entity_names | ( | self | ) |
Retrieve all names assigned to the geometry entity.
Returns a list of every name that has been assigned to this GeomEntity , allowing enumeration of aliases or prior identifiers.
.. code-block:: python
for n in names: print("Name:", n)
@n return type of : std::vector< std::string,std::allocator< std:: string > >
| def is_meshed | ( | self | ) |
Returns the current mesh state of the GeomEntity .
Indicates whether the GeomEntity has mesh elements defined.
.. code-block:: python
@n return type of : boolean
| def is_transparent | ( | self | ) |
Get the transparency state of the geometry entity.
Returns whether this GeomEntity is
currently rendered as transparent ( 1 ) or
opaque ( 0 ).
.. code-block:: python
@n return type of : int
1 if transparent, 0 if
opaque).
| def is_visible | ( | self | ) |
Get the visibility state of the geometry entity.
Returns whether this GeomEntity is currently visible in the viewport (1) or hidden (0).
.. code-block:: python
@n return type of : int
| def mesh | ( | self | ) |
Generates mesh on a GeomEntity and verifies meshing status.
Discretizes the geometry of the given GeomEntity (e.g.,
surface, volume) into mesh elements. Use
is_meshed to verify if meshing has been
performed on the entity.
.. code-block:: python
| def num_names | ( | self | ) |
Get the count of names assigned to the geometry entity.
Returns the number of names currently assigned to this GeomEntity for tracking aliases or identifiers.
.. code-block:: python
@n return type of : int
| def remove_entity_name | ( | self, | |
| name | |||
| ) |
Remove a specific name from the geometry entity.
Deletes one of the names previously assigned to this GeomEntity , preserving any other names.
.. code-block:: python
for n in names: print("Remaining name:", n)
@n type of name: string, in
| name | The specific name to remove from this GeomEntity. |
| def remove_entity_names | ( | self | ) |
Remove all non-default names from the geometry entity.
Deletes every custom name assigned to this GeomEntity , preserving its inherent default name.
.. code-block:: python
| def remove_mesh | ( | self | ) |
Remove any mesh associated with the geometry entity.
Deletes the mesh on a GeomEntity
.. code-block:: python
| def set_entity_name | ( | self, | |
| name | |||
| ) |
Assign a name to the geometry entity.
Sets the primary name of this GeomEntity for identification and labeling.
.. code-block:: python
@n type of name: string, in
| name | The name to be assigned to the GeomEntity. |
| def set_transparent | ( | self, | |
| transparency_flag | |||
| ) |
Set the transparency state of the geometry entity.
Toggles whether this GeomEntity is
rendered with transparency. Passing 1 makes it
transparent; 0 makes it opaque. The default
state upon creation is transparent.
.. code-block:: python
@n type of transparency_flag: int, in
| transparency_flag | The flag ( 1 for transparent,
0 for opaque) to set the render
transparency state. |
| def set_visible | ( | self, | |
| visibility_flag | |||
| ) |
Set and verify the visibility state of the geometry entity.
Toggles whether this GeomEntity is
rendered in the viewport. Passing true makes
it visible; false hides it. Use
is_visible() to query the current state.
.. code-block:: python
@n type of visibility_flag: boolean, in
| visibility_flag |
The flag to set whether the Entity is
visible ( true) or hidden (
false).
|
| def smooth | ( | self | ) |
Smooths the mesh on a GeomEntity to improve element quality.
Applies mesh smoothing to the existing mesh on the
GeomEntity .
Requires that the entity has already been meshed (
is_meshed() returns true). Smoothing method is
based on the scheme currently set on the geomEntity (ie.
Laplacian, Mean Ratio, etc.)
.. code-block:: python
| def surfaces | ( | self | ) |
Retrieve surfaces associated with the geometry entity.
Returns a list of Surface objects that bound this GeomEntity , such as the faces of a brick.
.. code-block:: python
@n return type of : std::vector< CubitInterface::Surface,std::allocator< CubitInterface:: Surface > >
| def vertices | ( | self | ) |
Retrieve vertices (points) associated with the geometry entity.
Returns a list of Vertex objects that bound this GeomEntity , such as the corners of a brick.
.. code-block:: python
@n return type of : std::vector< CubitInterface::Vertex,std::allocator< CubitInterface:: Vertex > >
| def volumes | ( | self | ) |
Retrieve volumes associated with the geometry entity.
Returns a list of Volume objects associated with this GeomEntity , such as the volume created by a brick.
.. code-block:: python
@n return type of : std::vector< CubitInterface::Volume,std::allocator< CubitInterface:: Volume > >