Project
Loading...
Searching...
No Matches
o2::cad::surface::PlanarBoundedSurface Class Referencefinal

#include <BoundedSurface.h>

Inherits o2::cad::surface::BoundedSurface.

Public Member Functions

bool initialize (const Vec3 &surfaceOrigin, const Vec3 &surfaceAxisU, const Vec3 &surfaceAxisV, const std::vector< Vec2 > &outerWireVertices, const std::vector< std::vector< Vec2 > > &innerWireVertices, std::string &errorMessage)
 
bool wasReoriented () const
 True if either the outer or any inner wire had to be re-oriented during initialization.
 
Vec3 toGlobal (const Vec2 &point) const
 
Vec2 toLocal (const Vec3 &point) const
 
double planeDistance (const Vec3 &point) const
 
bool containsLocal (const Vec2 &point, bool *boundary=nullptr) const
 
bool containsPointOnSurface (const Vec3 &point) const override
 True if the 3D point lies on the trimmed patch within tolerance.
 
void appendIntersections (const Vec3 &rayOrigin, const Vec3 &rayDirection, double minDistance, double maxDistance, std::vector< RayHit > &hits) const override
 Append every hit of the ray with the trimmed patch in [minDistance, maxDistance], with the outward normal; no tangential grazes.
 
double distanceSqToEdges (const Vec3 &point, const std::vector< Vec3 > &ring) const
 
double distanceSqToPatch (const Vec3 &point) const override
 Squared distance from a 3D point to the trimmed patch (used for Safety).
 
Vec3 normalAt (const Vec3 &) const override
 Outward-oriented normal at (or nearest to) the given point.
 
void conservativeBounds (Vec3 &lower, Vec3 &upper) const override
 Accumulate a conservative axis-aligned bounding box of the trimmed patch.
 
double area () const
 
void parametricMetric (const Vec2 &, double &gUU, double &gUV, double &gVV) const override
 Constant over the plane, with a cross term: the frame axes need be neither unit-length nor orthogonal.
 
double capacityContribution () const override
 Signed divergence-theorem contribution to the enclosed volume.
 
bool capacityIsExact () const override
 Whether capacityContribution() is analytically exact for this surface.
 
void appendDisplayMesh (std::vector< Vec3 > &vertices, std::vector< std::array< int, 3 > > &triangles) const override
 Append this patch's visualization triangulation (navigation must never depend on it).
 
void appendDirectedEdges (std::vector< std::pair< Vec3, Vec3 > > &edges) const override
 Append the 3D directed boundary edges of the patch, for solid-closure validation.
 
bool sampleTrimCurve (size_t index, std::vector< Vec3 > &samples) const override
 Sample trim curve index into 3D, in construction order; false when this face has no such curve.
 
- Public Member Functions inherited from o2::cad::surface::BoundedSurface
virtual ~BoundedSurface ()=default
 
virtual void appendCoverBoxes (std::vector< CoverBox > &boxes) const
 
double parametricLengthSqAt (const Vec2 &uv, const Vec2 &delta) const
 The 3D length squared spanned by a parametric displacement delta starting at uv.
 
virtual void appendRims (std::vector< SurfaceRim > &rims) const
 Append the trim boundary as rims, one polyline per loop; the default chains appendDirectedEdges().
 
void setBoundaryEdges (std::vector< BoundaryEdgeRef > refs)
 
const std::vector< BoundaryEdgeRef > & boundaryEdges () const
 

Additional Inherited Members

- Public Types inherited from o2::cad::surface::BoundedSurface
using CoverBox = std::pair< Vec3, Vec3 >
 One axis-aligned cover box of the sub-patch BVH, as a (lower corner, upper corner) pair.
 
- Protected Attributes inherited from o2::cad::surface::BoundedSurface
std::vector< BoundaryEdgeRefmBoundaryEdges
 

Detailed Description

A bounded planar surface: an infinite plane frame trimmed by one outer wire and optional inner (hole) wires expressed in the plane's local 2D coordinates.

Definition at line 2578 of file BoundedSurface.h.

Member Function Documentation

◆ appendDirectedEdges()

void o2::cad::surface::PlanarBoundedSurface::appendDirectedEdges ( std::vector< std::pair< Vec3, Vec3 > > &  edges) const
inlineoverridevirtual

Append the 3D directed boundary edges of the patch, for solid-closure validation.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2810 of file BoundedSurface.h.

◆ appendDisplayMesh()

void o2::cad::surface::PlanarBoundedSurface::appendDisplayMesh ( std::vector< Vec3 > &  vertices,
std::vector< std::array< int, 3 > > &  triangles 
) const
inlineoverridevirtual

Append this patch's visualization triangulation (navigation must never depend on it).

Implements o2::cad::surface::BoundedSurface.

Definition at line 2796 of file BoundedSurface.h.

