Skip to content

Add assy imprint tracking - #2142

Draft
adam-urbanczyk wants to merge 7 commits into
masterfrom
adam-assy-imprint-tracking
Draft

adam-urbanczyk wants to merge 7 commits into
masterfrom
adam-assy-imprint-tracking

Conversation

@adam-urbanczyk

@adam-urbanczyk adam-urbanczyk commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

This PR contains some qualit of life improvements for the Assembly class.

  • imprinted and imprintingMode fields for bookkeeping. Toggled by imprint() and add().
  • add used on subassemblies updates the .objects field of all parents.
  • remove used on subassemblies updates the .objects field of all parents.

@adam-urbanczyk
adam-urbanczyk marked this pull request as draft December 4, 2026 11:46
@codecov

codecov Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.88%. Comparing base (c3486d1) to head (bdabd8c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2142      +/-   ##
==========================================
+ Coverage   95.87%   95.88%   +0.01%     
==========================================
  Files          30       30              
  Lines        9710     9735      +25     
  Branches     1472     1474       +2     
==========================================
+ Hits         9309     9334      +25     
  Misses        246      246              
  Partials      155      155              

☔ View full report in Codecov by Harness.
📢 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.

shimwell added a commit to fusion-energy/cad_to_dagmc that referenced this pull request Dec 4, 2026
CadQuery/cadquery#2142 records an Assembly.imprint in Assembly.imprinted,
and clears it when the assembly is changed. add_cadquery_object now notes
whether the object it is given is an imprinted assembly, and when that
assembly is the only object in the model the exports skip their own
imprint, on both backends, as it would only repeat the work. Objects from
separate add_cadquery_object calls have not been imprinted against each
other, so they are still imprinted. The imprint argument is still
validated when the imprint is skipped.

The flag is read with getattr, so CadQuery without #2142 imprints as
before. CI runs the #2142 branch until it is merged.

This branch has not been deployed

No deployments
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.

1 participant