Closed bragostin closed 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.
@jmwright From my side it is okay, so if it is good enough for you let's merge!
Great work. But I see two problems
name 'BOPAlgo_GlueEnum' is not defined
error when I pass glue=True
argument to fragment(..)
glue=True
option should be exercisedOptional[Union["Workplane", Solid, Compound]]
) of toFragment
argument should be tested. Maybe without extensive checks of number of shapes and volume of each Shape but at least to be sure that it works at all.tol
argument should be added@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.
@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.
@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.
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
@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)
@fedorkotov thank you very much for providing a correct example of tests. I have run black and uploaded the new file.
@bragostin Thank you for this contribution. I have no further change requests.
@fedorkotov thank you very much for the review and the help! @jmwright then I supposed it can be merged?
Merged. Thanks for all your work on this @bragostin
Apply boolean fragment to solids. https://dev.opencascade.org/doc/overview/html/specification__boolean_operations.html#specification__boolean_7