The auxiliary.py module#
Summary#
Get the |
|
Get the |
|
Get the |
|
Get the |
|
Find all the |
|
Find the |
|
Find the |
|
Find the |
|
Find the |
|
Find the |
|
Find the |
|
Find the |
|
Get the hex string color from input formats. |
|
Get the hex string from an opacity value. |
Description#
Auxiliary functions for the PyAnsys Geometry library.
Module detail#
- auxiliary.get_design_from_component(component: ansys.geometry.core.designer.component.Component) ansys.geometry.core.designer.design.Design#
Get the
Designof the givenComponentobject.- Parameters:
- component
Component The component object for which to find the
Design.
- component
- Returns:
DesignThe
Designof the provided component object.
- auxiliary.get_design_from_body(body: ansys.geometry.core.designer.body.Body) ansys.geometry.core.designer.design.Design#
Get the
Designof the givenBodyobject.- Parameters:
- body
Body The body object for which to find the
Design.
- body
- Returns:
DesignThe
Designof the provided body object.
- auxiliary.get_design_from_face(face: ansys.geometry.core.designer.face.Face) ansys.geometry.core.designer.design.Design#
Get the
Designof the givenFaceobject.- Parameters:
- face
Face The face object for which to find the
Design.
- face
- Returns:
DesignThe
Designof the provided face object.
- auxiliary.get_design_from_edge(edge: ansys.geometry.core.designer.edge.Edge) ansys.geometry.core.designer.design.Design#
Get the
Designof the givenEdgeobject.- Parameters:
- edge
Edge The edge object for which to find the
Design.
- edge
- Returns:
DesignThe
Designof the provided edge object.
- auxiliary.get_all_bodies_from_design(design: ansys.geometry.core.designer.design.Design) list[ansys.geometry.core.designer.body.Body]#
Find all the
Bodyobjects inside aDesign.- Parameters:
- design
Design Parent design for the bodies.
- design
- Returns:
list[Body]List of Body objects.
Notes
This method takes a design and gets the corresponding
Bodyobjects.
- auxiliary.get_bodies_from_ids(design: ansys.geometry.core.designer.design.Design, body_ids: list[str]) list[ansys.geometry.core.designer.body.Body]#
Find the
Bodyobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[Body]List of Body objects.
Notes
This method takes a design and body ids, and gets their corresponding
Bodyobject.
- auxiliary.get_components_from_ids(design: ansys.geometry.core.designer.design.Design, component_ids: list[str]) list[ansys.geometry.core.designer.component.Component]#
Find the
Componentobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[Component]List of Component objects.
Notes
This method takes a design and component ids, and gets their corresponding
Componentobject.
- auxiliary.get_faces_from_ids(design: ansys.geometry.core.designer.design.Design, face_ids: list[str]) list[ansys.geometry.core.designer.face.Face]#
Find the
Faceobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[Face]List of Face objects.
Notes
This method takes a design and face ids, and gets their corresponding
Faceobject.
- auxiliary.get_edges_from_ids(design: ansys.geometry.core.designer.design.Design, edge_ids: list[str]) list[ansys.geometry.core.designer.edge.Edge]#
Find the
Edgeobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[Edge]List of Edge objects.
Notes
This method takes a design and edge ids, and gets their corresponding
Edgeobjects.
- auxiliary.get_vertices_from_ids(design: ansys.geometry.core.designer.design.Design, vertex_ids: list[str]) list[ansys.geometry.core.designer.vertex.Vertex]#
Find the
Vertexobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[Vertex]List of Vertex objects.
Notes
This method takes a design and vertex ids, and gets their corresponding
Vertexobjects.
- auxiliary.get_beams_from_ids(design: ansys.geometry.core.designer.design.Design, beam_ids: list[str]) list[ansys.geometry.core.designer.beam.Beam]#
Find the
Beamobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[Beam]List of Beam objects.
Notes
This method takes a design and beam ids, and gets their corresponding
Beamobjects.
- auxiliary.get_design_points_from_ids(design: ansys.geometry.core.designer.design.Design, design_point_ids: list[str]) list[ansys.geometry.core.designer.designpoint.DesignPoint]#
Find the
DesignPointobjects inside aDesignfrom its ids.- Parameters:
- Returns:
list[DesignPoint]List of DesignPoint objects.
Notes
This method takes a design and design point ids, and gets their corresponding
DesignPointobjects.
- auxiliary.convert_color_to_hex(color: str | tuple[float, float, float] | tuple[float, float, float, float]) str#
Get the hex string color from input formats.
- Parameters:
- Returns:
strThe hex code string for the color, formatted #rrggbbaa.
- auxiliary.DEFAULT_COLOR = '#D6F7D1'#