CadQuery / cadquery-plugins

A collection of community contributed plugins that extend the functionality of CadQuery
Apache License 2.0
38 stars 15 forks source link

fragment #27

Closed bragostin closed 2 years ago

bragostin commented 2 years ago

Apply boolean fragment to solids. https://dev.opencascade.org/doc/overview/html/specification__boolean_operations.html#specification__boolean_7

jmwright commented 2 years ago

Thanks for putting this together @bragostin

I still see commits happening. Please let me know when you're ready for it to be merged.

bragostin commented 2 years ago

@jmwright From my side it is okay, so if it is good enough for you let's merge!

fedorkotov commented 2 years ago

Great work. But I see two problems

bragostin commented 2 years ago

@fedorkotov thank you for your feedback. Since programming is not my background I don't have a reflex for this good practice (yet). I will improve the PR along these lines.

jmwright commented 2 years ago

@bragostin If the changes will cause this PR to stall, we can merge and then create an issue with a checklist of the items to be done in the future. Just let me know.

bragostin commented 2 years ago

@fedorkotov @jmwright I have implemented all the improvements, with much more tests, except the example with tol. I was not able to imagine a relevant example. Not sure why tol is available for in the case of general fuse actually.

fedorkotov commented 2 years ago

I would suggest splitting one test to several test methods each of which does one thing only. This serves two purposes

This is what I mean (see attached file). feel free to correct/expand/rename if I failed to capture some of the scenarios that your single test method tested for test_fragment.py.txt

fedorkotov commented 2 years ago

@bragostin It seems you haven't applied black formatting before uploading or you are not using the same version of it as automatic lint uses (19.10b0 currently, see https://raw.githubusercontent.com/CadQuery/cadquery/master/environment.yml)

bragostin commented 2 years ago

@fedorkotov thank you very much for providing a correct example of tests. I have run black and uploaded the new file.

fedorkotov commented 2 years ago

@bragostin Thank you for this contribution. I have no further change requests.

bragostin commented 2 years ago

@fedorkotov thank you very much for the review and the help! @jmwright then I supposed it can be merged?

jmwright commented 2 years ago

Merged. Thanks for all your work on this @bragostin