CadDataFileReader
Canonical path: NemAll_Python_BaseElements.CadDataFileReader
Utility for reading data from common CAD files, like IFC or DWG, and converting them into Python objects (like ModelElement3D), but without creating these objects in the drawing file. In this way, the objects can be processed further inside the script e.g., become a part of the created PythonPart.
ReadIFC
staticmethod
ReadIFC(
doc: DocumentAdapter, fileName: str
) -> list[tuple[str, list[ModelElement3D]]]
Import the data from an IFC file and return it as Python objects, without creating them in the drawing file.
The method groups objects, that are sub objects of an IfcElementAssembly, into tuples. If there is no IfcElementAssembly entity in the IFC file, one tuple with all objects is returned.
IMPORTANT: Only objects with the IfcType of IfcBuildingElementProxy are read!
Parameters:
-
doc
(DocumentAdapter
) –Document
-
fileName
(str
) –Full path to the IFC file
Returns:
-
list[tuple[str, list[ModelElement3D]]]
–Tuples like (group name, model elements)
ReadOBJ
staticmethod
ReadOBJ(
fileName: str, designPathLocation: eDesignPathLocation
) -> list[ModelElement3D]
Import an OBJ file
Parameters:
-
fileName
(str
) –Full file name of the OBJ file
-
designPathLocation
(eDesignPathLocation
) –Location of the design path
Returns:
-
list[ModelElement3D]
–List with the model elements
ReadSKP
staticmethod
ReadSKP(
fileName: str, designPathLocation: eDesignPathLocation
) -> list[ModelElement3D]
Import an SKP file
Parameters:
-
fileName
(str
) –Full file name of the SKP file
-
designPathLocation
(eDesignPathLocation
) –Location of the design path
Returns:
-
list[ModelElement3D]
–List with the model elements