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

A cone whose radius varies linearly with height, trimmed as the cylinder; one radius may be zero (an apex) and slope 0 is a cylinder. More...

#include <BoundedSurface.h>

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

Public Member Functions

bool initialize (const Vec3 &centerPoint, const Vec3 &axis, const Vec3 &referenceAxisU, double radiusAtMin, double radiusAtMax, double heightMin, double heightMax, double phiStart, double phiSweep, bool innerWall, std::string &errorMessage)
 
bool initialize (const Vec3 &centerPoint, const Vec3 &axis, const Vec3 &referenceAxisU, double radiusAtMin, double radiusAtMax, double heightMin, double heightMax, double phiStart, double phiSweep, bool innerWall, const std::vector< Curve2D > &outerTrim, const std::vector< std::vector< Curve2D > > &innerTrims, std::string &errorMessage, double joinTolerance=kWireJoinTolerance)
 Wire-trimmed overload: the scalar radii pin r(h); the wires in the (phi[rad], h[cm]) domain decide containment.
 
bool hasWireTrim () const
 
bool pointInTrim (double phi, double height, bool *boundary=nullptr) const
 True if the (phi, h) point lies in the trim wire (phi unwrapped into the wire window).
 
bool fullSweep () const
 
double radiusAt (double height) const
 
double meanRadius () const
 
Vec3 toLocal (const Vec3 &point) const
 
bool heightInRange (double height) const
 
bool phiInSweep (double phi) const
 
Vec3 pointAt (double phi, double height) 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 distanceSqToPatch (const Vec3 &point) const override
 Distance to the patch: exact for the parametric rectangle, a lower bound for a wire trim.
 
Vec3 normalAt (const Vec3 &point) const override
 Outward-oriented normal at (or nearest to) the given point.
 
void parametricMetric (const Vec2 &uv, double &gUU, double &gUV, double &gVV) const override
 (u, v) = (phi[rad], h[cm]): the azimuthal scale is the local radius, and a step in h spans sqrt(1 + slope^2).
 
double capacityContribution () const override
 Divergence-theorem contribution over the (phi, h) rectangle; a wire trim uses the contour form, as for the cylinder.
 
bool capacityIsExact () const override
 Whether capacityContribution() is analytically exact for this surface.
 
void conservativeBounds (Vec3 &lower, Vec3 &upper) const override
 Accumulate a conservative axis-aligned bounding box of the trimmed patch.
 
void appendCoverBoxes (std::vector< CoverBox > &boxes) const override
 Cover boxes: as for the cylinder, with the rim radii from the linear radius law.
 
int rimSegments () const
 
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
 
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< BoundaryEdgeRef > mBoundaryEdges
 

Detailed Description

A cone whose radius varies linearly with height, trimmed as the cylinder; one radius may be zero (an apex) and slope 0 is a cylinder.

Definition at line 4095 of file BoundedSurface.h.

Member Function Documentation

◆ appendCoverBoxes()

void o2::cad::surface::ConicalBoundedSurface::appendCoverBoxes ( std::vector< CoverBox > &  boxes) const
inlineoverridevirtual

Cover boxes: as for the cylinder, with the rim radii from the linear radius law.

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

Definition at line 4374 of file BoundedSurface.h.

◆ appendDirectedEdges()

void o2::cad::surface::ConicalBoundedSurface::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 4410 of file BoundedSurface.h.

◆ appendDisplayMesh()

void o2::cad::surface::ConicalBoundedSurface::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 4385 of file BoundedSurface.h.

◆ appendIntersections()

void o2::cad::surface::ConicalBoundedSurface::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 4217 of file BoundedSurface.h.

◆ capacityContribution()

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

Divergence-theorem contribution over the (phi, h) rectangle; a wire trim uses the contour form, as for the cylinder.

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

Definition at line 4326 of file BoundedSurface.h.

◆ capacityIsExact()

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

Whether capacityContribution() is analytically exact for this surface.

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

Definition at line 4348 of file BoundedSurface.h.

◆ conservativeBounds()

void o2::cad::surface::ConicalBoundedSurface::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 4350 of file BoundedSurface.h.

