NDEVR
API Documentation
PolylineSlicer

Logic for slicing one or more Model/Geometry objects into polyline cross-section Model/Geometry objects based on configured slice criteria. More...

Static Public Member Functions

static void CreateActiveLinework (SlicerArgs &args)
 Main entry point that slices the specified models and writes the resulting linework into the output root model.
static constexpr StringView SliceTypeName ()
 Returns the identifier string used to tag polyline slice operations.

Static Protected Member Functions

static void AddVertices (Geometry &geo, const SlicePlane &plane, const Matrix< fltp08 > &mat)
 Adds the vertices from a SlicePlane into a Geometry object, applying the given transformation matrix.
static void FinishSegmenting (const Matrix< fltp08 > &transform, Model &model, uint04 slice_index, PolylineSliceCache &params)
 Finalizes segmenting for a slice by organizing polyline segments and writing them into the output model geometry.
static void PreparePointCache (const Matrix< fltp08 > &transform, const Model &model, PolylineSliceCache &params)
 Extracts and transforms points from a Model into the slice cache and builds the point spatial index.
static void PrepareTriCache (const Matrix< fltp08 > &transform, const Geometry &geo, PolylineSliceCache &params)
 Extracts and transforms triangles from a Geometry object into the slice cache and builds the triangle spatial index.
static void SliceIntoLineSegments (uint04 slice_index, PolylineSliceCache &args)
 Performs plane-triangle intersection for a single slice, producing polyline segments.
static void SliceIntoNearPoints (uint04 slice_index, PolylineSliceCache &args, fltp08 point_distance)
 Collects points near a slice plane within the configured distance threshold.

Detailed Description

Logic for slicing one or more Model/Geometry objects into polyline cross-section Model/Geometry objects based on configured slice criteria.


Provides static methods to orchestrate the full slicing pipeline: preparing geometry caches, performing plane-triangle intersections, collecting nearby points, and writing the results into output models.

Definition at line 171 of file PolylineSlicer.h.

Member Function Documentation

◆ AddVertices()

void PolylineSlicer::AddVertices ( Geometry & geo,
const SlicePlane & plane,
const Matrix< fltp08 > & mat )
staticprotected

Adds the vertices from a SlicePlane into a Geometry object, applying the given transformation matrix.

Parameters
[in]geoThe target geometry to add vertices to
[in]planeThe slice plane containing the vertices to add
[in]matThe transformation matrix to apply to the vertices

◆ CreateActiveLinework()

void PolylineSlicer::CreateActiveLinework ( SlicerArgs & args)
static

Main entry point that slices the specified models and writes the resulting linework into the output root model.

Parameters
[in]argsThe slicing arguments including models, iterator, and options

◆ FinishSegmenting()

void PolylineSlicer::FinishSegmenting ( const Matrix< fltp08 > & transform,
Model & model,
uint04 slice_index,
PolylineSliceCache & params )
staticprotected

Finalizes segmenting for a slice by organizing polyline segments and writing them into the output model geometry.

Parameters
[in]transformThe transform to apply to the output
[in]modelThe output model to receive the slice geometry
[in]slice_indexIndex of the slice plane being finalized
[in]paramsThe slice cache containing the computed slice data

◆ PreparePointCache()

void PolylineSlicer::PreparePointCache ( const Matrix< fltp08 > & transform,
const Model & model,
PolylineSliceCache & params )
staticprotected

Extracts and transforms points from a Model into the slice cache and builds the point spatial index.

Parameters
[in]transformThe world transform to apply to the model
[in]modelThe source model to extract points from
[in]paramsThe slice cache to populate with point data

◆ PrepareTriCache()

void PolylineSlicer::PrepareTriCache ( const Matrix< fltp08 > & transform,
const Geometry & geo,
PolylineSliceCache & params )
staticprotected

Extracts and transforms triangles from a Geometry object into the slice cache and builds the triangle spatial index.

Parameters
[in]transformThe world transform to apply to the geometry
[in]geoThe source geometry to extract triangles from
[in]paramsThe slice cache to populate with triangle data

◆ SliceIntoLineSegments()

void PolylineSlicer::SliceIntoLineSegments ( uint04 slice_index,
PolylineSliceCache & args )
staticprotected

Performs plane-triangle intersection for a single slice, producing polyline segments.

Parameters
[in]slice_indexIndex of the slice plane to process within the cache
[in]argsThe slice cache containing triangles and spatial indices

◆ SliceIntoNearPoints()

void PolylineSlicer::SliceIntoNearPoints ( uint04 slice_index,
PolylineSliceCache & args,
fltp08 point_distance )
staticprotected

Collects points near a slice plane within the configured distance threshold.

Parameters
[in]slice_indexIndex of the slice plane to process within the cache
[in]argsThe slice cache containing points and spatial indices
[in]point_distanceMaximum distance from the plane for a point to be included

◆ SliceTypeName()

constexpr StringView PolylineSlicer::SliceTypeName ( )
inlinestaticconstexpr

Returns the identifier string used to tag polyline slice operations.

Returns
A compile-time StringView containing "polyline_slice"

Definition at line 185 of file PolylineSlicer.h.


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