56 DoNotProjectToLandBoundary = 0,
57 ToOriginalNetBoundary = 1,
58 OuterMeshBoundaryToLandBoundary = 2,
59 InnerAndOuterMeshBoundaryToLandBoundary = 3,
107 void AssignLandBoundaryPolylineToMeshNodes(
UInt edgeIndex,
109 const std::vector<UInt>& nodes,
116 void AddLandBoundary(
const std::vector<UInt>& nodesLoc,
127 bool MakePath(
UInt landBoundaryIndex,
UInt& numNodesInPath,
UInt& numRejectedNodesInPath);
131 void ComputeMeshNodeMask(
UInt landBoundaryIndex);
144 void ComputeMask(
UInt segmentIndex,
146 UInt startLandBoundaryIndex,
147 UInt endLandBoundaryIndex,
150 double& leftEdgeRatio,
151 double& rightEdgeRatio);
156 void MaskMeshFaceMask(
UInt landBoundaryIndex,
const std::vector<UInt>& initialFaces);
162 [[nodiscard]]
UInt IsMeshEdgeCloseToLandBoundaries(
UInt landBoundaryIndex,
UInt edge);
170 std::tuple<UInt, UInt> FindStartEndMeshNodesDijkstraAlgorithm(
UInt landBoundaryIndex);
177 UInt FindStartEndMeshNodesFromEdges(
UInt edge,
Point point)
const;
183 std::vector<UInt> ShortestPath(
UInt landBoundaryIndex,
UInt startMeshNode);
190 std::tuple<double, Point, UInt, double> NearestLandBoundarySegment(
UInt landBoundaryIndex,
const Point& node)
const;
195 bool InitialiseNodeLocations(
const bool initialize,
196 const UInt edgeIndex,
197 const std::vector<UInt>& nodes,
199 std::vector<UInt>& nodesLoc,
200 UInt& numNodesLoc)
const;
203 UInt GetSegmentIndex(
const UInt nearestLandBoundaryNodeIndex)
const;
206 bool StopPathSearch(
const UInt landBoundaryIndex,
const UInt currentNode);
209 bool ContainsCrossedFace(
const UInt landBoundaryIndex,
const UInt otherFace);
212 void MaskFacesCloseToBoundary(
const UInt landBoundaryIndex);
215 void GetLandBoundaryNode(
const double closeDistance,
216 const Point& firstMeshNode,
217 const Point& secondMeshNode,
218 const UInt currentNode,
219 UInt& landBoundaryNode,
220 bool& isWithinSegment)
const;
225 std::vector<Point> m_polygonNodesCache;
226 std::vector<std::pair<UInt, UInt>> m_validLandBoundaries;
227 std::vector<UInt> m_nodeFaceIndices;
229 std::vector<UInt> m_nodeMask;
230 std::vector<bool> m_faceMask;
231 std::vector<UInt> m_edgeMask;
233 bool m_landMask =
true;
234 bool m_addLandboundaries =
true;
237 std::vector<double> m_nodesMinDistances;
240 const double m_closeToLandBoundaryFactor = 5.0;
241 const double m_closeWholeMeshFactor = 1.0;
242 const double m_minDistanceFromLandFactor = 2.0;
245 bool m_findOnlyOuterMeshBoundary =
false;