UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::CADKernel::FTopologicalLoop Class Reference

#include <TopologicalLoop.h>

+ Inheritance diagram for UE::CADKernel::FTopologicalLoop:

Public Member Functions

virtual ~FTopologicalLoop () override
 
virtual void Empty () override
 
void DeleteLoopEdges ()
 
virtual void Serialize (FCADKernelArchive &Ar) override
 
virtual void SpawnIdent (FDatabase &Database) override
 
virtual void ResetMarkersRecursively () const override
 
virtual EEntity GetEntityType () const override
 
double Length () const
 
const int32 EdgeCount () const
 
const TArray< FOrientedEdge > & GetEdges () const
 
TArray< FOrientedEdge > & GetEdges ()
 
const FOrientedEdgeGetOrientedEdge (const FTopologicalEdge *InEdge) const
 
void GetActiveEdges (TArray< TSharedPtr< FTopologicalEdge > > &OutEdges) const
 
FTopologicalFaceGetFace () const
 
bool IsExternal () const
 
void SetExternal ()
 
void SetInternal ()
 
bool Orient ()
 
void SwapOrientation ()
 
void ReplaceEdge (TSharedPtr< FTopologicalEdge > &OldEdge, TSharedPtr< FTopologicalEdge > &NewEdge)
 
void ReplaceEdge (TSharedPtr< FTopologicalEdge > &Edge, TArray< TSharedPtr< FTopologicalEdge > > &NewEdges)
 
void ReplaceEdges (TArray< FOrientedEdge > &Candidates, TSharedPtr< FTopologicalEdge > &NewEdge)
 
void SplitEdge (FTopologicalEdge &Edge, TSharedPtr< FTopologicalEdge > NewEdge, bool bNewEdgeIsFirst)
 
void RemoveEdge (TSharedPtr< FTopologicalEdge > &Edge)
 
EOrientation GetDirection (TSharedPtr< FTopologicalEdge > &Edge, bool bAllowLinkedEdge=false) const
 
EOrientation GetDirection (int32 Index) const
 
const TSharedPtr< FTopologicalEdge > & GetEdge (int32 Index) const
 
int32 GetEdgeIndex (const FTopologicalEdge &Edge) const
 
void Get2DSampling (TArray< FVector2d > &LoopSampling) const
 
bool Get2DSamplingWithoutDegeneratedEdges (TArray< FVector2d > &LoopSampling) const
 
void FindSurfaceCorners (TArray< TSharedPtr< FTopologicalVertex > > &OutCorners, TArray< int32 > &OutStartSideIndex) const
 
void FindBreaks (TArray< TSharedPtr< FTopologicalVertex > > &Ruptures, TArray< int32 > &OutStartSideIndex, TArray< double > &RuptureValues) const
 
void ComputeBoundaryProperties (const TArray< int32 > &StartSideIndex, TArray< FEdge2DProperties > &OutSideProperties) const
 
void EnsureLogicalClosing (const double GeometricTolerance)
 
void CheckEdgesOrientation ()
 
void CheckLoopWithTwoEdgesOrientation ()
 
void RemoveDegeneratedEdges ()
 
bool IsInside (const FTopologicalLoop &Other) const
 
- Public Member Functions inherited from UE::CADKernel::FTopologicalEntity
FIdent GetKioId () const
 
const bool IsApplyCriteria () const
 
virtual void SetApplyCriteriaMarker () const
 
virtual void ResetApplyCriteria ()
 
bool IsNotMeshable () const
 
bool IsMeshable () const
 
bool IsPreMeshed () const
 
bool IsMeshed () const
 
virtual void SetPreMeshedMarker ()
 
virtual void SetMeshedMarker ()
 
virtual void ResetPreMeshed ()
 
- Public Member Functions inherited from UE::CADKernel::FEntity
virtual ~FEntity ()
 
virtual void Delete ()
 
bool IsTopologicalEntity () const
 
bool IsTopologicalShapeEntity () const
 
bool IsGeometricalEntity ()
 
const TCHARGetTypeName () const
 
const FIdentGetId () const
 
