Command line utility to convert STL files to STEP (ISO 10303-21) files. The translation is a direct triangle-to-triangle conversion with tolerance-based edge merging. stltostp generates CAD-interoperable STEP files without depending on third-party libraries like OpenCASCADE or FreeCAD.
Features:
- STL to STEP conversion (ASCII and binary STL support)
- Selectable output units (mm, cm, m, in) and STEP schema (AP203, AP214)
- Automatic edge merging with configurable tolerance
- No external CAD library dependencies
stltostp <stl_file> <step_file> [ tol <value> ] [ units <mm|cm|m|in> ] [ schema <203|214> ] [ mergeplanar ]
tol- minimum edge length; shorter edges are merged (default 1e-6)units- length unit written to the STEP file:mm(default),cm,m, orinschema- STEP schema declared in the file header:203(default) or214mergeplanar- merge edge-connected coplanar triangles into single planar faces
mkdir build
cd build
cmake ..
make clean all && sudo make install
BSD