MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::PlanarTriangulation Namespace Reference

Classes

class  _ByValue_IntersectionsMap
 
class  _InOptConst_BaseOutlineParameters
 
class  _InOptConst_IntersectionInfo
 
class  _InOptConst_IntersectionsMap
 
class  _InOptConst_OutlineParameters
 
class  _InOptMut_BaseOutlineParameters
 
class  _InOptMut_IntersectionInfo
 
class  _InOptMut_IntersectionsMap
 
class  _InOptMut_OutlineParameters
 
class  BaseOutlineParameters
 
class  Const_BaseOutlineParameters
 
class  Const_IntersectionInfo
 
class  Const_IntersectionsMap
 
class  Const_OutlineParameters
 
class  IntersectionInfo
 Info about intersection point for mapping.
 
class  IntersectionsMap
 struct to map new vertices (only appear on intersections) of the outline to it's edges
 
class  OutlineParameters
 

Functions

MRMESH_API HolesVertIds findHoleVertIdsByHoleEdges (const MeshTopology &tp, const std::vector< EdgePath > &holePaths)
 return vertices of holes that correspond internal contours representation of PlanarTriangulation
 
MRMESH_API Mesh getOutlineMesh (const Contours2f &contours, IntersectionsMap *interMap=nullptr, const BaseOutlineParameters &params={})
 
MRMESH_API Mesh getOutlineMesh (const Contours2d &contours, IntersectionsMap *interMap=nullptr, const BaseOutlineParameters &params={})
 
MRMESH_API Contours2f getOutline (const Contours2f &contours, const OutlineParameters &params={})
 returns Contour representing outline if input contours
 
MRMESH_API Contours2f getOutline (const Contours2d &contours, const OutlineParameters &params={})
 
MRMESH_API Mesh triangulateContours (const Contours2d &contours, const HolesVertIds *holeVertsIds=nullptr)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
 
MRMESH_API Mesh triangulateContours (const Contours2f &contours, const HolesVertIds *holeVertsIds=nullptr)
 
MRMESH_API std::optional< MeshtriangulateDisjointContours (const Contours2d &contours, const HolesVertIds *holeVertsIds=nullptr, std::vector< EdgePath > *outBoundaries=nullptr)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
 
MRMESH_API std::optional< MeshtriangulateDisjointContours (const Contours2f &contours, const HolesVertIds *holeVertsIds=nullptr, std::vector< EdgePath > *outBoundaries=nullptr)
 

Function Documentation

◆ findHoleVertIdsByHoleEdges()

MRMESH_API HolesVertIds MR::PlanarTriangulation::findHoleVertIdsByHoleEdges ( const MeshTopology & tp,
const std::vector< EdgePath > & holePaths )

return vertices of holes that correspond internal contours representation of PlanarTriangulation

◆ getOutline() [1/2]

MRMESH_API Contours2f MR::PlanarTriangulation::getOutline ( const Contours2d & contours,
const OutlineParameters & params = {} )

◆ getOutline() [2/2]

MRMESH_API Contours2f MR::PlanarTriangulation::getOutline ( const Contours2f & contours,
const OutlineParameters & params = {} )

returns Contour representing outline if input contours

◆ getOutlineMesh() [1/2]

MRMESH_API Mesh MR::PlanarTriangulation::getOutlineMesh ( const Contours2d & contours,
IntersectionsMap * interMap = nullptr,
const BaseOutlineParameters & params = {} )

◆ getOutlineMesh() [2/2]

MRMESH_API Mesh MR::PlanarTriangulation::getOutlineMesh ( const Contours2f & contours,
IntersectionsMap * interMap = nullptr,
const BaseOutlineParameters & params = {} )

returns Mesh with boundaries representing outline if input contours interMap optional output intersection map

◆ triangulateContours() [1/2]

MRMESH_API Mesh MR::PlanarTriangulation::triangulateContours ( const Contours2d & contours,
const HolesVertIds * holeVertsIds = nullptr )

triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)

Parameters
holeVertsIdsif set merge only points with same vertex id, otherwise merge all points with same coordinates
Returns
return created mesh

◆ triangulateContours() [2/2]

MRMESH_API Mesh MR::PlanarTriangulation::triangulateContours ( const Contours2f & contours,
const HolesVertIds * holeVertsIds = nullptr )

◆ triangulateDisjointContours() [1/2]

MRMESH_API std::optional< Mesh > MR::PlanarTriangulation::triangulateDisjointContours ( const Contours2d & contours,
const HolesVertIds * holeVertsIds = nullptr,
std::vector< EdgePath > * outBoundaries = nullptr )

triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)

Parameters
holeVertsIdsif set merge only points with same vertex id, otherwise merge all points with same coordinates
outBoundariesoptional output EdgePaths that correspond to initial contours
Returns
std::optional<Mesh> : if some contours intersect return false, otherwise return created mesh

◆ triangulateDisjointContours() [2/2]

MRMESH_API std::optional< Mesh > MR::PlanarTriangulation::triangulateDisjointContours ( const Contours2f & contours,
const HolesVertIds * holeVertsIds = nullptr,
std::vector< EdgePath > * outBoundaries = nullptr )