- Public Member Functions inherited from TSharedFromThis< FEntity >
TSharedRef< FEntity, Mode > AsShared ()
 
TSharedRef< FEntity const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FEntity, Mode > AsWeak ()
 
TWeakPtr< FEntity const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 
- Public Member Functions inherited from UE::CADKernel::FHaveStates
 FHaveStates ()
 
void Serialize (FCADKernelArchive &Ar)
 
void ResetElementStatus ()
 
bool HasMarker1 () const
 
bool HasMarker2 () const
 
bool HasMarker1And2 () const
 
bool HasMarker1Or2 () const
 
void SetMarker1 () const
 
void SetMarker2 () const
 
void ResetMarker1 () const
 
void ResetMarker2 () const
 
void ResetMarkers () const
 
bool IsDeleted () const
 
void SetDeletedMarker () const
 
void ResetDeleted () const
 
virtual bool IsDeletedOrDegenerated () const
 
virtual bool IsDegenerated () const
 
virtual void SetAsDegenerated () const
 
virtual void ResetDegenerated () const
 
void SetWaitingMarker () const
 
void ResetWaitingMarker () const
 
virtual bool IsWaiting () const
 
void SetProcessedMarker () const
 
void ResetProcessedMarker () const
 
virtual bool IsProcessed () const
 
virtual bool IsProcessedDeletedOrDegenerated () const
 
void SetToProcessMarker () const
 
void ResetToProcessMarker () const
 
virtual bool IsToProcess () const
 
virtual bool IsNotToProcess () const
 
virtual bool IsNotToOrAlreadyProcess () const
 

Static Public Member Functions

static TSharedPtr< FTopologicalLoopMake (const TArray< TSharedPtr< FTopologicalEdge > > &EdgeList, const TArray< EOrientation > &EdgeDirections, const bool bIsExternalLoop, const double GeometricTolerance)
 
- Static Public Member Functions inherited from UE::CADKernel::FEntity
template<typename OtherEntity , typename... InArgTypes>
static TSharedRef< OtherEntity > MakeShared (InArgTypes &&... Args)
 
template<typename OtherEntity >
static TSharedRef< OtherEntity > MakeShared (FCADKernelArchive &Archive)
 
static void SerializeIdent (FCADKernelArchive &Ar, TSharedPtr< FEntity > &Entity, bool bSaveSelection=true)
 
static void SerializeIdent (FCADKernelArchive &Ar, TWeakPtr< FEntity > &Entity, bool bSaveSelection=true)
 
static void SerializeIdent (FCADKernelArchive &Ar, FEntity **Entity, bool bSaveSelection=true)
 
template<typename EntityType >
static void SerializeIdent (FCADKernelArchive &Ar, EntityType **Entity, bool bSaveSelection=true)
 
template<typename EntityType >
static void SerializeIdent (FCADKernelArchive &Ar, TSharedPtr< EntityType > &Entity, bool bSaveSelection=true)
 
template<typename EntityType >
static void SerializeIdent (FCADKernelArchive &Ar, TWeakPtr< EntityType > &Entity, bool bSaveSelection=true)
 
static void SerializeIdents (FCADKernelArchive &Ar, TArray< FEntity * > &Array, bool bSaveSelection=true)
 
static void SerializeIdents (FCADKernelArchive &Ar, TArray< TWeakPtr< FEntity > > &Array, bool bSaveSelection=true)
 
static void SerializeIdents (FCADKernelArchive &Ar, TArray< TSharedPtr< FEntity > > &Array, bool bSaveSelection=true)
 
static void SerializeIdents (FCADKernelArchive &Ar, TArray< TOrientedEntity< FEntity > > &Array)
 
template<typename EntityType >
static void SerializeIdents (FCADKernelArchive &Ar, TArray< EntityType * > &Array, bool bSaveSelection=true)
 
template<typename EntityType >
static void SerializeIdents (FCADKernelArchive &Ar, TArray< TWeakPtr< EntityType > > &Array, bool bSaveSelection=true)
 
template<typename EntityType >
static void SerializeIdents (FCADKernelArchive &Ar, TArray< TSharedPtr< EntityType > > &Array, bool bSaveSelection=true)
 
