How to specify units (e.g. mm or inches)? #2193
-
I'm looking at the cuboid example in the models directory. I'm not (yet) seeing where units are specified (or implied). How does one do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
One doesn't 😄 It's a good question, but it's just not something I have looked into so far. The only place (as far as I remember) where units play a role, is exporting to 3MF (as STL doesn't support specifying a unit; again, as far as I remember). 3mf-rs supports specifying the unit, but Fornjot simply doesn't, so it defaults to millimeters. It should be pretty straight-forward to expose unit selection via API and/or CLI argument, when exporting to 3MF. If that's something you need, please let me know and I'd be happy to look into it (or merge a pull request that does it). Long-term, it probably makes sense to handle units as part of the core kernel code, not just exporting. But that's something I'd like to defer for the foreseeable future, unless there's a real need. There are bigger problems right now. |
Beta Was this translation helpful? Give feedback.
One doesn't 😄
It's a good question, but it's just not something I have looked into so far. The only place (as far as I remember) where units play a role, is exporting to 3MF (as STL doesn't support specifying a unit; again, as far as I remember). 3mf-rs supports specifying the unit, but Fornjot simply doesn't, so it defaults to millimeters.
It should be pretty straight-forward to expose unit selection via API and/or CLI argument, when exporting to 3MF. If that's something you need, please let me know and I'd be happy to look into it (or merge a pull request that does it).
Long-term, it probably makes sense to handle units as part of the core kernel code, not just exporting. But that's som…