AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::quest::LinearizeCurves Class Reference

This class linearizes a vector of NURBSCurve objects into line segments stored in a mint mesh. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/main/src/axom/quest/LinearizeCurves.hpp>

Public Types

using NURBSCurve = axom::primal::NURBSCurve< double, 2 >
 
using CurveArrayView = axom::ArrayView< const NURBSCurve >
 
using SegmentMesh = mint::UnstructuredMesh< mint::SINGLE_SHAPE >
 

Public Member Functions

 LinearizeCurves ()=default
 
void setVertexWeldingThreshold (double thresh)
 Sets the threshold for welding vertices of adjacent Pieces of curves. More...
 
void getLinearMeshUniform (CurveArrayView curves, SegmentMesh *mesh, int segmentsPerKnotSpan) const
 Projects high-order NURBS contours onto a linear mesh using segmentsPerPiece linear segments per knot span of the contour. More...
 
void getLinearMeshNonUniform (CurveArrayView curves, SegmentMesh *mesh, double percentError) const
 Projects high-order NURBS contours onto a linear mesh using percentError to decide when to stop refinement. More...
 
double getRevolvedVolume (CurveArrayView curves, const numerics::Matrix< double > &transform) const
 Compute the revolved volume of the curves using quadrature. More...
 

Protected Member Functions

double revolvedVolume (const NURBSCurve &nurbs, const numerics::Matrix< double > &transform) const
 Compute the revolved volume of a single curve using quadrature. More...
 

Protected Attributes

double m_vertexWeldThreshold {1E-9}
 

Detailed Description

This class linearizes a vector of NURBSCurve objects into line segments stored in a mint mesh.

Member Typedef Documentation

◆ NURBSCurve

◆ CurveArrayView

◆ SegmentMesh

Constructor & Destructor Documentation

◆ LinearizeCurves()

axom::quest::LinearizeCurves::LinearizeCurves ( )
default

Member Function Documentation

◆ setVertexWeldingThreshold()

void axom::quest::LinearizeCurves::setVertexWeldingThreshold ( double  thresh)
inline

Sets the threshold for welding vertices of adjacent Pieces of curves.

References m_vertexWeldThreshold.

◆ getLinearMeshUniform()

void axom::quest::LinearizeCurves::getLinearMeshUniform ( CurveArrayView  curves,
SegmentMesh mesh,
int  segmentsPerKnotSpan 
) const

Projects high-order NURBS contours onto a linear mesh using segmentsPerPiece linear segments per knot span of the contour.

Knot spans are the sub-intervals within a spline

Parameters
[in]curvesAn array view of curves to linearize.
[in]meshThe mesh object that will contain the linearized line segments.
[in]segmentsPerKnotSpanThe number of segments to make per knot span.

◆ getLinearMeshNonUniform()

void axom::quest::LinearizeCurves::getLinearMeshNonUniform ( CurveArrayView  curves,
SegmentMesh mesh,
double  percentError 
) const

Projects high-order NURBS contours onto a linear mesh using percentError to decide when to stop refinement.

Parameters
[in]curvesAn array view of curves to linearize.
[in]meshThe mesh object that will contain the linearized line segments.
[in]percentErrorA percent of error that is acceptable to stop refinement.

◆ getRevolvedVolume()

double axom::quest::LinearizeCurves::getRevolvedVolume ( CurveArrayView  curves,
const numerics::Matrix< double > &  transform 
) const

Compute the revolved volume of the curves using quadrature.

Parameters
[in]curvesAn array view of curves to linearize.
[in]transformA 4x4 matrix transform to apply to the shape before computing the revolved volume.
Note
We compute revolved volume on the actual shapes so we can get a real revolved volume computed using the curve functions rather than relying on a linearized curve. The revolved volume is the volume enclosed by the surface of revolution when the shape is revolved about axis of revolution.
Returns
The revolved volume.

◆ revolvedVolume()

double axom::quest::LinearizeCurves::revolvedVolume ( const NURBSCurve nurbs,
const numerics::Matrix< double > &  transform 
) const
protected

Compute the revolved volume of a single curve using quadrature.

Parameters
[in]nurbs
[in]transformA 4x4 matrix transform to apply to the shape before computing the revolved volume.
Returns
The revolved volume.

Member Data Documentation

◆ m_vertexWeldThreshold

double axom::quest::LinearizeCurves::m_vertexWeldThreshold {1E-9}
protected

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