50 [[nodiscard]] FaceId
face()
const {
return isFace() ? FaceId( id_ ) : FaceId(); }
51 [[nodiscard]] EdgeId
edge()
const {
return isEdge() ? EdgeId( id_ ) : EdgeId(); }
52 [[nodiscard]] VertId
vert()
const {
return isVert() ? VertId( id_ ) : VertId(); }
99 [[nodiscard]]
size_t size()
const {
return offsets.size() - 1; }
106#if !defined MR_PARSING_FOR_ANY_BINDINGS && !defined MR_COMPILING_ANY_BINDINGS
134[[deprecated(
"cutMesh connects lone contours itself, and the boolean no longer uses this" )]]
145 bool addSelfyTerminalVerts =
false );
231[[deprecated(
"use surfaceLineToMeshContour" )]] [[nodiscard]]
238[[deprecated(
"use surfaceLineToMeshContour" )]] [[nodiscard]]
245[[deprecated(
"use surfaceLineToClosedMeshContour" )]] [[nodiscard]]
252[[deprecated(
"use surfacePathWithEndsToMeshContour" )]] [[nodiscard]]
258[[deprecated(
"use surfacePathsToMeshContours" )]] [[nodiscard]]
#define MRMESH_API
Definition MRMeshFwd.h:85
Vector<T> is indexed by size_t.
Definition MRVector.h:24
Expected< OneMeshContour > surfaceLineToClosedMeshContour(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 ...
OneMeshContour surfacePathWithEndsToMeshContour(const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &surfacePath, const MeshTriPoint &end)
Converts SurfacePath to OneMeshContours.
Expected< OneMeshContour > surfaceLineToMeshContour(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,...
OneMeshContours surfacePathsToMeshContours(const Mesh &mesh, const std::vector< SurfacePath > &surfacePaths)
Converts SurfacePaths to OneMeshContours.
std::span< const OneMeshIntersection > intersections
Definition MROneMeshContours.h:78
Vector< ContinuousContour > ContinuousContours
Definition MRIntersectionContour.h:15
bool samePrimitive(const OneMeshIntersection &other) const
whether both points are in the same primitive
Definition MROneMeshContours.h:59
const OneMeshIntersection & intersection(size_t c, size_t i) const
Definition MROneMeshContours.h:103
GeodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MREnums.h:114
void push_back(const OneMeshContour &contour)
Definition MROneMeshContours.h:125
Contours3f extractMeshContours(const OneMeshContours &meshContours)
Converts OneMeshContours contours representation to Contours3f: set of coordinates.
std::function< Expected< SurfacePath >(const MeshTriPoint &start, const MeshTriPoint &end, int startIndex, int endIndex)> MeshTriPointsConnector
Definition MROneMeshContours.h:157
const AffineXf3f * rigidB2A
Definition MROneMeshContours.h:22
MeshTriPoint
Definition MRMeshFwd.h:515
const ContinuousContours & contours
Definition MROneMeshContours.h:20
ConstIterator end() const
Definition MROneMeshContours.h:117
void subdivideLoneContours(Mesh &mesh, const OneMeshContours &contours, FaceHashMap *new2oldMap=nullptr)
ConvertToIntVector converter
Definition MROneMeshContours.h:21
Contours3< float > Contours3f
Definition MRMeshFwd.h:388
OneMeshIntersection() noexcept
Definition MROneMeshContours.h:38
size_t meshAVertsNum
Definition MROneMeshContours.h:23
OneMeshIntersection(EdgeId e, const Vector3f &p) noexcept
Definition MROneMeshContours.h:41
const OneMeshContours * contours
Definition MROneMeshContours.h:110
Vector< OneMeshIntersection > intersections
Definition MROneMeshContours.h:71
OneMeshContours getOneMeshSelfIntersectionContours(const Mesh &mesh, const ContinuousContours &contours, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr)
void setPrimitive(EdgeId e)
Definition MROneMeshContours.h:55
ConstIterator begin() const
Definition MROneMeshContours.h:116
OneMeshContours convertSurfacePathsToMeshContours(const Mesh &mesh, const std::vector< SurfacePath > &surfacePaths)
Definition MROneMeshContours.h:259
bool isVert() const
Definition MROneMeshContours.h:47
bool isOtherA
Definition MROneMeshContours.h:24
size_t c
Definition MROneMeshContours.h:111
void getOneMeshIntersectionContours(const Mesh &meshA, const Mesh &meshB, const ContinuousContours &contours, OneMeshContours *outA, OneMeshContours *outB, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr, Contours3f *outPtsA=nullptr, bool addSelfyTerminalVerts=false)
if true, then open self-intersection contours will be prolonged to terminal vertices
tl::expected< T, E > Expected
Definition MRExpected.h:31
OneMeshContours(const Vector< OneMeshContour > &contours)
BitSet closed
Definition MROneMeshContours.h:93
GeodesicPathApprox geodesicPathApprox
the algorithm to compute approximately geodesic path
Definition MROneMeshContours.h:172
std::vector< MeshEdgePoint > SurfacePath
Definition MRMeshFwd.h:490
Primitive
the kind of mesh primitive containing the point
Definition MROneMeshContours.h:32
bool isEdge() const
Definition MROneMeshContours.h:46
OneMeshContours()=default
OneMeshContour convertSurfacePathWithEndsToMeshContour(const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &surfacePath, const MeshTriPoint &end)
Definition MROneMeshContours.h:253
VertId vert() const
Definition MROneMeshContours.h:52
EdgeId edge() const
Definition MROneMeshContours.h:51
OneMeshIntersection(FaceId f, const Vector3f &p) noexcept
Definition MROneMeshContours.h:40
HashMap< FaceId, FaceId > FaceHashMap
Definition MRMeshFwd.h:635
OneMeshIntersection(NoInit) noexcept
Definition MROneMeshContours.h:39
Expected< OneMeshContour > convertMeshTriPointsToClosedContour(const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
Definition MROneMeshContours.h:246
OneMeshContours(std::initializer_list< OneMeshContour > contours)
Definition MROneMeshContours.h:96
void setPrimitive(FaceId f)
Definition MROneMeshContours.h:54
int maxReduceIters
the maximum number of iterations to reduce approximate path length and convert it in geodesic path
Definition MROneMeshContours.h:173
ConstIterator & operator++()
Definition MROneMeshContours.h:113
constexpr NoInit noInit
Definition MRMeshFwd.h:103
Vector< int > offsets
the number of contours + 1 elements: contour c is intersections[offsets[c], offsets[c + 1])
Definition MROneMeshContours.h:92
FaceId face() const
the primitive containing the point if it is of that kind, otherwise invalid id
Definition MROneMeshContours.h:50
Vector3f coordinate
Definition MROneMeshContours.h:61
OneMeshContourView operator*() const
Definition MROneMeshContours.h:112
const Mesh & otherMesh
Definition MROneMeshContours.h:19
OneMeshContour contour(size_t c) const
returns a copy of contour c
Expected< OneMeshContour > convertMeshTriPointsToMeshContour(const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, MeshTriPointsConnector connectorFn, std::vector< int > *pivotIndices=nullptr)
the old names stay in the bindings, since scripts call them
Definition MROneMeshContours.h:232
Primitive primitive() const
Definition MROneMeshContours.h:44
void setPrimitive(VertId v)
Definition MROneMeshContours.h:56
bool closed
Definition MROneMeshContours.h:79
Vector< OneMeshIntersection > intersections
Definition MROneMeshContours.h:91
bool closed
Definition MROneMeshContours.h:72
void push_back(const OneMeshContourView &contour)
appends a contour
void parallelForContourPieces(const Vector< int > &offsets, const std::function< void(int c, int i0, int i1)> &f)
calls f( c, i0, i1 ) in parallel on pieces [i0, i1) of all elements of contours with given offsets,...
bool isFace() const
Definition MROneMeshContours.h:45
OneMeshIntersection(VertId v, const Vector3f &p) noexcept
Definition MROneMeshContours.h:42
bool operator==(const ConstIterator &) const =default
size_t size() const
Definition MROneMeshContours.h:99
bool empty() const
Definition MROneMeshContours.h:100
OneMeshContourView operator[](size_t c) const
Definition MROneMeshContours.h:101
@ DijkstraAStar
compute edge-only path using A*-search algorithm
Definition MREnums.h:118
@ other
Angle, normally float. Measure in radians.
Definition MRFeatureObject.h:27
@ Face
Definition MROneMeshContours.h:33
@ Edge
Definition MROneMeshContours.h:34
@ Vert
Definition MROneMeshContours.h:35
auto end(ViewportMask)
Definition MRViewportId.h:124
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
translate then scale float-to-int coordinate converter
Definition MRPrecisePredicates3.h:100
this struct contains coordinate converters float-int-float
Definition MRPrecisePredicates3.h:145
Definition MRMeshFwd.h:102
One contour of OneMeshContours, viewed in place.
Definition MROneMeshContours.h:77
One contour on mesh.
Definition MROneMeshContours.h:70
not in the bindings: they would get an iterator over the views, which they lack (MR_BIND_IGNORE does ...
Definition MROneMeshContours.h:109
Special data type for MR::cutMesh: the intersections of all contours in one array,...
Definition MROneMeshContours.h:90
Simple point on mesh, represented by primitive id and coordinate in mesh space.
Definition MROneMeshContours.h:29
Geo path search settings.
Definition MROneMeshContours.h:171
Special data to sort intersections more accurate.
Definition MROneMeshContours.h:18