116 const std::function<
float(
int)>& offsetAtPoint,
SearchPathSettings searchSettings = {});
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
MR_BIND_IGNORE auto end(const BitSet &)
Definition MRMesh/MRBitSet.h:297
MR_BIND_IGNORE MRMESH_API Expected< OneMeshContour > convertMeshTriPointsToMeshContour(const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, MeshTriPointsConnector connectorFn, std::vector< int > *pivotIndices=nullptr)
Makes continuous contour by mesh tri points, if first and last meshTriPoint is the same,...
MRMESH_API OneMeshContour convertSurfacePathWithEndsToMeshContour(const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &surfacePath, const MeshTriPoint &end)
Converts SurfacePath to OneMeshContours.
MRMESH_API Expected< OneMeshContour > convertMeshTriPointsToClosedContour(const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
Makes closed continuous contour by mesh tri points, note that first and last meshTriPoint should not ...
MRMESH_API OneMeshContours convertSurfacePathsToMeshContours(const Mesh &mesh, const std::vector< SurfacePath > &surfacePaths)
Converts SurfacePaths to OneMeshContours.
std::vector< OneMeshContour > OneMeshContours
Special data type for MR::cutMesh.
Definition MRMesh/MRContoursCut.h:48
MRMESH_API CutMeshResult cutMesh(Mesh &mesh, const OneMeshContours &contours, const CutMeshParameters ¶ms={})
Cuts mesh by given contours.
MRMESH_API Expected< OneMeshContours > convertMeshTriPointsSurfaceOffsetToMeshContours(const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, float offset, SearchPathSettings searchSettings={})
Makes continuous contour by iso-line from mesh tri points, if first and last meshTriPoint is the same...
GeodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MRSurfacePath.h:41
@ DijkstraAStar
compute edge-only path using A*-search algorithm
std::function< Expected< SurfacePath >(const MeshTriPoint &start, const MeshTriPoint &end, int startIndex, int endIndex)> MeshTriPointsConnector
Definition MRMesh/MRContoursCut.h:66
MRMESH_API void subdivideLoneContours(Mesh &mesh, const OneMeshContours &contours, FaceHashMap *new2oldMap=nullptr)
MRMESH_API Contours3f extractMeshContours(const OneMeshContours &meshContours)
tl::expected< T, E > Expected
Definition MRExpected.h:59
std::vector< MeshEdgePoint > SurfacePath
Definition MRMesh/MRMeshFwd.h:395
HashMap< FaceId, FaceId > FaceHashMap
Definition MRMesh/MRMeshFwd.h:509
std::vector< ContinuousContour > ContinuousContours
Definition MRMesh/MRIntersectionContour.h:18
std::function< Vector3i(const Vector3f &)> ConvertToIntVector
float-to-int coordinate converter
Definition MRMesh/MRPrecisePredicates3.h:47
Contours3< float > Contours3f
Definition MRMesh/MRMeshFwd.h:318
phmap::flat_hash_map< K, V, Hash, Eq > HashMap
Definition MRMesh/MRMeshFwd.h:505
MRMESH_API OneMeshContours getOneMeshIntersectionContours(const Mesh &meshA, const Mesh &meshB, const ContinuousContours &contours, bool getMeshAIntersections, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr)
this struct contains coordinate converters float-int-float
Definition MRMesh/MRPrecisePredicates3.h:52
Parameters of MR::cutMesh.
const SortIntersectionsData * sortData
Definition MRMesh/MRContoursCut.h:187
enum MR::CutMeshParameters::ForceFill None
FaceMap * new2OldMap
This is optional output - map from newly generated faces to old faces (N-1)
Definition MRMesh/MRContoursCut.h:189
NewEdgesMap * new2oldEdgesMap
Optional output map for each new edge introduced after cut maps edge from old topology or old face.
Definition MRMesh/MRContoursCut.h:202
ForceFill
Definition MRMesh/MRContoursCut.h:195
std::vector< EdgePath > resultCut
Paths of new edges on mesh, they represent same contours as input, but already cut.
Definition MRMesh/MRContoursCut.h:212
FaceBitSet fbsWithCountourIntersections
Definition MRMesh/MRContoursCut.h:215
Definition MRMesh/MRMeshTriPoint.h:23
Definition MRMesh/MRMesh.h:23
Definition MRMesh/MRContoursCut.h:164
HashMap< UndirectedEdgeId, int > map
Definition MRMesh/MRContoursCut.h:172
UndirectedEdgeBitSet splitEdges
Definition MRMesh/MRContoursCut.h:167
Definition MRMesh/MRContoursCut.h:37
std::vector< OneMeshIntersection > intersections
Definition MRMesh/MRContoursCut.h:38
bool closed
Definition MRMesh/MRContoursCut.h:39
Definition MRMesh/MRContoursCut.h:28
VariantIndex
Definition MRMesh/MRContoursCut.h:29
@ Edge
Definition MRMesh/MRContoursCut.h:29
@ Vertex
Definition MRMesh/MRContoursCut.h:29
@ Face
Definition MRMesh/MRContoursCut.h:29
std::variant< FaceId, EdgeId, VertId > primitiveId
Definition MRMesh/MRContoursCut.h:30
Vector3f coordinate
Definition MRMesh/MRContoursCut.h:32
Geo path search settings.
Definition MRMesh/MRContoursCut.h:80
GeodesicPathApprox geodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MRMesh/MRContoursCut.h:81
int maxReduceIters
the maximum number of iterations to reduce approximate path length and convert it in geodesic path
Definition MRMesh/MRContoursCut.h:82
Definition MRMesh/MRContoursCut.h:17
const AffineXf3f * rigidB2A
Definition MRMesh/MRContoursCut.h:21
const ContinuousContours & contours
Definition MRMesh/MRContoursCut.h:19
ConvertToIntVector converter
Definition MRMesh/MRContoursCut.h:20
size_t meshAVertsNum
Definition MRMesh/MRContoursCut.h:22
bool isOtherA
Definition MRMesh/MRContoursCut.h:23
const Mesh & otherMesh
Definition MRMesh/MRContoursCut.h:18