--convert-unit
Rescale models whose mesh volumes look implausibly small by inferring — heuristically, from volume alone — whether coordinates were authored in meters (scale ×1000) or inches (scale ×25.4), and marks each converted volume so the correction is recorded in 3MF/AMF output and applied consistently when new volumes are added to the model later.
Details
When --convert-unit is set, the slicer runs a heuristic unit-detection pass over every loaded model as part of the CLI transform sequence, and before any slicing action — provided the caller places the flag ahead of arrangement or slicing options on the command line, since transforms are executed strictly in the order they appear. It does not consult file headers or embedded metadata to determine the source unit; instead, it inspects the computed mesh volume (in mm³, the engine's internal unit) of each object and infers what unit the authoring tool must have used. The logic applies two checks in order: meters first, then inches.
The meters check fires when any object's mesh volume is below 0.008 mm³, which corresponds to a bounding cube of roughly 0.2 × 0.2 × 0.2 mm — a near-invisible speck if the geometry was actually authored in millimeters, but a plausible 20 × 20 × 20 cm object if every coordinate was written in meters. When that threshold is met, the object's mesh is scaled uniformly by 1000. The inches check fires (only if the meters check did not) when any object's volume is below 8.0 mm³, equivalent to a 2 × 2 × 2 mm cube in mm terms but a normal 2 × 2 × 2 inch object in imperial terms; those objects are scaled by 25.4. In both cases only the objects that individually fell below the relevant threshold are scaled — objects in the same model whose volume already exceeds the threshold are left untouched.
After scaling, the slicer sets a per-volume conversion marker on each affected volume, recording whether the source unit was inches or meters. Those markers are serialized into 3MF and AMF output metadata, recording that conversion was applied. The markers are also consulted when new volumes are subsequently added to an already-converted model, so the new geometry is brought to the same scale. Re-detection on a second CLI run is naturally prevented because the mesh, already scaled up, produces volumes that exceed both thresholds; the markers themselves are not a direct re-detection gate in the CLI code path.
Watch out for
- ▲ Detection is purely volume-based: a legitimately tiny part (jewelry, micro-component) whose mesh volume happens to fall below the meters threshold (0.008 mm³) or the inches threshold (8.0 mm³) will be rescaled even though its units were correct. There is no way to override the heuristic once `--convert-unit` is set.
- ▲ The two checks are mutually exclusive and ordered: meters is tested first. A model whose volumes fall below both thresholds will always be treated as meters, never as inches.
- ▲ In a scene where some objects are below the threshold and others are above, only the small objects are scaled. The resulting model is internally consistent only if the size disparity was actually due to a unit mismatch and not intentional scale variation.
- ▲ `--convert-unit` is a transform option processed in CLI-argument order alongside `--arrange`, `--orient`, `--rotate`, and others. Placing it after `--arrange` on the command line means it runs on already-arranged geometry.
Sign up for free today
No credit card required. Connect unlimited printers and get production automation running in minutes.