Geometry#
- class Geometry[source]#
Bases:
AssetBaseGeometry component for workbench (simulation V2)
Properties
- face_group_tag#
getter for face_group_tag
- edge_group_tag#
getter for edge_group_tag
- body_group_tag#
getter for body_group_tag
- snappy_bodies#
Getter for the snappy registry.
Additional Constructors
Methods
- classmethod from_file(file_names, project_name=None, solver_version=None, length_unit='m', tags=None, folder=None)[source]#
Create asset draft from files :param file_names: :param project_name: :param tags: :param folder: Folder object where the asset will be created (optional; defaults to root if unspecified) :return:
- classmethod import_to_project(name, file_names, project_id, length_unit='m', tags=None)[source]#
Create a geometry draft for adding to an existing project.
This creates a geometry that will be added as a supplementary component (dependency) to an existing project, rather than creating a new project.
- Parameters:
name (str) – Name for the geometry component
file_names (Union[List[str], str]) – Path(s) to the geometry file(s)
project_id (str) – ID of the existing project to add this geometry to
length_unit (LengthUnitType, optional) – Unit of length (default is “m”)
tags (List[str], optional) – Tags to assign to the geometry (default is None)
- Returns:
A draft configured for submission to an existing project
- Return type:
GeometryDraft
- show_available_groupings(verbose_mode=False)[source]#
Display all the possible groupings for faces and edges
- Parameters:
verbose_mode (bool)
- group_faces_by_tag(tag_name)[source]#
Group faces by tag name
- Parameters:
tag_name (str)
- Return type:
None
- group_edges_by_tag(tag_name)[source]#
Group edges by tag name
- Parameters:
tag_name (str)
- Return type:
None
- group_bodies_by_tag(tag_name)[source]#
Group bodies by tag name
- Parameters:
tag_name (str)
- Return type:
None
- group_faces_for_snappy()[source]#
Group faces according to body::region convention for snappyHexMesh.
- Return type:
None
- rename_edges(current_name_pattern, new_name_prefix)[source]#
Rename the edge in the current edge group
- rename_surfaces(current_name_pattern, new_name_prefix)[source]#
Rename the face in the current face group