Skip to content

Add possibility to see the interior of the model using cutting plane#132

Open
knoppix2 wants to merge 1 commit intofstl-app:masterfrom
knoppix2:master
Open

Add possibility to see the interior of the model using cutting plane#132
knoppix2 wants to merge 1 commit intofstl-app:masterfrom
knoppix2:master

Conversation

@knoppix2
Copy link

@knoppix2 knoppix2 commented May 30, 2025

Add possibility to see the interior of the model using cutting plane

  • New menu entry: Enable cutting plane

  • New menu entry: Wheel mode. The wheel can act as zoom control or for
    moving the cutting plane.
    Alternatively one can press Ctrl modifier to make a Wheel controlling
    a cutting plane.

  • Pressing Ctrl modifier and a left mouse button rotates a cutting plane.

  • Minimal GLSL version for mesh.vert shader is bumped to 140, as
    glClipPlane is deprecated and the similar shader functionality
    was added in GLSL version 1.40

@sur5r
Copy link
Contributor

sur5r commented May 30, 2025

Nice feature.

I'm a bit unsure about the choice of the middle mouse button, though. While this is convenient for a desktop machine running Linux or Windows, it's less ideal on most notebooks and impossible on macOS where that concept doesn't exist at all.

Maybe a modifier button is a better approach here.

Don't get me wrong please: I'm a big fan of the three button mouse, but reality of hardware produced forces us elsewhere.

@knoppix2
Copy link
Author

knoppix2 commented May 30, 2025

Maybe a modifier button is a better approach here.

Don't get me wrong please: I'm a big fan of the three button mouse, but reality of hardware produced forces us elsewhere.

Yeah, you're right. I choose a Ctrl as a modifier. At the same way it controls a role of a Wheel (see updated commit of MR).

And other question, with this modification some old devices with GLES2 will not work anymore. Should I add the check for the GL_EXT_clipping_plane extension enabled or it's ok to leave it as is?

- New menu entry: Enable cutting plane
- New menu entry: Wheel mode. The wheel can act as zoom control or for
moving the cutting plane.
Alternatively one can press Ctrl modifier to make a Wheel controlling
a cutting plane.
- Pressing Ctrl modifier and a left mouse button rotates a cutting plane.

- Minimal GLSL version for mesh.vert shader is bumped to 140, as
glClipPlane is deprecated and the similar shader functionality
was added in GLSL version 1.40
@ptsouchlos
Copy link
Member

Sorry for the delay. I gave this a try and with larger models, when the cutting plane is enabled, the model disappears for me when moving it. Can you replicate this behavior @knoppix2?

@knoppix2
Copy link
Author

knoppix2 commented Feb 1, 2026

@ptsouchlos no problem :) I think the code still need a better refactoring to be included. Could you post an example that triggers the bug?

@ptsouchlos
Copy link
Member

@ptsouchlos no problem :) I think the code still need a better refactoring to be included. Could you post an example that triggers the bug?

Sounds good.

I no longer have the file on hand, but I just found a large STL file online. You could also use the one linked to in the README (Eifel tower). If you have trouble reproducing the issue let me know.

@knoppix2
Copy link
Author

knoppix2 commented Feb 2, 2026

I tried it with eiffel.stl and can not reproduce the bug. Could you describe the steps exactly?

@ptsouchlos
Copy link
Member

I tried it with eiffel.stl and can not reproduce the bug. Could you describe the steps exactly?

Ok thanks. I'll try again and will record the steps.

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.

3 participants