20 Oct 2020

Automatic extraction of surface cross section

Create partially transparent capping surfaces

Xtra-extractXsection

The TransparentCapping.hx project shows how to work around the current "Surface Cross Section" module limitation that is able to show just opaque surfaces and requires user interaction to export capping surfaces.  Thanks to the auto-refresh feature, this "Python script object" can update and show a partially transparent surface capping the original one. The capping surface is evaluated and updated as soon as any of the ports of the referenced "Surface Cross Section" is changed. Of course this module can be exploited to create nicer animations.

The AutoExtractXSection has two input ports:

Reference: it the "Surface cross section" used to create the capping surface. This module must have its data port set to a Surface data and the "clip" plane must be active.  Finally, its viewer toggle must be off (not visible) to avoid possible z-fighting issues when showing the transparent capping surface.

Base Trans: it is the base transparency (alpha) value used to render the capping surface. Its value must be the same of the same named port of the "Surface view" used to display the whole/clipped surface.

When the "orientation" or the "translate[%]" port of the Surface Cross Section module are changed the python script modules triggered by the auto-refresh creates as output a new capping surface and displays it.