Skip to content

Added unit handling to STEP import and export#2023

Open
jmwright wants to merge 6 commits intomasterfrom
unit-import-export
Open

Added unit handling to STEP import and export#2023
jmwright wants to merge 6 commits intomasterfrom
unit-import-export

Conversation

@jmwright
Copy link
Copy Markdown
Member

@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.

@jmwright
Copy link
Copy Markdown
Member Author

Related issues that should be closed after this is merged: #1829 #1449

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.01%. Comparing base (41445a2) to head (a9e4ab5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2023   +/-   ##
=======================================
  Coverage   95.00%   95.01%           
=======================================
  Files          30       31    +1     
  Lines        8749     8765   +16     
  Branches     1298     1298           
=======================================
+ Hits         8312     8328   +16     
  Misses        289      289           
  Partials      148      148           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@adam-urbanczyk
Copy link
Copy Markdown
Member

adam-urbanczyk commented Mar 31, 2026

Thanks for picking this up @jmwright , this is very needed! Could you also add another option to export (e.g. outputUnit : STEPUnitLiterals | None = None) that would control the output unit and make unit control the document unit too? The default behavior being document unit == output unit? Cf. xstep.cascade.unit and write.step.unit OCCT options.

@adam-urbanczyk
Copy link
Copy Markdown
Member

@jmwright
Copy link
Copy Markdown
Member Author

@adam-urbanczyk Is the current implementation that you had in mind?

@adam-urbanczyk
Copy link
Copy Markdown
Member

Yes, thanks! Just give me some time to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants