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

Streamline use of CompositeSurface with SurfaceFilter #3158

Open
pshriwise opened this issue Oct 3, 2024 · 0 comments · May be fixed by #3167
Open

Streamline use of CompositeSurface with SurfaceFilter #3158

pshriwise opened this issue Oct 3, 2024 · 0 comments · May be fixed by #3167

Comments

@pshriwise
Copy link
Contributor

Description

Right now it isn't possible to pass a CompositeSurface object directly to a SurfaceFilter. While a CompositeSurface object has all of the operator methods to generate halfspaces, it (correctly) doesn't provide an ID method and can't be applied in the SurfaceFilter constructor.

Assuming that the desired behavior is to add all of the composing surfaces to the filter, we can enable this by either:

a. adding some special behavior for CompositeSurface types

b. adding a CompositeSurfaces.get_surfaces() method that returns a list of the objects surface objects to make it simpler to create the desired filter, leaving SurfaceFilter as-is.

class CompositeSurface:

    def composing_surfaces(self):
        return [getattr(self, name) for name in self._surface_names]

Alternatives

No others come to mind at this time.

Compatibility

This is an addition in capability and API, so compatibility shouldn't be an issue.

@zoeprieto zoeprieto linked a pull request Oct 11, 2024 that will close this issue
5 tasks
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 a pull request may close this issue.

1 participant