Closed adam-urbanczyk closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.54%. Comparing base (
3451007
) to head (926212a
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Wow! Really grateful that this has finally been changed. I can't tell you how much boilerplate code I've written to handle the inevitable union to "None" scenario when making composite solids/geometries from iteration.
Thanks @michaelgale ! Was there something stopping you from opening an issue or PR? Or did we miss it somehow?
Thanks @michaelgale ! Was there something stopping you from opening an issue or PR? Or did we miss it somehow?
I am somewhat hesitant to suggest changes to a mature core API since these types of changes can have unpredictable consequences for other users. Since this issue didn't represent a bug or unexpected behaviour, I didn't think to ever raise a PR or issue. Since CQ is so easily extended with plugins, I tend to rely on this mechanism to introduce syntactic shortcuts and convenience functions to streamline my integrations with CQ. In future, I might lower my threshold for raising issues and/or contributing changes with a PR. Thanks again to the CQ team for maintaining this project.
@lorenzncode I'm not sure that I understand. Currently union with None
results in an error.
Looks good, thanks @adam-urbanczyk
@adam-urbanczyk Right, I'm only pointing out that skipping union
to avoid the error is not exactly the same as this fix.
In #1536 , union2
is defined to avoid the error by skipping the call to union
.
In the PR branch, calling union
with None
extends the Workplane chain and does not result in error.
The result at the end of the chain is the same in either case only that the length of the chain is different.
@adam-urbanczyk Right, I'm only pointing out that skipping
union
to avoid the error is not exactly the same as this fix.In #1536 ,
union2
is defined to avoid the error by skipping the call tounion
.
That is the intention, .union()
will in general union items on the stack, so creating a new object is desired. Shall I merge?
That makes sense to me. +1 to merge. Thanks @adam-urbanczyk
Closes #1536