static void SpawnIdentOnEntities (TArray< FEntity * > &Array, FDatabase &Database)
 
static void SpawnIdentOnEntities (TArray< TSharedPtr< FEntity > > &Array, FDatabase &Database)
 
static void SpawnIdentOnEntities (TArray< TOrientedEntity< FEntity > > &Array, FDatabase &Database)
 
template<typename EntityType >
static void SpawnIdentOnEntities (TArray< TSharedPtr< EntityType > > &Array, FDatabase &Database)
 
static void ResetMarkersRecursivelyOnEntities (const TArray< FEntity * > &Array)
 
static void ResetMarkersRecursivelyOnEntities (const TArray< TWeakPtr< FEntity > > &Array)
 
static void ResetMarkersRecursivelyOnEntities (const TArray< TSharedPtr< FEntity > > &Array)
 
static void ResetMarkersRecursivelyOnEntities (const TArray< TOrientedEntity< FEntity > > &Array)
 
template<typename EntityType >
static void ResetMarkersRecursivelyOnEntities (const TArray< TSharedPtr< EntityType > > &Array)
 
static TSharedPtr< FEntityDeserialize (FCADKernelArchive &Ar)
 
static const TCHARGetTypeName (EEntity Type)
 

Public Attributes

FSurfacicBoundary Boundary
 

Protected Member Functions

 FTopologicalLoop (const TArray< TSharedPtr< FTopologicalEdge > > &Edges, const TArray< EOrientation > &EdgeDirections, const bool bIsEternalLoop)
 
 FTopologicalLoop ()=default
 
- Protected Member Functions inherited from UE::CADKernel::FEntity
bool SetId (FDatabase &Database)
 
- Protected Member Functions inherited from TSharedFromThis< FEntity >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

TArray< FOrientedEdgeEdges
 
FTopologicalFaceFace
 
bool bIsExternal
 
- Protected Attributes inherited from UE::CADKernel::FTopologicalEntity
FIdent CtKioId = 0
 
- Protected Attributes inherited from UE::CADKernel::FEntity
FIdent Id = 0
 
- Protected Attributes inherited from UE::CADKernel::FHaveStates
EHaveStates States
 

Friends

class FEntity
 
class FTopologicalFace
 
class FTopologicalEdge
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< FEntity >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 
- Static Protected Attributes inherited from UE::CADKernel::FEntity
static const TCHARTypesNames []
 

Constructor & Destructor Documentation

◆ FTopologicalLoop() [1/2]

UE::CADKernel::FTopologicalLoop::FTopologicalLoop ( const TArray< TSharedPtr< FTopologicalEdge > > &  Edges,
const TArray< EOrientation > &  EdgeDirections,
const bool  bIsEternalLoop 
)
protected

◆ FTopologicalLoop() [2/2]

UE::CADKernel::FTopologicalLoop::FTopologicalLoop ( )
protecteddefault

◆ ~FTopologicalLoop()

virtual UE::CADKernel::FTopologicalLoop::~FTopologicalLoop ( )
inlineoverridevirtual

Member Function Documentation

◆ CheckEdgesOrientation()

void UE::CADKernel::FTopologicalLoop::CheckEdgesOrientation ( )

◆ CheckLoopWithTwoEdgesOrientation()

void UE::CADKernel::FTopologicalLoop::CheckLoopWithTwoEdgesOrientation ( )

◆ ComputeBoundaryProperties()

void UE::CADKernel::FTopologicalLoop::ComputeBoundaryProperties ( const TArray< int32 > &  StartSideIndex,
TArray< FEdge2DProperties > &  OutSideProperties 
) const

◆ DeleteLoopEdges()

void UE::CADKernel::FTopologicalLoop::DeleteLoopEdges ( )

◆ EdgeCount()

const int32 UE::CADKernel::FTopologicalLoop::EdgeCount ( ) const
inline

◆ Empty()

virtual void UE::CADKernel::FTopologicalLoop::Empty ( )
inlineoverridevirtual

Reimplemented from UE::CADKernel::FEntity.

◆ EnsureLogicalClosing()

void UE::CADKernel::FTopologicalLoop::EnsureLogicalClosing ( const double  GeometricTolerance)

◆ FindBreaks()

void UE::CADKernel::FTopologicalLoop::FindBreaks ( TArray< TSharedPtr< FTopologicalVertex > > &  Ruptures,
TArray< int32 > &  OutStartSideIndex,
TArray< double > &  RuptureValues 
) const

◆ FindSurfaceCorners()

void UE::CADKernel::FTopologicalLoop::FindSurfaceCorners ( TArray< TSharedPtr< FTopologicalVertex > > &  OutCorners,
TArray< int32 > &  OutStartSideIndex 
) const

◆ Get2DSampling()

void UE::CADKernel::FTopologicalLoop::Get2DSampling ( TArray< FVector2d > &  LoopSampling) const

◆ Get2DSamplingWithoutDegeneratedEdges()

bool UE::CADKernel::FTopologicalLoop::Get2DSamplingWithoutDegeneratedEdges ( TArray< FVector2d > &  LoopSampling) const

The idea is to remove degenerated edges of the loop i.e. where the surface is degenerated

  • so where projections on these area are hazardous
  • so where 2d curve computation based on hazardous projection is hazardous...
  • so where the sampling could be in self-intersecting
    Returns
    false if the loop is degenerated

◆ GetActiveEdges()

void UE::CADKernel::FTopologicalLoop::GetActiveEdges ( TArray< TSharedPtr< FTopologicalEdge > > &  OutEdges) const
inline

Add active Edge that has not marker 1 in the edge array. Marker 1 has to be reset at the end.

◆ GetDirection() [1/2]

EOrientation UE::CADKernel::FTopologicalLoop::GetDirection ( int32  Index) const
inline

◆ GetDirection() [2/2]

EOrientation UE::CADKernel::FTopologicalLoop::GetDirection ( TSharedPtr< FTopologicalEdge > &  Edge,
bool  bAllowLinkedEdge = false 
) const

◆ GetEdge()

const TSharedPtr< FTopologicalEdge > & UE::CADKernel::FTopologicalLoop::GetEdge ( int32  Index) const
inline

◆ GetEdgeIndex()

int32 UE::CADKernel::FTopologicalLoop::GetEdgeIndex ( const FTopologicalEdge Edge) const
inline

◆ GetEdges() [1/2]

TArray< FOrientedEdge > & UE::CADKernel::FTopologicalLoop::GetEdges ( )
inline

◆ GetEdges() [2/2]

const TArray< FOrientedEdge > & UE::CADKernel::FTopologicalLoop::GetEdges ( ) const
inline

◆ GetEntityType()

virtual EEntity UE::CADKernel::FTopologicalLoop::GetEntityType ( ) const
inlineoverridevirtual

◆ GetFace()

FTopologicalFace * UE::CADKernel::FTopologicalLoop::GetFace ( ) const
inline

◆ GetOrientedEdge()

const FOrientedEdge * UE::CADKernel::FTopologicalLoop::GetOrientedEdge ( const FTopologicalEdge InEdge) const
inline

◆ IsExternal()

bool UE::CADKernel::FTopologicalLoop::IsExternal ( ) const
inline

◆ IsInside()

bool UE::CADKernel::FTopologicalLoop::IsInside ( const FTopologicalLoop Other) const

◆ Length()

double UE::CADKernel::FTopologicalLoop::Length ( ) const

◆ Make()

TSharedPtr< FTopologicalLoop > UE::CADKernel::FTopologicalLoop::Make ( const TArray< TSharedPtr< FTopologicalEdge > > &  EdgeList,
const TArray< EOrientation > &  EdgeDirections,
const bool  bIsExternalLoop,
const double  GeometricTolerance 
)
static

◆ Orient()

bool UE::CADKernel::FTopologicalLoop::Orient ( )

To check loop orientation, we check the orientation of the extremity points i.e. "o" points below

              o
             / \
            /   \
           o     o
            \   /
             \ /
              o

