PrepareTools#
- class ansys.geometry.core.tools.prepare_tools.PrepareTools(grpc_client: ansys.geometry.core.connection.GrpcClient, _internal_use: bool = False)#
Prepare tools for PyAnsys Geometry.
- Parameters:
- grpc_client
GrpcClient Active supporting geometry service instance for design modeling.
- _internal_usebool,
optional Internal flag to prevent direct instantiation by users. This parameter is for internal use only.
- grpc_client
- Raises:
GeometryRuntimeErrorIf the class is instantiated directly by users instead of through the modeler.
Notes
This class should not be instantiated directly. Use
modeler.prepare_toolsinstead.
Overview#
Extract a volume from input faces. |
|
Extract a volume from input edge loops. |
|
Remove rounds from geometry. |
|
Share topology between the chosen bodies. |
|
Share topology between the chosen bodies. |
|
Detect logos in geometry. |
|
Detect and remove logos in geometry. |
|
Detect helixes in the given bodies. |
Import detail#
from ansys.geometry.core.tools.prepare_tools import PrepareTools
Method detail#
- PrepareTools.extract_volume_from_faces(sealing_faces: list[ansys.geometry.core.designer.face.Face], inside_faces: list[ansys.geometry.core.designer.face.Face]) list[ansys.geometry.core.designer.body.Body]#
Extract a volume from input faces.
Creates a volume (typically a flow volume) from a list of faces that seal the volume and one or more faces that define the wetted surface (inside faces of the solid).
- Parameters:
- Returns:
list[Body]List of created bodies.
Warning
This method is only available starting on Ansys release 25R1.
- PrepareTools.extract_volume_from_edge_loops(sealing_edges: list[ansys.geometry.core.designer.edge.Edge], inside_faces: list[ansys.geometry.core.designer.face.Face] = None) list[ansys.geometry.core.designer.body.Body]#
Extract a volume from input edge loops.
Creates a volume (typically a flow volume) from a list of edge loops that seal the volume. and one or more faces that define the wetted surface (inside faces of the solid).
- Parameters:
- Returns:
list[Body]List of created bodies.
Warning
This method is only available starting on Ansys release 25R1.
- PrepareTools.remove_rounds(faces: list[ansys.geometry.core.designer.face.Face], auto_shrink: bool = False) bool#
Remove rounds from geometry.
Tries to remove rounds from geometry. Faces to be removed are input to the method.
Share topology between the chosen bodies.
- Parameters:
- Returns:
- bool
Trueif successful,Falseif failed.
Warning
This method is only available starting on Ansys release 24R2.
Share topology between the chosen bodies.
- Parameters:
- Returns:
RepairToolMessageMessage containing number of problem areas found/fixed, created and/or modified bodies.
Warning
This method is only available starting on Ansys release 25R2.
- PrepareTools.find_logos(bodies: list[ansys.geometry.core.designer.body.Body] = None, min_height: ansys.geometry.core.typing.Real = None, max_height: ansys.geometry.core.typing.Real = None) ansys.geometry.core.tools.problem_areas.LogoProblemArea#
Detect logos in geometry.
Detects logos, using a list of bodies if provided. The logos are returned as a list of faces.
- Parameters:
- bodies
list[Body],optional List of bodies where logos should be detected
- min_height
real,optional The minimum height when searching for logos
- max_height: real, optional
The minimum height when searching for logos
- bodies
- Returns:
LogoProblemAreaProblem area with logo faces.
Warning
This method is only available starting on Ansys release 25R2.
- PrepareTools.find_and_remove_logos(bodies: list[ansys.geometry.core.designer.body.Body] = None, min_height: ansys.geometry.core.typing.Real = None, max_height: ansys.geometry.core.typing.Real = None) bool#
Detect and remove logos in geometry.
Detects and remove logos, using a list of bodies if provided.
- Parameters:
- bodies
list[Body],optional List of bodies where logos should be detected and removed.
- min_height
real,optional The minimum height when searching for logos
- max_height: real, optional
The minimum height when searching for logos
- bodies
- Returns:
Booleanvalueindicatingwhethertheoperationwassuccessful.
Warning
This method is only available starting on Ansys release 25R2.
- PrepareTools.detect_helixes(bodies: list[ansys.geometry.core.designer.body.Body], min_radius: ansys.geometry.core.misc.measurements.Distance | pint.Quantity | ansys.geometry.core.typing.Real = 0.0, max_radius: ansys.geometry.core.misc.measurements.Distance | pint.Quantity | ansys.geometry.core.typing.Real = 100.0, fit_radius_error: ansys.geometry.core.misc.measurements.Distance | pint.Quantity | ansys.geometry.core.typing.Real = 0.01) dict[ansys.geometry.core.shapes.curves.trimmed_curve.TrimmedCurve, list[ansys.geometry.core.designer.edge.Edge]]#
Detect helixes in the given bodies.
- Parameters:
- bodies
list[Body] List of bodies to detect helixes in.
- min_radius
Distance,Quantity,orReal, default: 0.0 Minimum radius of the helix to be detected.
- max_radius
Distance,Quantity,orReal, default: 1e6 Maximum radius of the helix to be detected.
- fit_radius_error
Distance,Quantity,orReal, default: 0.01 Maximum fit radius error of the helix to be detected.
- bodies
- Returns:
dictDictionary with key “helixes” containing a list of detected helixes. Each helix is represented as a dictionary with keys “trimmed_curve” and “edges”.
Warning
This method is only available starting on Ansys release 26R1.