Private API

Common methods

GridVisualizeTools.extract_visible_bfaces3DMethod
extract_visible_bfaces3D(
    grid,
    xyzcut;
    gridscale,
    primepoints,
    Tp,
    Tf
)

Extract visible boundary faces - those not cut off by the planes x=xyzcut[1] or y=xyzcut[2] or z=xyzcut[3].

Return corresponding points and facets for each region for drawing as mesh (Makie,MeshCat) or trisurf (pyplot)

source
GridVisualizeTools.extract_visible_cells3DMethod
extract_visible_cells3D(
    grid,
    xyzcut;
    gridscale,
    primepoints,
    Tp,
    Tf
)

Extract visible tetrahedra - those intersecting with the planes x=xyzcut[1] or y=xyzcut[2] or z=xyzcut[3].

Return corresponding points and facets for each region for drawing as mesh (Makie,MeshCat) or trisurf (pyplot)

source

PyPlot

Makie

GridVisualize.makeaxis3dMethod

makeaxis3d(ctx)

Dispatch between LScene and new Axis3. Axis3 does not allow zoom, so we support LScene in addition.

source
GridVisualize.makescene2dMethod

makescene2d(ctx)

Complete scene with title and status line showing interaction state. This uses a gridlayout and its protrusion capabilities.

source
GridVisualize.makescene3dMethod
   makescene3d(ctx)

Complete scene with title and status line showing interaction state. This uses a gridlayout and its protrusion capabilities.

source
GridVisualize.scene_interactionFunction
 scene_interaction(update_scene,view,switchkeys::Vector{Symbol}=[:nothing])

Control multiple scene elements via keyboard up/down keys. Each switchkey is assumed to correspond to one of these elements. Pressing a switch key transfers control to its associated element.

Control of values of the current associated element is performed by triggering change values via up/down (± 1) resp. pageup/pagedown (±10) keys

The update_scene callback gets passed the change value and the symbol.

source
GridVisualize.FlippableLayout.FLayoutType
mutable struct FLayout

Struct describing flippable layout data. We don't type annotate with Makie types as they are unknown at start time.

  • visible: Visible GridLayout
  • offscreen: Hidden GridLayot
  • blocked: Has the layout been blocked by the block key ?
  • layoutables: Layoutables attached to layout
  • condition: Condition variable working together with the blocked field.
source
GridVisualize.FlippableLayout.flayoutsceneMethod
flayoutscene(;blocked=false, kwargs...)

Layoutscene with interactive layout and blocking functionality.

The , key switches between focused view showing only one subscene and "gallery view" showing all layoutables at once.

The space key toggles blocking of the execution of the main therad when yield is replaced by yieldwait. Initial blocking state is set by the blocked kwarg.

The kwargs... are the same as of AbstractPlotting.layoutscene.

The idea is that this can work in some cases as a drop-in replacement of layoutscene.

source
GridVisualize.FlippableLayoutModule

This module is a submodule of GridVisualize.

It manages a layoutscene with interactive layout and blocking functionality.

Thanks to Julius Krumbiegel for providing a basic implementation of focus switching.

GridVisualize avoids creating dependencies on plotting backends. So we provide a way to emulate "import Makie" by allowing to set it as a global variable in the setmakie!. As a consequence, we can't use Makie types at compile time.

source

Plots

VTKView