For these points, the slop is compute. If the slop is between 0 and 4, the loop at the point is well oriented otherwise not

The difficulties start when the slop is closed to 0 or 4 i.e.

-----o-----

| |

In this case, the orientation of the next segment is compare to the bounding box

The last very difficult case is a sharp case i.e. The slop is closed to 0 or 8, so it could be a pick in self intersecting. We try to recompute the slop a the closed point


| o—O | O
| / | /
| o => | o
| | | |

If the slop is still closed to 0 or 8, the point is "UndefinedOrientation" This case was found in the shape of char '1'

Returns
false if the orientation is doubtful

◆ RemoveDegeneratedEdges()

void UE::CADKernel::FTopologicalLoop::RemoveDegeneratedEdges ( )

◆ RemoveEdge()

void UE::CADKernel::FTopologicalLoop::RemoveEdge ( TSharedPtr< FTopologicalEdge > &  Edge)

◆ ReplaceEdge() [1/2]

void UE::CADKernel::FTopologicalLoop::ReplaceEdge ( TSharedPtr< FTopologicalEdge > &  Edge,
TArray< TSharedPtr< FTopologicalEdge > > &  NewEdges 
)

◆ ReplaceEdge() [2/2]

void UE::CADKernel::FTopologicalLoop::ReplaceEdge ( TSharedPtr< FTopologicalEdge > &  OldEdge,
TSharedPtr< FTopologicalEdge > &  NewEdge 
)

◆ ReplaceEdges()

void UE::CADKernel::FTopologicalLoop::ReplaceEdges ( TArray< FOrientedEdge > &  Candidates,
TSharedPtr< FTopologicalEdge > &  NewEdge 
)

◆ ResetMarkersRecursively()

virtual void UE::CADKernel::FTopologicalLoop::ResetMarkersRecursively ( ) const
inlineoverridevirtual

Reimplemented from UE::CADKernel::FEntity.

◆ Serialize()

virtual void UE::CADKernel::FTopologicalLoop::Serialize ( FCADKernelArchive Ar)
inlineoverridevirtual

Serialization of a FEntity. Each class derived from FEntity has to override this method (and call the direct base class override method first) E.g. class FEntityXXX : public FEntityXX { virtual void Serialize(FCADKernelArchive& Ar) override { FEntityXX::Serialize(Ar); ... } }

Reimplemented from UE::CADKernel::FTopologicalEntity.

◆ SetExternal()

void UE::CADKernel::FTopologicalLoop::SetExternal ( )
inline

◆ SetInternal()

void UE::CADKernel::FTopologicalLoop::SetInternal ( )
inline

◆ SpawnIdent()

virtual void UE::CADKernel::FTopologicalLoop::SpawnIdent ( FDatabase Database)
inlineoverridevirtual

Reimplemented from UE::CADKernel::FEntity.

◆ SplitEdge()

void UE::CADKernel::FTopologicalLoop::SplitEdge ( FTopologicalEdge Edge,
TSharedPtr< FTopologicalEdge NewEdge,
bool  bNewEdgeIsFirst 
)

The Edge is split in two edges : Edge + NewEdge

Parameters
bNewEdgeIsFirst== true => StartVertex Connected to Edge, EndVertexConnected to NewEdge According to the direction of Edge, if bNewEdgeIsFirst == true, NewEdge is added in the loop after (EOrientation::Front) or before (EOrientation::Back)

◆ SwapOrientation()

void UE::CADKernel::FTopologicalLoop::SwapOrientation ( )

Friends And Related Symbol Documentation

◆ FEntity

friend class FEntity
friend

◆ FTopologicalEdge

friend class FTopologicalEdge
friend

◆ FTopologicalFace

Member Data Documentation

◆ bIsExternal

bool UE::CADKernel::FTopologicalLoop::bIsExternal
protected

◆ Boundary

FSurfacicBoundary UE::CADKernel::FTopologicalLoop::Boundary

◆ Edges

TArray<FOrientedEdge> UE::CADKernel::FTopologicalLoop::Edges
protected

◆ Face

FTopologicalFace* UE::CADKernel::FTopologicalLoop::Face
protected

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