Convert STEP (ISO 10303-21) files to IFC by 1:1 entity translation — no unnecessary tessellation, no meshing, no re-fitting.
STEP and IFC both descend from the same EXPRESS geometric schema, so most geometry entities have a direct counterpart: CARTESIAN_POINT → IfcCartesianPoint, ADVANCED_FACE → IfcAdvancedFace, B_SPLINE_SURFACE_WITH_KNOTS → IfcBSplineSurfaceWithKnots, and so on. step2ifc exploits that correspondence and writes the translated entities directly via ifcopenshell's low-level API, preserving the original B-rep exactly as authored.
Most STEP→IFC converters load the file into OpenCascade (or similar), evaluate the geometry, and emit tessellated meshes. That works, but it:
- loses the analytical representation (splines become triangles),
- depends on the kernel's tolerance and healing behaviour, and
- bloats the IFC output with geometry that can no longer be edited as B-rep.
step2ifc skips the kernel entirely. If your STEP file contains a NURBS surface, the IFC file contains the same NURBS surface — same control points, same knots, same weights, nothing gets altered. (That is, as long there is a correspondence. See Status)
- In scope: geometric entities (points, curves, surfaces, topology, solids) with direct EXPRESS counterparts in IFC.
- Out of scope: product structure / PDM data (assemblies,
PRODUCT_DEFINITION, material and property metadata). The tool wraps the translated geometry in a minimal IFC spatial hierarchy (IfcProject→IfcSite→IfcBuildingElementProxy) so the output is a valid IFC file, nothing more.
Requires Python 3.13+ and uv.
git clone <repo-url> step2ifc
cd step2ifc
uv syncuv run step2ifc input.stp output.ifc
uv run step2ifc input.stp output.ifc --schema IFC4X3
uv run step2ifc input.stp output.ifc -vv # log every unmapped or failing entityOptions:
| Flag | Description |
|---|---|
--schema {IFC4,IFC4X3} |
Target IFC schema (default: IFC4) |
-v / -vv |
Increase log verbosity |
Early; just a Proof-of-Concept. The entity mapping table in src/step2ifc/mapping.py currently covers the common geometric entities (points, curves, surfaces, topology, B-rep solids) and is expected to grow as real-world STEP inputs are encountered.
There is at least one entity that has no IFC equivalent: CONICAL_SURFACE.
If this type comes up we would need to triangulate again.
steputils— pure-Python STEP Part 21 parser.ifcopenshell— IFC file construction.
OpenCascade is intentionally not a runtime dependency, yet. That might change to prevent the conversion from failing (see above.)