MeshLib C++ Docs
Loading...
Searching...
No Matches
MROneMeshContours.h File Reference
#include "MRPrecisePredicates3.h"
#include "MRIntersectionContour.h"
#include "MRExpected.h"
#include "MREnums.h"
#include "MRBitSet.h"
#include <span>

Go to the source code of this file.

Classes

struct  MR::SortIntersectionsData
 Special data to sort intersections more accurate. More...
struct  MR::OneMeshIntersection
 Simple point on mesh, represented by primitive id and coordinate in mesh space. More...
struct  MR::OneMeshContour
 One contour on mesh. More...
struct  MR::OneMeshContourView
 One contour of OneMeshContours, viewed in place. More...
struct  MR::OneMeshContours
 Special data type for MR::cutMesh: the intersections of all contours in one array, one contour after another. More...
struct  MR::OneMeshContours::ConstIterator
 not in the bindings: they would get an iterator over the views, which they lack (MR_BIND_IGNORE does not stop pybind11 from that) More...
struct  MR::SearchPathSettings
 Geo path search settings. More...

Namespaces

namespace  MR
 Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).

Typedefs

using MR::MeshTriPointsConnector = std::function<Expected<SurfacePath>( const MeshTriPoint& start, const MeshTriPoint& end, int startIndex, int endIndex )>

Functions

void MR::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, every piece within contour c
void MR::subdivideLoneContours (Mesh &mesh, const OneMeshContours &contours, FaceHashMap *new2oldMap=nullptr)
void MR::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
OneMeshContours MR::getOneMeshSelfIntersectionContours (const Mesh &mesh, const ContinuousContours &contours, const CoordinateConverters &converters, const AffineXf3f *rigidB2A=nullptr)
Contours3f MR::extractMeshContours (const OneMeshContours &meshContours)
 Converts OneMeshContours contours representation to Contours3f: set of coordinates.
Expected< OneMeshContour > MR::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, makes closed contour.
Expected< OneMeshContour > MR::surfaceLineToMeshContour (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
 Makes continuous contour by mesh tri points, if first and last meshTriPoint is the same, makes closed contour.
Expected< OneMeshContour > MR::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 be same.
OneMeshContour MR::surfacePathWithEndsToMeshContour (const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &surfacePath, const MeshTriPoint &end)
 Converts SurfacePath to OneMeshContours.
OneMeshContours MR::surfacePathsToMeshContours (const Mesh &mesh, const std::vector< SurfacePath > &surfacePaths)
 Converts SurfacePaths to OneMeshContours.
Expected< OneMeshContour > MR::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
Expected< OneMeshContour > MR::convertMeshTriPointsToMeshContour (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
Expected< OneMeshContour > MR::convertMeshTriPointsToClosedContour (const Mesh &mesh, const std::vector< MeshTriPoint > &surfaceLine, SearchPathSettings searchSettings={}, std::vector< int > *pivotIndices=nullptr)
OneMeshContour MR::convertSurfacePathWithEndsToMeshContour (const Mesh &mesh, const MeshTriPoint &start, const SurfacePath &surfacePath, const MeshTriPoint &end)
OneMeshContours MR::convertSurfacePathsToMeshContours (const Mesh &mesh, const std::vector< SurfacePath > &surfacePaths)