Class for creating the Geometry layer into coin nodes. More...
#include <EditModeGeometryCoinConverter.h>
Public Member Functions | |
void | convert (const Sketcher::GeoListFacade &geolistfacade) |
converts the geometry defined by GeometryLayer into the coin nodes. More... | |
EditModeGeometryCoinConverter (GeometryLayerNodes &geometrylayernodes, DrawingParameters &drawingparameters, GeometryLayerParameters &geometryLayerParams, CoinMapping &coinMap) | |
Constructs an GeometryCoinConverter responsible for generating the points and line sets for drawing the geometry defined by a GeometryLayer into the coin nodes provided by GeometryLayerNodes. More... | |
float | getBoundingBoxMaxMagnitude () |
returns the maximum of the vertical and horizontal magnitudes of the coordinates of the points and lines added to coin by this layer (local responsibility). More... | |
auto | getBSplineGeoIds () |
returns the GeoIds of BSpline geometries More... | |
double | getCombRepresentationScale () |
returns the Comb representation scale that should be used to represent the B-Splines of this layer (local responsibility). More... | |
Class for creating the Geometry layer into coin nodes.
Responsibility: To create and update GeometryLayer nodes provided as constructor parameter for the provided geometry, taking into account the drawing parameters provided as constructor parameters.
Interface: A single entry point convert(), performing the following flow:
[Geometry] => Analysis => construct drawing elements => Create mappings GeoId coin => populate coin nodes
Analysis performs analysis such as maximum boundingbox magnitude of all geometries and maximum curvature of BSplines
EditModeGeometryCoinConverter::EditModeGeometryCoinConverter | ( | GeometryLayerNodes & | geometrylayernodes, |
DrawingParameters & | drawingparameters, | ||
GeometryLayerParameters & | geometryLayerParams, | ||
CoinMapping & | coinMap | ||
) |
Constructs an GeometryCoinConverter responsible for generating the points and line sets for drawing the geometry defined by a GeometryLayer into the coin nodes provided by GeometryLayerNodes.
geometrylayernodes | The coin nodes to be populated with the geometry |
drawingparameters | Parameters for drawing the overlay information |
void EditModeGeometryCoinConverter::convert | ( | const Sketcher::GeoListFacade & | geolistfacade | ) |
converts the geometry defined by GeometryLayer into the coin nodes.
geometry | the geometry to be processed |
References SketcherGui::CoinMapping::clear(), SketcherGui::GeometryLayerParameters::CoinLayers, convert(), SketcherGui::GeometryLayerNodes::CurvesCoordinate, SketcherGui::GeometryLayerNodes::CurveSet, SketcherGui::GeometryLayerNodes::CurvesMaterials, SketcherGui::CoinMapping::CurvIdToGeoId, Sketcher::end, SketcherGui::CoinMapping::GeoElementId2SetId, Sketcher::GeoListModel< T >::geomlist, Base::Persistence::getClassTypeId(), SketcherGui::GeometryLayerParameters::getCoinLayer(), Sketcher::GeoListModel< T >::getGeoIdFromGeomListIndex(), Sketcher::GeoListModel< T >::getGeometryFacadeFromGeoId(), Sketcher::mid, Sketcher::none, SketcherGui::CoinMapping::PointIdToGeoId, SketcherGui::CoinMapping::PointIdToVertexId, SketcherGui::GeometryLayerNodes::PointsCoordinate, SketcherGui::GeometryLayerNodes::PointsMaterials, Sketcher::GeoElementId::RtPnt, Sketcher::start, SketcherGui::DrawingParameters::zLowLines, and SketcherGui::DrawingParameters::zLowPoints.
Referenced by convert(), and SketcherGui::EditModeGeometryCoinManager::processGeometry().
float EditModeGeometryCoinConverter::getBoundingBoxMaxMagnitude | ( | ) |
returns the maximum of the vertical and horizontal magnitudes of the coordinates of the points and lines added to coin by this layer (local responsibility).
Referenced by SketcherGui::EditModeGeometryCoinManager::processGeometry().
auto SketcherGui::EditModeGeometryCoinConverter::getBSplineGeoIds | ( | ) |
returns the GeoIds of BSpline geometries
References draftfunctions.move::move().
Referenced by SketcherGui::EditModeGeometryCoinManager::processGeometry().
double EditModeGeometryCoinConverter::getCombRepresentationScale | ( | ) |
returns the Comb representation scale that should be used to represent the B-Splines of this layer (local responsibility).
Referenced by SketcherGui::EditModeGeometryCoinManager::processGeometry().