Skip to content

IGES (.igs, .iges) ​

The Initial Graphics Exchange Specification, read through OpenCASCADE (the meshioplusplus-occt add-on wheel, pip install "meshioplusplus[occt]", and the release binaries): the twin of the STEP reader for the older CAD exchange format many tools still write. Read-only.

Format nameiges
Extensions.igs, .iges
Read / Write✓ (with OpenCASCADE) / —
Extra dependenciesOpenCASCADE 7.6 or later (LGPL-2.1 with the OCCT exception; the meshioplusplus-occt wheel and the release binaries, on by default from source)
python
import meshioplusplus as mp

mesh = mp.read("part.igs")                         # triangles at 1e-3 of the diagonal
mesh = mp.iges.read("part.igs", deflection=0.01)       # a chordal deflection of your own
mesh = mp.iges.read("part.igs", heal=True)            # ShapeFix_Shape, then sewing
mp.write("part.cad.json", mesh)                    # the NURBS faces as Kratos CAD JSON

IGESControl_Reader transfers the file's shape, which is then handled exactly as a STEP file's is: converted to NURBS throughout, triangulated by BRepMesh into one triangle block with the cad:* cell data, in millimetres (the mesh states field_data["meshio:length_unit"] = 0.001, as for STEP), and kept as faces, trimming loops and edges in mesh.info["brep"] (C++ BrepInfo); see STEP: reading for the details and the options, healing (heal, sew_tolerance) included. IGES files are the usual source of faces that do not share their edges, which heal=True sews. Without the backend, reading raises NotImplementedError (C++ Unsupported) naming -DMESHIOPLUSPLUS_WITH_OCCT=ON; there is no Python twin of a CAD kernel. In WASM the full artifact (v17.2.0) links the backend and reads IGES; the lean one does not list it among its readers and names the full artifact. Writing IGES is not planned: STEP is the exchange format meshio++ writes (see conformance).

As for STEP, the NURBS B-rep in mesh.info["brep"] can be refined, evaluated and sampled exactly with the isogeometric layer, and triangulated at a target size with mesh_cad_surface. Each edge's extra holds OpenCASCADE's tolerances as for STEP (since v17.20.0), which mesh_cad_surface accepts with model_tolerances (on by default since v19.0.0).

Released under the MIT License.