Project
Loading...
Searching...
No Matches
o2::cad::surface::CurveWire Struct Reference

One closed, oriented boundary loop of Curve2D segments: outer loops wind counter-clockwise, holes clockwise. More...

#include <BoundedSurface.h>

Public Member Functions

int storedIndexOfSource (int inputIndex) const
 The stored curve that came from input curve inputIndex, or -1 if there is none.
 
bool initialize (const std::vector< Curve2D > &inputCurves, WireRole wireRole, WireStatus &status, const ParametricMetric &metric={}, double joinTolerance=kWireJoinTolerance)
 Build and validate the wire from an ordered closed list of curves, joining within joinTolerance through metric.
 
void fillBSplineCaches () const
 Fill every B-spline's polyline cache now, so that const navigation queries only read it.
 
double representationTolerance () const
 The widest gap between the loop's representation and its boundary, in parametric units; 0 for lines and arcs.
 
void reverse ()
 Reverse the loop orientation in place (order and per-curve direction).
 
bool hasBSpline () const
 
double signedArea () const
 Exact signed area enclosed by the loop (positive when counter-clockwise).
 
void parametricBounds (Vec2 &lower, Vec2 &upper) const
 Add the loop's conservative extent, a B-spline's pole hull included, to a parametric bounding box.
 
void tightParametricBounds (Vec2 &lower, Vec2 &upper) const
 Add the loop's extent measured on the curves to a parametric bounding box; use it to reject a wire as too big.
 
double boundaryBand (double lengthFloor) const
 
WireClassification classify (const Vec2 &point, double lengthFloor) const
 Classify a point against the loop with band floor lengthFloor: Boundary within the band, else the crossing parity.
 
WireClassification classify (const Vec2 &point, const ParametricMetric &metric={}) const
 metric only sizes the on-boundary band; the winding count is topological.
 
std::vector< Vec2sampledBoundary (int segmentsPerArc=kArcSamples) const
 

Public Attributes

std::vector< Curve2Dcurves
 
WireRole role = WireRole::Outer
 
double mRepresentationTolerance = 0.
 The largest representationTolerance() over the curves, fixed when the curves are set.
 
std::vector< intsourceCurve
 For each stored curve its input index; reverse() is the only reordering, and sidecar v3 edge identities key on it.
 

Detailed Description

One closed, oriented boundary loop of Curve2D segments: outer loops wind counter-clockwise, holes clockwise.

Definition at line 1824 of file BoundedSurface.h.

Member Function Documentation

◆ boundaryBand()

double o2::cad::surface::CurveWire::boundaryBand ( double  lengthFloor) const
inline

Half-width of the on-boundary band in parametric units: the larger of the length floor and the representation tolerance. A degenerate metric (a pole, an apex) leaves only the representation term.

Definition at line 1963 of file BoundedSurface.h.

◆ classify() [1/2]

WireClassification o2::cad::surface::CurveWire::classify ( const Vec2 point,
const ParametricMetric metric = {} 
) const
inline

metric only sizes the on-boundary band; the winding count is topological.

Definition at line 1988 of file BoundedSurface.h.

◆ classify() [2/2]

WireClassification o2::cad::surface::CurveWire::classify ( const Vec2 point,
double  lengthFloor 
) const
inline

Classify a point against the loop with band floor lengthFloor: Boundary within the band, else the crossing parity.

Definition at line 1966 of file BoundedSurface.h.

◆ fillBSplineCaches()

void o2::cad::surface::CurveWire::fillBSplineCaches ( ) const
inline

Fill every B-spline's polyline cache now, so that const navigation queries only read it.

Definition at line 1901 of file BoundedSurface.h.

◆ hasBSpline()

bool o2::cad::surface::CurveWire::hasBSpline ( ) const
inline

True if any curve of the loop is a B-spline (whose trimmed-face capacity is only numerically integrated, so the owning surface must report capacityIsExact() == false).

Definition at line 1925 of file BoundedSurface.h.

◆ initialize()

bool o2::cad::surface::CurveWire::initialize ( const std::vector< Curve2D > &  inputCurves,
WireRole  wireRole,
WireStatus status,
const ParametricMetric metric = {},
double  joinTolerance = kWireJoinTolerance 
)
inline

Build and validate the wire from an ordered closed list of curves, joining within joinTolerance through metric.

Definition at line 1845 of file BoundedSurface.h.

◆ parametricBounds()

void o2::cad::surface::CurveWire::parametricBounds ( Vec2 lower,
Vec2 upper 
) const
inline

Add the loop's conservative extent, a B-spline's pole hull included, to a parametric bounding box.

Definition at line 1946 of file BoundedSurface.h.

◆ representationTolerance()

double o2::cad::surface::CurveWire::representationTolerance ( ) const
inline

The widest gap between the loop's representation and its boundary, in parametric units; 0 for lines and arcs.

Definition at line 1911 of file BoundedSurface.h.

◆ reverse()

void o2::cad::surface::CurveWire::reverse ( )
inline

Reverse the loop orientation in place (order and per-curve direction).

Definition at line 1914 of file BoundedSurface.h.

◆ sampledBoundary()

std::vector< Vec2 > o2::cad::surface::CurveWire::sampledBoundary ( int  segmentsPerArc = kArcSamples) const
inline

Ordered, closed boundary polyline; arcs are sampled into segmentsPerArc chords. This is a mesh-independent hook for visualization and tessellated fallback of curved boundaries.

Definition at line 1995 of file BoundedSurface.h.

◆ signedArea()

double o2::cad::surface::CurveWire::signedArea ( ) const
inline

Exact signed area enclosed by the loop (positive when counter-clockwise).

Definition at line 1936 of file BoundedSurface.h.

◆ storedIndexOfSource()

int o2::cad::surface::CurveWire::storedIndexOfSource ( int  inputIndex) const
inline

The stored curve that came from input curve inputIndex, or -1 if there is none.

Definition at line 1834 of file BoundedSurface.h.

◆ tightParametricBounds()

void o2::cad::surface::CurveWire::tightParametricBounds ( Vec2 lower,
Vec2 upper 
) const
inline

Add the loop's extent measured on the curves to a parametric bounding box; use it to reject a wire as too big.

Definition at line 1954 of file BoundedSurface.h.

Member Data Documentation

◆ curves

std::vector<Curve2D> o2::cad::surface::CurveWire::curves

Definition at line 1825 of file BoundedSurface.h.

◆ mRepresentationTolerance

double o2::cad::surface::CurveWire::mRepresentationTolerance = 0.

The largest representationTolerance() over the curves, fixed when the curves are set.

Definition at line 1828 of file BoundedSurface.h.

◆ role

WireRole o2::cad::surface::CurveWire::role = WireRole::Outer

Definition at line 1826 of file BoundedSurface.h.

◆ sourceCurve

std::vector<int> o2::cad::surface::CurveWire::sourceCurve

For each stored curve its input index; reverse() is the only reordering, and sidecar v3 edge identities key on it.

Definition at line 1831 of file BoundedSurface.h.


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