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

Brep.from_boolean_* methods incorrectly decorated as classmethod? #1371

Open
gonzalocasas opened this issue Jun 15, 2024 · 1 comment
Open
Assignees
Labels

Comments

@gonzalocasas
Copy link
Member

The brep boolean operations are marked and documented as classmethods, but they don't work as such.

The following code should work according to the documentation:

from compas.geometry import Brep

brep_c2 = Brep.from_cylinder(cc2)
brep_c3 = Brep.from_cylinder(cc3)
result = Brep.from_boolean_intersection(brep_c2, brep_c3)

however, this results in a PluginNotInstalledError exception.

For this to work, one needs to use the instance:

from compas.geometry import Brep

brep_c2 = Brep.from_cylinder(cc2)
brep_c3 = Brep.from_cylinder(cc3)
result = brep_c2.from_boolean_intersection(brep_c2, brep_c3)

But that doesn't make much sense. If the plugin system cannot correctly detect this, maybe we should just make them not class methods?

@chenkasirer chenkasirer self-assigned this Jun 17, 2024
@chenkasirer
Copy link
Member

Thanks @gonzalocasas! this should indeed work as a classmethod and does work as expected with the OCC backend. I was able to reproduce this in Rhino though, will have a look at what's causing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants