objects_segmentation#
- Modeler3D.objects_segmentation(assignment, segmentation_thickness=None, segments=None, apply_mesh_sheets=False, mesh_sheets=2)#
Get segmentation of an object given the segmentation thickness or number of segments.
- Parameters:
- assignment
list
,str
List of objects to apply the segmentation to. It can either be a list of strings (object names), integers (object IDs), or a list of
ansys.aedt.core.modeler.cad.object_3d.Object3d
classes.- segmentation_thickness
float
,optional
Segmentation thickness. Model units are automatically assigned. The default is
None
.- segments
int
,optional
Number of segments to segment the object to. The default is
None
.- apply_mesh_sheetsbool,
optional
Whether to apply mesh sheets to selected objects. Mesh sheets are needed in case the user would like to have additional layers inside the objects for a finer mesh and more accurate results. The default is
False
.- mesh_sheets
int
,optional
Number of mesh sheets within one magnet segment. If nothing is provided and
apply_mesh_sheets=True
, the default value is2
.
- assignment
- Returns:
dict
ortuple
Depending on value
apply_mesh_sheets
it returns either a dictionary or a tuple. If mesh sheets are applied the method returns a tuple where: - First dictionary is the segments that the object has been divided into. - Second dictionary is the mesh sheets eventually needed to apply the mesh. to inside the object. Keys are the object names, and values are respectively segments sheets and mesh sheets of theansys.aedt.core.modeler.cad.object_3d.Object3d
class. If mesh sheets are not applied the method returns only the dictionary of segments that the object has been divided into.False
is returned if the method fails.