SketcherGui::EditModeInformationOverlayCoinConverter Class Reference

Class for creating the Overlay information layer. More...

#include <EditModeInformationOverlayCoinConverter.h>

Public Member Functions

void convert (const Part::Geometry *geometry, int geoid)
 extracts information from the geometry and converts it into an information overlay in the SoGroup provided in the constructor. More...
 
 EditModeInformationOverlayCoinConverter (SoGroup *infogroup, OverlayParameters &overlayparameters, DrawingParameters &drawingparameters)
 Constructs an InformationOverlayCoinConverter responsible for generating (calculating) the information of a full geometry layer overlay using the overlay and drawing parameters. More...
 

Detailed Description

Class for creating the Overlay information layer.

Responsibility: To create and update the SoGroup provided as a constructor parameter, taking into account the drawing and overlay parameters provided as constructor parameters.

Interface: A single entry point convert(), performing the following flow:

[Geometry] => Calculate => addUpdateNode

Calculate is responsible for generating information directly usable by Coin (but with standard types that would enable portability) in a predetermined internal Node structure format (e.g. StringNode, PolygonNode) that can generically be used by the addUpdateNode.

addUpdateNode is responsible for creating or updating the node structure (depending on overlayParameters.rebuildInformationLayer)

Supported: Currently it only supports information of Part::Geometry objects and implements calculations only for GeomBSplineCurve.

Caveats:

  • This class relies on the order of creation to perform the update. Any parallel execution that does not deterministically maintain the order will result in undefined behaviour. This provides a reasonable tradeoff between complexity and the fact that currently the information layer is generally so small that no parallel execution would actually result in a performance gain.

Constructor & Destructor Documentation

◆ EditModeInformationOverlayCoinConverter()

EditModeInformationOverlayCoinConverter::EditModeInformationOverlayCoinConverter ( SoGroup infogroup,
OverlayParameters overlayparameters,
DrawingParameters drawingparameters 
)

Constructs an InformationOverlayCoinConverter responsible for generating (calculating) the information of a full geometry layer overlay using the overlay and drawing parameters.

Parameters
infogroupThe SoGroup to be populated with the coin nodes generated from the calculated information.
overlayparametersParameters for controlling the overlay
drawingparametersParameters for drawing the overlay information

Member Function Documentation

◆ convert()

void EditModeInformationOverlayCoinConverter::convert ( const Part::Geometry geometry,
int  geoid 
)

extracts information from the geometry and converts it into an information overlay in the SoGroup provided in the constructor.

Parameters
geometrythe geometry to be processed

References Base::Persistence::getClassTypeId().


The documentation for this class was generated from the following files: