56 DoNotProjectToLandBoundary = 0,
57 ToOriginalNetBoundary = 1,
58 OuterMeshBoundaryToLandBoundary = 2,
59 InnerAndOuterMeshBoundaryToLandBoundary = 3,
101 void AssignLandBoundaryPolylineToMeshNodes(
UInt edgeIndex,
103 const std::vector<UInt>& nodes,
110 void AddLandBoundary(
const std::vector<UInt>& nodesLoc,
121 bool MakePath(
UInt landBoundaryIndex,
UInt& numNodesInPath,
UInt& numRejectedNodesInPath);
125 void ComputeMeshNodeMask(
UInt landBoundaryIndex);
138 void ComputeMask(
UInt segmentIndex,
140 UInt startLandBoundaryIndex,
141 UInt endLandBoundaryIndex,
144 double& leftEdgeRatio,
145 double& rightEdgeRatio);
150 void MaskMeshFaceMask(
UInt landBoundaryIndex,
const std::vector<UInt>& initialFaces);
156 [[nodiscard]]
UInt IsMeshEdgeCloseToLandBoundaries(
UInt landBoundaryIndex,
UInt edge);
164 std::tuple<UInt, UInt> FindStartEndMeshNodesDijkstraAlgorithm(
UInt landBoundaryIndex);
171 UInt FindStartEndMeshNodesFromEdges(
UInt edge,
Point point)
const;
177 std::vector<UInt> ShortestPath(
UInt landBoundaryIndex,
UInt startMeshNode);
184 std::tuple<double, Point, UInt, double> NearestLandBoundarySegment(
UInt landBoundaryIndex,
const Point& node)
const;
189 bool InitialiseNodeLocations(
const bool initialize,
190 const UInt edgeIndex,
191 const std::vector<UInt>& nodes,
193 std::vector<UInt>& nodesLoc,
194 UInt& numNodesLoc)
const;
197 UInt GetSegmentIndex(
const UInt nearestLandBoundaryNodeIndex)
const;
200 bool StopPathSearch(
const UInt landBoundaryIndex,
const UInt currentNode);
203 bool ContainsCrossedFace(
const UInt landBoundaryIndex,
const UInt otherFace);
206 void MaskFacesCloseToBoundary(
const UInt landBoundaryIndex);
209 void GetLandBoundaryNode(
const double closeDistance,
210 const Point& firstMeshNode,
211 const Point& secondMeshNode,
212 const UInt currentNode,
213 UInt& landBoundaryNode,
214 bool& isWithinSegment)
const;
219 std::vector<Point> m_polygonNodesCache;
220 std::vector<std::pair<UInt, UInt>> m_validLandBoundaries;
221 std::vector<UInt> m_nodeFaceIndices;
223 std::vector<UInt> m_nodeMask;
224 std::vector<bool> m_faceMask;
225 std::vector<UInt> m_edgeMask;
227 bool m_landMask =
true;
228 bool m_addLandboundaries =
true;
231 std::vector<double> m_nodesMinDistances;
234 const double m_closeToLandBoundaryFactor = 5.0;
235 const double m_closeWholeMeshFactor = 1.0;
236 const double m_minDistanceFromLandFactor = 2.0;
239 bool m_findOnlyOuterMeshBoundary =
false;