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

One closed, oriented polygon loop in a surface's parametric domain: outer loops wind counter-clockwise, holes clockwise. More...

#include <BoundedSurface.h>

Public Member Functions

int edgeCount () const
 
int storedIndexOfSource (int inputIndex) const
 The stored segment that came from input segment inputIndex, or -1 if there is none.
 
SurfaceEdge edge (int index) const
 
bool initialize (const std::vector< Vec2 > &inputVertices, WireRole wireRole, WireStatus &status, const ParametricMetric &metric={})
 Build and validate the wire from an implicitly closed vertex ring; metric turns separations into 3D lengths.
 
bool initializeFromEdges (const std::vector< SurfaceEdge > &edges, WireRole wireRole, WireStatus &status, const ParametricMetric &metric={}, double joinTolerance=kWireJoinTolerance)
 Build and validate the wire from an ordered edge list, joining within joinTolerance through metric, as CurveWire does.
 
double signedArea () const
 
void parametricBounds (Vec2 &lower, Vec2 &upper) const
 
std::vector< Vec2sampledBoundary () const
 The de-duplicated vertex ring, closed back to its first vertex.
 
WireClassification classify (const Vec2 &point, double band) const
 Classify against the polygon with an on-boundary half-width of band, in parametric units.
 
WireClassification classify (const Vec2 &point, const ParametricMetric &metric={}) const
 metric sizes the band only: a polygon is exact, so its band is the length floor.
 

Public Attributes

std::vector< Vec2vertices
 
WireRole role = WireRole::Outer
 
std::vector< intsourceEdge
 For each stored segment its input segment, or -1 once a vertex was dropped; sidecar v3 edge identities key on it.
 

Detailed Description

One closed, oriented polygon loop in a surface's parametric domain: outer loops wind counter-clockwise, holes clockwise.

Definition at line 434 of file BoundedSurface.h.

Member Function Documentation

◆ classify() [1/2]

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

metric sizes the band only: a polygon is exact, so its band is the length floor.

Definition at line 626 of file BoundedSurface.h.

◆ classify() [2/2]

WireClassification o2::cad::surface::SurfaceWire::classify ( const Vec2 point,
double  band 
) const
inline

Classify against the polygon with an on-boundary half-width of band, in parametric units.

Definition at line 602 of file BoundedSurface.h.

◆ edge()

SurfaceEdge o2::cad::surface::SurfaceWire::edge ( int  index) const
inline

Definition at line 454 of file BoundedSurface.h.

◆ edgeCount()

int o2::cad::surface::SurfaceWire::edgeCount ( ) const
inline

Definition at line 441 of file BoundedSurface.h.

◆ initialize()

bool o2::cad::surface::SurfaceWire::initialize ( const std::vector< Vec2 > &  inputVertices,
WireRole  wireRole,
WireStatus status,
const ParametricMetric metric = {} 
)
inline

Build and validate the wire from an implicitly closed vertex ring; metric turns separations into 3D lengths.

Definition at line 461 of file BoundedSurface.h.

◆ initializeFromEdges()

bool o2::cad::surface::SurfaceWire::initializeFromEdges ( const std::vector< SurfaceEdge > &  edges,
WireRole  wireRole,
WireStatus status,
const ParametricMetric metric = {},
double  joinTolerance = kWireJoinTolerance 
)
inline

Build and validate the wire from an ordered edge list, joining within joinTolerance through metric, as CurveWire does.

Definition at line 538 of file BoundedSurface.h.

◆ parametricBounds()

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

Accumulate this wire's vertices into a parametric axis-aligned bounding box. This is independent of any concrete surface so cylinders, spheres and cones can reuse it.

Definition at line 578 of file BoundedSurface.h.

◆ sampledBoundary()

std::vector< Vec2 > o2::cad::surface::SurfaceWire::sampledBoundary ( ) const
inline

The de-duplicated vertex ring, closed back to its first vertex.

Definition at line 589 of file BoundedSurface.h.

◆ signedArea()

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

Definition at line 565 of file BoundedSurface.h.

◆ storedIndexOfSource()

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

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

Definition at line 444 of file BoundedSurface.h.

Member Data Documentation

◆ role

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

Definition at line 436 of file BoundedSurface.h.

◆ sourceEdge

std::vector<int> o2::cad::surface::SurfaceWire::sourceEdge

For each stored segment its input segment, or -1 once a vertex was dropped; sidecar v3 edge identities key on it.

Definition at line 439 of file BoundedSurface.h.

◆ vertices

std::vector<Vec2> o2::cad::surface::SurfaceWire::vertices

Definition at line 435 of file BoundedSurface.h.


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