32 #include <MeshKernel/Entities.hpp>
33 #include <MeshKernel/LandBoundary.hpp>
34 #include <MeshKernel/UndoActions/UndoAction.hpp>
56 DoNotProjectToLandBoundary = 0,
57 ToOriginalNetBoundary = 1,
58 OuterMeshBoundaryToLandBoundary = 2,
59 InnerAndOuterMeshBoundaryToLandBoundary = 3,
101 void AssignLandBoundaryPolylineToMeshNodes(
UInt edgeIndex,
103 std::vector<UInt>& nodes,
110 void AddLandBoundary(
const std::vector<UInt>& nodesLoc,
119 std::tuple<UInt, UInt> MakePath(
UInt landBoundaryIndex);
123 void ComputeMeshNodeMask(
UInt landBoundaryIndex);
136 void ComputeMask(
UInt segmentIndex,
138 UInt startLandBoundaryIndex,
139 UInt endLandBoundaryIndex,
142 double& leftEdgeRatio,
143 double& rightEdgeRatio);
148 void MaskMeshFaceMask(
UInt landBoundaryIndex,
const std::vector<UInt>& initialFaces);
154 [[nodiscard]]
UInt IsMeshEdgeCloseToLandBoundaries(
UInt landBoundaryIndex,
UInt edge);
162 std::tuple<UInt, UInt> FindStartEndMeshNodesDijkstraAlgorithm(
UInt landBoundaryIndex);
169 UInt FindStartEndMeshNodesFromEdges(
UInt edge,
Point point)
const;
175 std::vector<UInt> ShortestPath(
UInt landBoundaryIndex,
UInt startMeshNode);
182 std::tuple<double, Point, UInt, double> NearestLandBoundarySegment(
UInt landBoundaryIndex,
const Point& node)
const;
187 std::vector<Point> m_polygonNodesCache;
188 std::vector<std::pair<UInt, UInt>> m_validLandBoundaries;
189 std::vector<UInt> m_nodeFaceIndices;
191 std::vector<UInt> m_nodeMask;
192 std::vector<bool> m_faceMask;
193 std::vector<UInt> m_edgeMask;
195 bool m_landMask =
true;
196 bool m_addLandboundaries =
true;
199 std::vector<double> m_nodesMinDistances;
202 const double m_closeToLandBoundaryFactor = 5.0;
203 const double m_closeWholeMeshFactor = 1.0;
204 const double m_minDistanceFromLandFactor = 2.0;
207 bool m_findOnlyOuterMeshBoundary =
false;