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

per view clipping plane #18092

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nmschulte
Copy link

@nmschulte nmschulte commented Nov 23, 2024

This isn't perfect ... fixes #18086 ...

  • the custom clip/view direction vector component logic is wrong
  • the four value's single-step and min-decimal values are not restored
  • the CommandView updateView/MDIView->View3DInventor pipe can probably be cleaned up
  • there's no easy way to reset [a view's] clipping planes, or otherwise manage or investigate them

@github-actions github-actions bot added the Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD label Nov 23, 2024
src/Gui/Clipping.h Outdated Show resolved Hide resolved
src/Gui/CommandView.cpp Outdated Show resolved Hide resolved
src/Gui/CommandView.cpp Outdated Show resolved Hide resolved
@nmschulte nmschulte marked this pull request as draft November 26, 2024 04:29
@nmschulte nmschulte force-pushed the nms/per-view-clipping-plane branch 4 times, most recently from 0d11bb2 to 6a8dfe2 Compare November 26, 2024 08:55
p->isSensing
);

SbPlane x(SbVec3f(1, 0, 0), d);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This math is all wrong.

@nmschulte nmschulte marked this pull request as ready for review November 26, 2024 09:10
@nmschulte
Copy link
Author

nmschulte commented Nov 26, 2024

Here is a video demonstrating the solution here.

clip.mp4

Some things to note, that I don't believe are introduced by this changeset:

  1. Undocked Views will be unable to have their clipping plane configuration altered, because focusing the clipping plane dialog in the main application window causes the focus to shift back to the docked View.
  2. Docking or undocking a View seems to actually create a new Window/View, and so clipping plane configuration is effectively lost.

Some things to note:

  1. Clipping will hold on to private references for each View it sees while it's open, even closed ones, and until it's closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mod: Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clipping Plane must be reestablished across documents
1 participant