IGLImport

Module: geometry

Importer for geometry and mesh assets used in the IGLGraphics Library. This class handles loading of CAD/geometry assemblies from JSON files and finite element mesh data from Gmsh mesh files. It returns structured assemblies and mesh dataset objects that integrate with the IGL scene graph.

ImportGeo

method
ImportGeo(self, filename: str)
Import geometry assembly data from a supported file.

The method currently supports JSON-based geometry. JSON payloads are parsed into
IGLAssembly and IGLBody objects representing the model hierarchy.

Args

Name Type Description
filename Path to the geometry file to import.

Returns

A tuple where the first element is True if the import succeeded, and the second element is a list of loaded IGLAssembly objects. If the file cannot be loaded or contains no valid geometry data, the tuple returns False and an empty list.

ImportMesh

method
ImportMesh(self, filename: str, verbose: bool)
Import mesh data from a (*.msh *.unv *.vtk *.stl *.obj *.nas *.bdf) files.

The method loads mesh file into an IGLMeshDS object, which can be
used for finite element visualization and mesh processing within the IGLGraphics framework.

Args

Name Type Description
filename Path to the mesh file to import.

Returns

A tuple where the first element is True if the mesh was successfully loaded, and the second element is the resulting IGLMeshDS instance. If loading fails, returns False and None.

__load_gmsh

method
__load_gmsh(self, filename: str, verbose)

__get_file_name_from_path

method
__get_file_name_from_path(self, file_path: str)

__load_json

method
__load_json(self, data: Union[dict, list, Any])
data: parsed JSON (dict or list) returns: list[IGLAssembly]

__TraverseGeoData

method
__TraverseGeoData(self, node: dict, Assemblies: List[IGLAssembly])

LoadCAEModel

method
LoadCAEModel(self, file_path: str)