Major release. Multi-output reduction, much better error diagnostics, a self-learning ETA estimator, configurable timeouts, crash-isolated CAD stages, and a complete documentation rewrite.
New features
Reduction
- Comma-separated reduction values.
--reduce 25,50,75(orDEFAULT_REDUCE: "25,50,75"in config) writes one.stpper value. Works in single-file, multi-file, batch, and watch modes. - Output filenames include the reduction percentage as
[N], e.g.model [25].stp,model [0].stpfor no reduction,model [100].stpfor maximum. - Interactive reduction prompt with multi-value entry. Type
25,25,50,75,0, or just Enter to accept the default. !prefix in the prompt locks the chosen reduction(s) for all remaining files in the batch. Type!25once to apply 25% reduction to every following file without re-prompting.- Auto-rename in single-file interactive mode: if the user changes the default fraction at the prompt, the output filename updates to match.
- Mesh is preloaded once and reused across multiple fractions of the same source file, avoiding redundant disk read and Open3D cleanup.
CLI
--preview/--no-previewflags overrideGENERATE_PREVIEWper run without editing the config (usesargparse.BooleanOptionalAction).--watch/-wcontinues monitoringmodels/after the initial batch run and converts new files as they appear.--force/-fre-converts files even if the output is already newer than the source.--dry-run/--dryshows what would be converted or skipped without doing anything.--output-dir/-dwrites all outputs to a single directory instead of alongside each source.
Configuration
SEW_TIMEOUTconfig option (default1800seconds, was hardcoded to600). Increase for very dense meshes; decrease if you'd rather fail fast.DEFAULT_REDUCEnow accepts numbers (25) or comma-separated strings ("25,50,75") to enable multi-output by default.SKIP_EXISTINGconfig flag - skip files whose output is already newer than the source. Overridable with--force.- Config validation at startup. Invalid values produce warnings (printed in yellow) and fall back to defaults.
Diagnostics & estimator
- Self-learning conversion-time estimator. Records post-sew time per format and globally; after 5 samples shows an ETA right after sewing with R² confidence percentage. Data persists in
data/estimator.json. - Sewing errors now surface the real cause. Previously every sewing failure printed
"try a larger tolerance"regardless. The subprocess now captures stderr and reports the actual error: timeout, silent crash with exit code, or specific OCCRuntimeError. - Activity badges (Stars, Issues, Last Commit) and a Ko-fi support button in the README.
Format support
- STL - both binary and ASCII via a fast vectorised parser.
- 3MF - multi-object archives, resolves the model document via OPC relationships.
- OBJ - polygons triangulated automatically, negative vertex indices supported.
- AMF - both plain XML and zipped variants.
- IGES - via OpenCASCADE's direct reader, bypassing the mesh stage entirely.
Bug fixes
- Fixed crash where the interactive prompt zeroing out a default reduction left
shapeunbuilt, producing a misleading"input produced an empty shape"error. - Fixed
0being silently dropped from comma-separated reduction input. - Fixed
100being silently dropped from comma-separated reduction input. - Reduction values are now sorted ascending;
--reduce 80,20runs as20then80. 100%reduction now correctly produces[100]in the filename (was[99]).- Refining no longer crashes the converter.
ShapeUpgrade_UnifySameDomainis run in an isolated subprocess so a CAD-kernel segfault doesn't take the whole process down. - Fixing also runs in a subprocess for the same crash-isolation reason.
- Sewing timeouts are now correctly reported as timeouts, not as silent crashes.
- Combined two byte-identical
except ImportError/except Exceptionclauses in the reduce step. - Fixed
_IGES_EXTS = _IGES_EXTSself-reference that briefly broke module import.
Improvements
Behaviour
REDUCE_INTERACTIVEdefaults totrueso new installs prompt per file. Still skippable with Enter to accept the default.- Sewing timeout raised from 600s to 1800s. Dense meshes no longer trip the 10-minute cap by default.
- Preview always shows
reduction X%including0%for un-reduced files. Output is consistent across all generated previews. - Crash isolation: sewing, fixing, and refining each run in dedicated subprocesses. A CAD-kernel crash skips the file but the batch continues.
Pipeline
- Open3D primary reducer with
trimeshandfast-simplificationas fallbacks. Previous releases had this attribution backwards. - Open3D mesh cleanup before sewing (dedup vertices, dedup triangles, remove degenerate triangles).
ShapeUpgrade_UnifySameDomainruns twice inside the refine subprocess for stronger co-planar merging.- Preview rendering uses the in-memory shape instead of re-reading the just-written STEP file.
Code quality
- Internal constants moved out of
config.json(BYTES_PER_KB,NAME_TRIM_WIDTH,SEPARATOR_WIDTH,STD_OUTPUT_HANDLE,CONSOLE_MODE_FLAGS). They're now hardcoded - they were never meaningfully user-tunable. - Helper extractions to remove duplication:
_IGES_EXTS(replaced 6 inline copies),_preload_mesh(replaced 3 identical blocks),_is_up_to_date(replaced 3 inline checks),_first_error_line(stderr parsing). - Removed dead code:
_topo_counts, four unused return-dict fields (verts,tris,faces,edges), deadimport numpy as npstatements, duplicate exception handlers, unusedlabel_prefixparameter, deadn_tris = len(tris_np)assignment. _first_*flag patterns replaced withenumerate()+if i > 0:in three loops.getattr(args, 'dry_run', False)simplified toargs.dry_run- argparse always provides the attribute.- All comments removed from
converter.py,2STEP-Converter.bat,2STEP-Converter.sh. - All em-dashes and en-dashes replaced with hyphens across the entire project.
Filesystem layout
- Config and estimator moved into
data/(data/config.json,data/estimator.json). - One-time auto-migration of an old
estimator.jsonfrom the project root intodata/on first launch.
Documentation
- Complete README rewrite with new sections:
- Installation - explicit download / extract / run steps.
- Limitations - seven explicit non-features so users know what to expect (no hole filling, no colors/materials, no assembly hierarchy, etc.).
- Troubleshooting - full error reference table with the actual error strings the converter emits and concrete fixes for each.
- Credits - links to OpenCASCADE, FreeCAD, Open3D, trimesh, fast-simplification, matplotlib, Pillow, micromamba.
- Disclaimer - plain-language warranty disclaimer alongside the existing MIT license.
- Verified install sizes with real
dir /smeasurements: ~7.5 GB total on Windows. - New "Why so large?" section explains the env vs extracted-package-mirror split (~3.5 GB + ~4.1 GB), the duplicate-DLL situation, and what's safe to clean up.
- "How It Works" pipeline table now correctly credits Open3D for mesh cleanup and as the primary reducer. Steps 5-7 (sew/fix/refine) noted as running in isolated subprocesses.
- Table of Contents with 12 entries linking to all major sections.
- Activity badges + Ko-fi support button added at the top. All shields upgraded to
for-the-badgestyle. - Descriptive alt text on every image for accessibility and image search.
- Configuration JSON example now shows all 14 keys (was 8).
- Project Structure with consistent hierarchy and per-folder size hints.
Breaking changes
REDUCE_INTERACTIVEnow defaults totrue. New installs are prompted on every file. Set it tofalseindata/config.jsonto restore the previous quiet behavior.SEW_TIMEOUTis new at 1800s. If you were relying on the old 600s fail-fast behavior, set"SEW_TIMEOUT": 600indata/config.json.- Removed config keys (now hardcoded):
BYTES_PER_KB,NAME_TRIM_WIDTH,SEPARATOR_WIDTH,STD_OUTPUT_HANDLE,CONSOLE_MODE_FLAGS. They're silently ignored if present in an existingconfig.json.
Upgrade
The simplest path: redownload the project.