Skip to content

Add the ability to have a slicing plane for one structure only#390

Open
Thibaulltt wants to merge 2 commits intonmwsharp:masterfrom
Thibaulltt:more-slicing-plane-options
Open

Add the ability to have a slicing plane for one structure only#390
Thibaulltt wants to merge 2 commits intonmwsharp:masterfrom
Thibaulltt:more-slicing-plane-options

Conversation

@Thibaulltt
Copy link

I end up uploading tons of structures grouped into groups to polyscope at once, and analyze them later. When I want to hide a certain part of one structure, I can create a slicing plane and manually disable its effect on all structures I want to see whole, but this is time-consuming.

This PR adds the ability to add a slicing plane for one structure only, through that structure's Options > Slice planes menu in the Structures window. It does not change anything about the "global" slicing plane controls in View > Slice Planes.

Additionally, the buttons to add slice planes (both globally and per-structure) are now always visible in that structure's menu. I can thus quickly add structure-specific slicing planes at will even when some are already enabled.

@Thibaulltt
Copy link
Author

As with my other PR, this is directly available to the polyscope-py library if its dependency to polyscope is bumped :)

@Thibaulltt
Copy link
Author

Edit: by trying to have "fancy names" for the slicing planes (Slice plane of <structure name>), it ends up being more complicated/stateful with no real benefit. 9f340c1 removes the supplied name to addSlicePlane().

@nmwsharp
Copy link
Owner

I think this is a good change, I'm happy to merge it. I see some traffic on the PR here, let me know when it is good to go on your end.

@Thibaulltt
Copy link
Author

Let me ponder on it 'till Friday!

@Thibaulltt
Copy link
Author

I noticed MSVC does not define the 'and' and 'or' operators unless some compiler flags are enabled [1] (which is why the windows build fails). I have a patch ready for it, I'll send it on Friday if I don't find anything more in the meantime, to avoid restarting a full CI run :)

[1]: https://learn.microsoft.com/en-us/cpp/cpp/keywords-cpp?view=msvc-170 , note (b)

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 this pull request may close these issues.

2 participants