MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.PlanarTriangulation Class Reference

Classes

class  BaseOutlineParameters
class  IntersectionInfo
class  IntersectionsMap
class  ISweepLineCache
class  OutlineParameters
class  TriangulationParameters
class  WindingMode

Static Public Member Functions

HoleFillPlan getMonotonePlan (Mesh mesh, std_vector_std_vector_Id_EdgeTag loops, Vector3f normal)
std_vector_std_vector_Vector2_float getOutline (std_vector_std_vector_Vector2_float contours, PlanarTriangulation.OutlineParameters params=...)
std_vector_std_vector_Vector2_float getOutline (std_vector_std_vector_Vector2_double contours, PlanarTriangulation.OutlineParameters params=...)
Mesh getOutlineMesh (std_vector_std_vector_Vector2_float contours, PlanarTriangulation.IntersectionsMap interMap=None, PlanarTriangulation.BaseOutlineParameters params=...)
Mesh getOutlineMesh (std_vector_std_vector_Vector2_double contours, PlanarTriangulation.IntersectionsMap interMap=None, PlanarTriangulation.BaseOutlineParameters params=...)
PlanarTriangulation.ISweepLineCache makeSweepLineCache ()
Mesh triangulateContours (std_vector_std_vector_Vector2_double contours, PlanarTriangulation.TriangulationParameters params=...)
Mesh triangulateContours (std_vector_std_vector_Vector2_float contours, PlanarTriangulation.TriangulationParameters params=...)
Mesh triangulateDisjointContours (std_vector_std_vector_Vector2_double contours, PlanarTriangulation.ISweepLineCache cache=None)
Mesh triangulateDisjointContours (std_vector_std_vector_Vector2_float contours, PlanarTriangulation.ISweepLineCache cache=None)
Mesh triangulateDisjointContours (Mesh mesh, std_vector_std_vector_Id_EdgeTag loops, Vector3f normal, WholeEdgeMap outPatchMap=None, PlanarTriangulation.ISweepLineCache cache=None)

Static Public Attributes

 ContourIdMap
 ContoursIdMap = std_vector_std_vector_PlanarTriangulation_IntersectionInfo
 ContoursIdMap_ptr = std_vector_std_vector_PlanarTriangulation_IntersectionInfo

Detailed Description

This is a namespace.

Member Function Documentation

◆ getMonotonePlan()

HoleFillPlan mrmeshpy.PlanarTriangulation.getMonotonePlan ( Mesh mesh,
std_vector_std_vector_Id_EdgeTag loops,
Vector3f normal )
static
 @brief splits the near-planar region bounded by \\p loops in monotone parts, without triangulating them
 this is the sweep-line triangulation stopped right after monotonation
 @param loops one closed EdgeLoop of at least 3 edges per boundary of one region, bounding holes of
        \\p mesh as trackRightBoundaryLoop returns them; which way round a loop runs does not matter
 @param normal the orientation the region is monotone around, see \\ref triangulateDisjointContours
 @return std::nullopt if the loops intersect or a chord would land in a face instead of a hole, so that
         the caller can fall back on filling every loop separately; otherwise a plan with numTris == 0
         for \\ref executeHoleFillPlan, which then only adds edges (empty if already monotone, a no-op).
         Validate it with \\ref isFillingMultipleEdgeFree: a chord may duplicate an off-loop mesh edge

◆ getOutline() [1/2]

std_vector_std_vector_Vector2_float mrmeshpy.PlanarTriangulation.getOutline ( std_vector_std_vector_Vector2_double contours,
PlanarTriangulation.OutlineParameters params = ... )
static

◆ getOutline() [2/2]

std_vector_std_vector_Vector2_float mrmeshpy.PlanarTriangulation.getOutline ( std_vector_std_vector_Vector2_float contours,
PlanarTriangulation.OutlineParameters params = ... )
static
returns Contour representing outline if input contours

◆ getOutlineMesh() [1/2]

Mesh mrmeshpy.PlanarTriangulation.getOutlineMesh ( std_vector_std_vector_Vector2_double contours,
PlanarTriangulation.IntersectionsMap interMap = None,
PlanarTriangulation.BaseOutlineParameters params = ... )
static

◆ getOutlineMesh() [2/2]

Mesh mrmeshpy.PlanarTriangulation.getOutlineMesh ( std_vector_std_vector_Vector2_float contours,
PlanarTriangulation.IntersectionsMap interMap = None,
PlanarTriangulation.BaseOutlineParameters params = ... )
static
returns Mesh with boundaries representing outline if input contours
interMap optional output intersection map

◆ makeSweepLineCache()

PlanarTriangulation.ISweepLineCache mrmeshpy.PlanarTriangulation.makeSweepLineCache ( )
static
creates a cache for the sweep-line triangulation

◆ triangulateContours() [1/2]

Mesh mrmeshpy.PlanarTriangulation.triangulateContours ( std_vector_std_vector_Vector2_double contours,
PlanarTriangulation.TriangulationParameters params = ... )
static
 @brief triangulate 2d contours
 only closed contours are allowed (first point of each contour should be the same as last point of the contour)
 @return return created mesh

◆ triangulateContours() [2/2]

Mesh mrmeshpy.PlanarTriangulation.triangulateContours ( std_vector_std_vector_Vector2_float contours,
PlanarTriangulation.TriangulationParameters params = ... )
static

◆ triangulateDisjointContours() [1/3]

Mesh mrmeshpy.PlanarTriangulation.triangulateDisjointContours ( Mesh mesh,
std_vector_std_vector_Id_EdgeTag loops,
Vector3f normal,
WholeEdgeMap outPatchMap = None,
PlanarTriangulation.ISweepLineCache cache = None )
static
 @brief triangulate hole boundary loops of \\p mesh in the mesh's own 3d space, orienting faces around \\p normal
 combinatorics run on the dominant-axis projection of \\p normal; output vertices keep the exact mesh coordinates
 (no projection round-trip), and loops sharing a mesh vertex are merged by identity.
 @param loops one closed EdgeLoop per contour (as produced by trackRightBoundaryLoop on each hole edge)
 @param outPatchMap optional output: for each patch boundary edge (by undirected id) the mesh edge it copies,
        directed along it; edges past its size are the triangulation's own
 @return std::nullopt if the loops self-intersect, otherwise the patch mesh

◆ triangulateDisjointContours() [2/3]

Mesh mrmeshpy.PlanarTriangulation.triangulateDisjointContours ( std_vector_std_vector_Vector2_double contours,
PlanarTriangulation.ISweepLineCache cache = None )
static
 @brief triangulate 2d contours
 only closed contours are allowed (first point of each contour should be the same as last point of the contour)
 @return std::optional<Mesh> : if some contours intersect return false, otherwise return created mesh

◆ triangulateDisjointContours() [3/3]

Mesh mrmeshpy.PlanarTriangulation.triangulateDisjointContours ( std_vector_std_vector_Vector2_float contours,
PlanarTriangulation.ISweepLineCache cache = None )
static

Member Data Documentation

◆ ContourIdMap

mrmeshpy.PlanarTriangulation.ContourIdMap
static

◆ ContoursIdMap

mrmeshpy.PlanarTriangulation.ContoursIdMap = std_vector_std_vector_PlanarTriangulation_IntersectionInfo
static

◆ ContoursIdMap_ptr

mrmeshpy.PlanarTriangulation.ContoursIdMap_ptr = std_vector_std_vector_PlanarTriangulation_IntersectionInfo
static

The documentation for this class was generated from the following file: