import_3d_cad#
- Modeler2D.import_3d_cad(input_file: str | Path, healing: bool = False, refresh_all_ids: bool = True, import_materials: bool = False, create_lightweight_part: bool = False, group_by_assembly: bool = False, create_group: bool = True, separate_disjoints_lumped_object: bool = False, import_free_surfaces: bool = False, point_coincidence_tolerance: float = 1e-06, reduce_stl: bool = False, reduce_percentage: int = 0, reduce_error: int = 0, merge_planar_faces: bool = True, merge_angle: float = 0.02)#
Import a CAD model.
- Parameters:
- input_file
strorpathlib.Path Full path and name of the CAD file.
- healingbool,
optional Whether to perform healing. The default is
False, in which case healing is not performed.- refresh_all_idsbool,
optional Whether to refresh all IDs after the CAD file is loaded. The default is
True. Refreshing IDs can take a lot of time in a big project.- import_materialsbool
optional Either to import material names from the file or not if presents.
- create_lightweight_partbool ,optional
Either to import lightweight or not.
- group_by_assemblybool,
optional Either import by sub-assembly or individual parts. The default is
False.- create_groupbool,
optional Either to create a new group of imported objects. The default is
True.- separate_disjoints_lumped_objectbool,
optional Either to automatically separate disjoint parts. The default is
False.- import_free_surfacesbool,
optional Either to import free surfaces parts. The default is
False.- point_coincidence_tolerance
float,optional Tolerance on point. Default is
1e-6.- reduce_stlbool,
optional Whether to reduce the stl file on import or not. Default is
True.- reduce_percentage
int,optional Stl reduce percentage. Default is
0.- reduce_error
int,optional Stl error percentage during reduce operation. Default is
0.- merge_planar_facesbool,
optional Stl automatic planar face merge during import. Default is
True.- merge_angle
float,optional Stl import angle in radians for which faces will be considered planar. Default is
2e-2.
- input_file
- Returns:
- bool
Truewhen successful,Falsewhen failed.
References
>>> oEditor.Import