GLVis / glvis

Lightweight OpenGL tool for accurate and flexible finite element visualization
http://glvis.org
BSD 3-Clause "New" or "Revised" License
256 stars 53 forks source link

Support for faces with holes in 3D #230

Closed tzanio closed 2 years ago

tzanio commented 2 years ago

Added the option to cut a portion of the interiors of 3D faces to expose more of the mesh. Useful as an alternative to transparency.

See keys Ctrl + F3 / F4.

Example:

Screen Shot 2022-05-13 at 5 46 51 PM

Inspired by:

tzanio commented 2 years ago

@mlstowell, @kanye-quest, @dylan-copeland, and @psocratis -- any chance I can get another approval on this PR?

mlstowell commented 2 years ago

I like this feature but, unless I missed something, it looks like these cut triangles and quads are being displayed even if cut_lambda=0. Is that correct? If so, wouldn't it be more efficient to display a single triangle or quad?

tzanio commented 2 years ago

I like this feature but, unless I missed something, it looks like these cut triangles and quads are being displayed even if cut_lambda=0. Is that correct? If so, wouldn't it be more efficient to display a single triangle or quad?

They shouldn't be, see e.g. this check: https://github.com/GLVis/glvis/pull/230/files#diff-8fd2270828db1d1202e66618a756d214a775cd82f71d29d9a92d475485a5b32dR747-R751

Am I missing something 🤔

Oh I see, you mean in PrepareFlat... I'll fix that

tzanio commented 2 years ago

@mlstowell, see https://github.com/GLVis/glvis/pull/230/commits/9e3ceb8c4b15434485d90bf1893b5ddfab55df49