objects_segmentation#

Modeler3D.objects_segmentation(objects_list, segmentation_thickness=None, segments_number=None, apply_mesh_sheets=False, mesh_sheets_number=2)[source]#

Get segmentation of an object given the segmentation thickness or number of segments.

Parameters:
objects_listlist, 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 pyaedt.modeler.cad.object3d.Object3d classes.

segmentation_thicknessfloat, optional

Segmentation thickness. Model units are automatically assigned. The default is None.

segments_numberint, 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_numberint, optional

Number of mesh sheets within one magnet segment. If nothing is provided and apply_mesh_sheets=True, the default value is 2.

Returns:
dict or tuple

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 the pyaedt.modeler.cad.object3d.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.