Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Deduplicate objects with same color on step export #1690

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

lorenzncode
Copy link
Member

Resolves #1689.

@adam-urbanczyk
Copy link
Member

Thanks for picking this up @lorenzncode , but shouldn't the solution be defining __eq__ and __hash__ for cq.Color?

@lorenzncode
Copy link
Member Author

Yes, that makes sense - thanks for the input @adam-urbanczyk ! I had a few hours on a train to look at this but please feel free to open an alternate PR or edit if you like. I'll give your suggestion a try probably on the way back (cq actually works quite well on a chromebook by the way even cq-editor; x86_64 8GB RAM).

Copy link

codecov bot commented Oct 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.23%. Comparing base (dfba42f) to head (d7b054d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1690   +/-   ##
=======================================
  Coverage   95.23%   95.23%           
=======================================
  Files          27       27           
  Lines        6521     6525    +4     
  Branches      970      970           
=======================================
+ Hits         6210     6214    +4     
  Misses        187      187           
  Partials      124      124           

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

@lorenzncode lorenzncode marked this pull request as ready for review October 28, 2024 01:41
tests/test_assembly.py Show resolved Hide resolved
Copy link
Member

@jmwright jmwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @lorenzncode

@jmwright jmwright merged commit 3cf8742 into CadQuery:master Nov 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exporting STEP with colors doesn't de-duplicate as expected with different, but same-valued Colors
3 participants