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

#include <SamplerOnChord.h>

+ Inheritance diagram for UE::CADKernel::TSamplerBasedOnChordError< PointType >:

Public Member Functions

 TSamplerBasedOnChordError (const FLinearBoundary &InBoundary, double InMaxAllowedError, TPolyline< PointType > &OutPolyline)
 
- Public Member Functions inherited from UE::CADKernel::TCurveSamplerAbstract< TPolyline< PointType >, PointType >
 TCurveSamplerAbstract (const FLinearBoundary &InBoundary, TPolyline< PointType > &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< TPolyline< PointType >, 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 TPolyline< PointType > &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)
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ TSamplerBasedOnChordError()

template<class PointType >
UE::CADKernel::TSamplerBasedOnChordError< PointType >::TSamplerBasedOnChordError ( const FLinearBoundary InBoundary,
double  InMaxAllowedError,
TPolyline< PointType > &  OutPolyline 
)
inline

Member Function Documentation

◆ CheckSamplingError()

template<class PointType >
virtual int32 UE::CADKernel::TSamplerBasedOnChordError< PointType >::CheckSamplingError ( int32  FirstIndex,
int32  EndIndex 
)
inlineoverrideprotectedvirtual

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 In this case, a complementary check is done at each extremity to verify that the curve do not have a fast modification 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

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


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