5#include "Core/Factory.h"
18class FIsoTriangulator;
20class FMeshingTolerances;
22namespace LoopCleanerImpl
82 if (!NodesOfLoop[
Index]->IsDelete())
84 NodesOfLoop[NewIndex++] = NodesOfLoop[
Index];
87 NodesOfLoop.
SetNum(NewIndex);
121 int32 NodesOfLoopCount;
124 int32 StartSegmentIndex;
133 int32 NextLoopFirstSegmentIndex;
135 bool bLoopOrientation;
159 void FindBestLoopExtremity();
168 bool RemoveLoopPicks();
172 bool FindAndRemoveCoincidence(
FLoopNode*& StartNode);
217 void FindLoopIntersections();
222 bool RemoveSelfIntersectionsOfLoop();
254 void FixLoopOrientation();
319 bool CheckMainLoopConsistency();
323 while (
Index >= NodesOfLoopCount)
325 Index -= NodesOfLoopCount;
343 return FitSegmentIndex(StartIndex);
349 return FitNodeIndex(StartIndex);
354 while (
Index >= NodesOfLoopCount)
356 Index -= NodesOfLoopCount;
363 while (
Index >= NextLoopFirstSegmentIndex)
365 Index -= SegmentCount;
377 for (Node = GetNext(Node); Node != StartNode; Node = GetNext(Node))
383 bool UpdateNodesOfLoop()
386 NodesOfLoopCount = NodesOfLoop.
Num();
387 if (NodesOfLoopCount < 3)
404 NextLoopFirstSegmentIndex = LoopSegments.
Num();
406 SegmentCount = NextLoopFirstSegmentIndex - StartSegmentIndex;
412 NextLoopFirstSegmentIndex--;
416#ifdef CADKERNEL_DEBUG
421 F3DDebugSession _(FString::Printf(
TEXT(
"Intersection %f %f"), Intersection.Key, Intersection.Value));
@ INDEX_NONE
Definition CoreMiscDefines.h:150
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
UE_REWRITE SizeType Num() const
Definition Array.h:1144
void SetNum(SizeType NewNum, EAllowShrinking AllowShrinking=UE::Core::Private::AllowShrinkingByDefault< AllocatorType >())
Definition Array.h:2308
SizeType RemoveSingle(const ElementType &Item)
Definition Array.h:3060
SizeType IndexOfByPredicate(Predicate Pred) const
Definition Array.h:1423
Definition AndroidPlatformMisc.h:14
bool IsDelete() const
Definition IsoNode.h:92
Definition IsoSegment.h:52
Definition IsoTriangulator.h:79
Definition LoopCleaner.h:94
bool Run()
Definition LoopCleaner.cpp:33
FLoopNode & GetPreviousNode() const
Definition IsoNode.h:341
FLoopNode & GetNextNode() const
Definition IsoNode.h:346
Definition ParametricMesherConstantes.h:17
const double SquareGeometricTolerance2
Definition ParametricMesherConstantes.h:22
const FLoopNode * GetSecondNode(const FIsoSegment *Segment)
Definition LoopCleaner.h:67
const FLoopNode * GetFirstNode(const FIsoSegment *Segment)
Definition LoopCleaner.h:62
const FLoopNode * GetPreviousConstNodeImpl(const FLoopNode *Node)
Definition LoopCleaner.h:57
FLoopNode * GetPreviousNodeImpl(FLoopNode *Node)
Definition LoopCleaner.h:47
TFunction< double(const FVector2d &, const FVector2d &, double)> GetSlopeMethod
Definition LoopCleaner.h:24
FLoopNode * GetNextNodeImpl(FLoopNode *Node)
Definition LoopCleaner.h:42
void RemoveDeletedNodes(TArray< FLoopNode * > &NodesOfLoop)
Definition LoopCleaner.h:72
TPair< FLoopNode *, FLoopNode * > FLoopSection
Definition LoopCleaner.h:28
const FLoopNode * GetNextConstNodeImpl(const FLoopNode *Node)
Definition LoopCleaner.h:52
Definition CADEntity.cpp:23
EOrientation
Definition GeoEnum.h:82
void Wait(bool bMakeWait=true)
Definition Display.h:55
@ UniformScaled
Definition MeshEnum.h:20
double ComputeUnorientedSlope(const FVector2d &StartPoint, const FVector2d &EndPoint, double ReferenceSlope)
Definition SlopeUtils.h:337
@ RedPoint
Definition Visu.h:32
@ RedCurve
Definition Visu.h:33
U16 Index
Definition radfft.cpp:71
Definition LoopCleaner.h:31
FLoopNode * Nodes[2][3]
Definition LoopCleaner.h:33
FPinchIntersectionContext(const TPair< double, double > &InIntersection)
Definition LoopCleaner.h:36
TArray< const FVector2d * > Points[2]
Definition LoopCleaner.h:34
const TPair< double, double > & Intersection
Definition LoopCleaner.h:32
Definition Geometry.h:250
static UE_FORCEINLINE_HINT double DistSquared(const TVector2< double > &V1, const TVector2< double > &V2)
Definition Vector2D.h:935