UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::CADKernel::TSamplerBasedOnParametrizationAndChordError< PolylineType, PointType > Class Template Reference

#include <SamplerOnParam.h>

+ Inheritance diagram for UE::CADKernel::TSamplerBasedOnParametrizationAndChordError< PolylineType, PointType >:

Public Member Functions

 TSamplerBasedOnParametrizationAndChordError (const FLinearBoundary &InBoundary, double InMaxChordError, double InMaxParameterizationError, PolylineType &OutPolyline)
 
- Public Member Functions inherited from UE::CADKernel::TCurveSamplerAbstract< PolylineType, PointType >
 TCurveSamplerAbstract (const FLinearBoundary &InBoundary, PolylineType &OutPolyline, double InDesiredChordError)
 
virtual ~TCurveSamplerAbstract ()=default
 
virtual void Sample ()
 

Protected Member Functions

virtual int32 CheckSamplingError (int32 FirstIndex, int32 EndIndex) override
 
- Protected Member Functions inherited from UE::CADKernel::TCurveSamplerAbstract< PolylineType, PointType >
virtual void EvaluatesNewCandidatePoints ()=0
 
virtual void GetNotDerivableCoordinates (TArray< double > &OutNotDerivableCoordinates)
 
virtual void SamplingInitalizing ()
 
void RunSampling ()
 
bool AddIntermediateCoordinates (double UMin, double UMax, int32 PointNum)
 
void CompletesPolyline (int32 NeededPointNumber, int32 IntermediateIndex)
 
int32 GetFirstNeighbor (int32 NeighborIndex, const double StartCoordinate, const PolylineType &Points, const int32 Increment, double &NeighborCoordinate)
 
int32 CountOfNeededPointsToRespectChordError (const PointType &PointA, const PointType &PointB, double ChordError)
 
int32 CheckTangentError (const PointType &APoint, double ACoordinate, const PointType &BPoint, double BCoordinate, int32 FirstIndex, int32 EndIndex, int32 InStartSamplingSegmentIndex)
 

Protected Attributes

double DesiredParameterizationError
 
- Protected Attributes inherited from UE::CADKernel::TCurveSamplerAbstract< PolylineType, PointType >
FLinearBoundary Boundary
 
PolylineTypeSampling
 
PolylineType CandidatePoints
 
const TArray< double > & TmpPolylineCoordinates
 
const TArray< double > & SamplingCoordinates
 
TArray< charIsOptimalSegments
 
int32 StartSamplingSegmentIndex
 
int32 EndSamplingSegmentIndex
 
TSamplingPoint EndStudySegment
 
TArray< doubleNextCoordinates
 
double DesiredChordError
 

Constructor & Destructor Documentation

◆ TSamplerBasedOnParametrizationAndChordError()

template<typename PolylineType , typename PointType >
UE::CADKernel::TSamplerBasedOnParametrizationAndChordError< PolylineType, PointType >::TSamplerBasedOnParametrizationAndChordError ( const FLinearBoundary InBoundary,
double  InMaxChordError,
double  InMaxParameterizationError,
PolylineType OutPolyline 
)
inline

Member Function Documentation

◆ CheckSamplingError()

template<typename PolylineType , typename PointType >
virtual int32 UE::CADKernel::TSamplerBasedOnParametrizationAndChordError< PolylineType, PointType >::CheckSamplingError ( int32  FirstIndex,
int32  EndIndex 
)
inlineoverrideprotectedvirtual

This function check the chord error and the parametrization error

Chord error: Check the chord error of the AB segment for each point of TmpPoints between FirstIndex and EndIndex If the MaxChord is biggest to the DesiredChordError, an estimation of the needed point number to insert is done. This estimation is bases on the approximation of local curve radius (R) : R = square(L) / 8Sag L2 = sqrt(square(L1) * S2 / S1) S2 = S1 * square(L2 / L1)

Sag & Angle criterion.pdf https://docs.google.com/presentation/d/1bUnrRFWCW3sDn9ngb9ftfQS-2JxNJaUZlh783hZMMEw/edit?usp=sharing

Returns
the number of point to add after PointA to PointB to respect the chord error. if PointNum = 0, PointB is not necessary if PointNum = 1, PointB has to be add to respect the chord error and the segment AB is respecting the chord error if PointNum = 2, Point at FirstIndex and PointB have to be add to respect the chord error and both segments are respecting the chord error if PointNum > 2, Point at FirstIndex and PointB have to be add but at least (PointNum - 2) points have to be added in both segments to respect the chord error

Parametrization error: This function check that for inner point of the segment AB, point M(u) is near its approximation = A + AB * (u - uA) / (uB - uA) than the MaxAllowedError To Remove Chord error, M approximation is compare to the projection of M(u) on AB

Implements UE::CADKernel::TCurveSamplerAbstract< PolylineType, PointType >.

Member Data Documentation

◆ DesiredParameterizationError

template<typename PolylineType , typename PointType >
double UE::CADKernel::TSamplerBasedOnParametrizationAndChordError< PolylineType, PointType >::DesiredParameterizationError
protected

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