◆ containsPointOnSurface()

bool o2::cad::surface::ConicalBoundedSurface::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 4198 of file BoundedSurface.h.

◆ distanceSqToPatch()

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

Distance to the patch: exact for the parametric rectangle, a lower bound for a wire trim.

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

Definition at line 4290 of file BoundedSurface.h.

◆ fullSweep()

bool o2::cad::surface::ConicalBoundedSurface::fullSweep ( ) const
inline

Definition at line 4171 of file BoundedSurface.h.

◆ hasWireTrim()

bool o2::cad::surface::ConicalBoundedSurface::hasWireTrim ( ) const
inline

Definition at line 4162 of file BoundedSurface.h.

◆ heightInRange()

bool o2::cad::surface::ConicalBoundedSurface::heightInRange ( double  height) const
inline

Definition at line 4183 of file BoundedSurface.h.

◆ initialize() [1/2]

bool o2::cad::surface::ConicalBoundedSurface::initialize ( const Vec3 &  centerPoint,
const Vec3 &  axis,
const Vec3 &  referenceAxisU,
double  radiusAtMin,
double  radiusAtMax,
double  heightMin,
double  heightMax,
double  phiStart,
double  phiSweep,
bool  innerWall,
const std::vector< Curve2D > &  outerTrim,
const std::vector< std::vector< Curve2D > > &  innerTrims,
std::string &  errorMessage,
double  joinTolerance = kWireJoinTolerance 
)
inline

Wire-trimmed overload: the scalar radii pin r(h); the wires in the (phi[rad], h[cm]) domain decide containment.

Definition at line 4138 of file BoundedSurface.h.

◆ initialize() [2/2]

bool o2::cad::surface::ConicalBoundedSurface::initialize ( const Vec3 &  centerPoint,
const Vec3 &  axis,
const Vec3 &  referenceAxisU,
double  radiusAtMin,
double  radiusAtMax,
double  heightMin,
double  heightMax,
double  phiStart,
double  phiSweep,
bool  innerWall,
std::string &  errorMessage 
)
inline

Definition at line 4098 of file BoundedSurface.h.

◆ meanRadius()

double o2::cad::surface::ConicalBoundedSurface::meanRadius ( ) const
inline

Definition at line 4175 of file BoundedSurface.h.

◆ normalAt()

Vec3 o2::cad::surface::ConicalBoundedSurface::normalAt ( const Vec3 &  point) const
inlineoverridevirtual

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

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

Definition at line 4306 of file BoundedSurface.h.

◆ parametricMetric()

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

(u, v) = (phi[rad], h[cm]): the azimuthal scale is the local radius, and a step in h spans sqrt(1 + slope^2).

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

Definition at line 4320 of file BoundedSurface.h.

◆ phiInSweep()

bool o2::cad::surface::ConicalBoundedSurface::phiInSweep ( double  phi) const
inline

Definition at line 4188 of file BoundedSurface.h.

◆ pointAt()

Vec3 o2::cad::surface::ConicalBoundedSurface::pointAt ( double  phi,
double  height 
) const
inline

Definition at line 4193 of file BoundedSurface.h.

◆ pointInTrim()

bool o2::cad::surface::ConicalBoundedSurface::pointInTrim ( double  phi,
double  height,
bool *  boundary = nullptr 
) const
inline

True if the (phi, h) point lies in the trim wire (phi unwrapped into the wire window).

Definition at line 4165 of file BoundedSurface.h.

◆ radiusAt()

double o2::cad::surface::ConicalBoundedSurface::radiusAt ( double  height) const
inline

Definition at line 4173 of file BoundedSurface.h.

◆ rimSegments()

int o2::cad::surface::ConicalBoundedSurface::rimSegments ( ) const
inline

Definition at line 4380 of file BoundedSurface.h.

◆ sampleTrimCurve()

bool o2::cad::surface::ConicalBoundedSurface::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 4445 of file BoundedSurface.h.

◆ toLocal()

Vec3 o2::cad::surface::ConicalBoundedSurface::toLocal ( const Vec3 &  point) const
inline

Definition at line 4177 of file BoundedSurface.h.


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