◆ appendIntersections()

void o2::cad::surface::PlanarBoundedSurface::appendIntersections ( const Vec3 rayOrigin,
const Vec3 rayDirection,
double  minDistance,
double  maxDistance,
std::vector< RayHit > &  hits 
) const
inlineoverridevirtual

Append every hit of the ray with the trimmed patch in [minDistance, maxDistance], with the outward normal; no tangential grazes.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2709 of file BoundedSurface.h.

◆ area()

double o2::cad::surface::PlanarBoundedSurface::area ( ) const
inline

Definition at line 2777 of file BoundedSurface.h.

◆ capacityContribution()

double o2::cad::surface::PlanarBoundedSurface::capacityContribution ( ) const
inlineoverridevirtual

Signed divergence-theorem contribution to the enclosed volume.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2792 of file BoundedSurface.h.

◆ capacityIsExact()

bool o2::cad::surface::PlanarBoundedSurface::capacityIsExact ( ) const
inlineoverridevirtual

Whether capacityContribution() is analytically exact for this surface.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2794 of file BoundedSurface.h.

◆ conservativeBounds()

void o2::cad::surface::PlanarBoundedSurface::conservativeBounds ( Vec3 lower,
Vec3 upper 
) const
inlineoverridevirtual

Accumulate a conservative axis-aligned bounding box of the trimmed patch.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2755 of file BoundedSurface.h.

◆ containsLocal()

bool o2::cad::surface::PlanarBoundedSurface::containsLocal ( const Vec2 point,
bool *  boundary = nullptr 
) const
inline

Definition at line 2669 of file BoundedSurface.h.

◆ containsPointOnSurface()

bool o2::cad::surface::PlanarBoundedSurface::containsPointOnSurface ( const Vec3 point) const
inlineoverridevirtual

True if the 3D point lies on the trimmed patch within tolerance.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2701 of file BoundedSurface.h.

◆ distanceSqToEdges()

double o2::cad::surface::PlanarBoundedSurface::distanceSqToEdges ( const Vec3 point,
const std::vector< Vec3 > &  ring 
) const
inline

Definition at line 2728 of file BoundedSurface.h.

◆ distanceSqToPatch()

double o2::cad::surface::PlanarBoundedSurface::distanceSqToPatch ( const Vec3 point) const
inlineoverridevirtual

Squared distance from a 3D point to the trimmed patch (used for Safety).

Implements o2::cad::surface::BoundedSurface.

Definition at line 2738 of file BoundedSurface.h.

◆ initialize()

bool o2::cad::surface::PlanarBoundedSurface::initialize ( const Vec3 surfaceOrigin,
const Vec3 surfaceAxisU,
const Vec3 surfaceAxisV,
const std::vector< Vec2 > &  outerWireVertices,
const std::vector< std::vector< Vec2 > > &  innerWireVertices,
std::string &  errorMessage 
)
inline

Definition at line 2581 of file BoundedSurface.h.

◆ normalAt()

Vec3 o2::cad::surface::PlanarBoundedSurface::normalAt ( const Vec3 point) const
inlineoverridevirtual

Outward-oriented normal at (or nearest to) the given point.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2753 of file BoundedSurface.h.

◆ parametricMetric()

void o2::cad::surface::PlanarBoundedSurface::parametricMetric ( const Vec2 ,
double &  gUU,
double &  gUV,
double &  gVV 
) const
inlineoverridevirtual

Constant over the plane, with a cross term: the frame axes need be neither unit-length nor orthogonal.

Implements o2::cad::surface::BoundedSurface.

Definition at line 2787 of file BoundedSurface.h.

◆ planeDistance()

double o2::cad::surface::PlanarBoundedSurface::planeDistance ( const Vec3 point) const
inline

Definition at line 2667 of file BoundedSurface.h.

◆ sampleTrimCurve()

bool o2::cad::surface::PlanarBoundedSurface::sampleTrimCurve ( size_t  index,
std::vector< Vec3 > &  samples 
) const
inlineoverridevirtual

Sample trim curve index into 3D, in construction order; false when this face has no such curve.

Reimplemented from o2::cad::surface::BoundedSurface.

Definition at line 2825 of file BoundedSurface.h.

◆ toGlobal()

Vec3 o2::cad::surface::PlanarBoundedSurface::toGlobal ( const Vec2 point) const
inline

Definition at line 2653 of file BoundedSurface.h.

◆ toLocal()

Vec2 o2::cad::surface::PlanarBoundedSurface::toLocal ( const Vec3 point) const
inline

Definition at line 2658 of file BoundedSurface.h.

◆ wasReoriented()

bool o2::cad::surface::PlanarBoundedSurface::wasReoriented ( ) const
inline

True if either the outer or any inner wire had to be re-oriented during initialization.

Definition at line 2651 of file BoundedSurface.h.


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