Added unit handling to STEP import and export#2023
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2023 +/- ##
=======================================
Coverage 95.61% 95.62%
=======================================
Files 30 30
Lines 8881 8893 +12
Branches 1311 1311
=======================================
+ Hits 8492 8504 +12
Misses 240 240
Partials 149 149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for picking this up @jmwright , this is very needed! Could you also add another option to export (e.g. |
|
@adam-urbanczyk Is the current implementation that you had in mind? |
|
Yes, thanks! Just give me some time to review. |
adam-urbanczyk
left a comment
There was a problem hiding this comment.
So I found a few things:
- It would be nice to support
mmon top ofMM - I think import should reply on "cascade.unit"
- Would it be possible to support xbf an xml too?
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
|
@adam-urbanczyk Are the mypy errors I'm getting now related to the ones you are getting on the nurbs PR? |
|
Not really, new release of mypy got more strict (as it usually does). |
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
|
@jmwright do you mind if I'm going to try to add units to xbf and xml import/export too? Or shall we try this in another PR? |
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
@adam-urbanczyk Feel free, if you would like. However, it's a slightly different mechanism for setting the units for non-STEP formats, if I understand correctly. |
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
|
I added (STEP only, not sure how to make this work for xbf/xml) unit handling for |
Co-authored-by: AU <adam-urbanczyk@users.noreply.github.com>
|
@lorenzncode thanks for taking a look! I think I resolved all of the issues. |
lorenzncode
left a comment
There was a problem hiding this comment.
Thanks @adam-urbanczyk @jmwright ! I found one more doc issue to check.
|
Alright, merging. Thanks a lot for the implementation @jmwright and reviewing @lorenzncode! |
@adam-urbanczyk @lorenzncode This fixes a long-standing issue where things are at the wrong scale when exchanging STEP files because CadQuery did not use OCCT's units mechanism.
Fixes #1449, fixes #1829