MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.planartriangulation.Functions Class Reference

Static Public Member Functions

static meshlib.Mesh getOutlineMesh (meshlib.std_vector_std_vector_MR_Vector2f contours, meshlib.planartriangulation.IntersectionsMap interMap, meshlib.planartriangulation.BaseOutlineParameters params)
static meshlib.Mesh getOutlineMesh (meshlib.std_vector_std_vector_MR_Vector2d contours, meshlib.planartriangulation.IntersectionsMap interMap, meshlib.planartriangulation.BaseOutlineParameters params)
static meshlib.std_vector_std_vector_MR_Vector2f getOutline (meshlib.std_vector_std_vector_MR_Vector2f contours, meshlib.planartriangulation.OutlineParameters params)
static meshlib.std_vector_std_vector_MR_Vector2f getOutline (meshlib.std_vector_std_vector_MR_Vector2d contours, meshlib.planartriangulation.OutlineParameters params)
static meshlib.Mesh triangulateContours (meshlib.std_vector_std_vector_MR_Vector2d contours, meshlib.planartriangulation.TriangulationParameters params)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
static meshlib.Mesh triangulateContours (meshlib.std_vector_std_vector_MR_Vector2f contours, meshlib.planartriangulation.TriangulationParameters params)
static meshlib.planartriangulation.ISweepLineCache makeSweepLineCache ()
static meshlib.std_optional_MR_Mesh triangulateDisjointContours (meshlib.std_vector_std_vector_MR_Vector2d contours, meshlib.planartriangulation.ISweepLineCache cache)
 triangulate 2d contours only closed contours are allowed (first point of each contour should be the same as last point of the contour)
static meshlib.std_optional_MR_Mesh triangulateDisjointContours (meshlib.std_vector_std_vector_MR_Vector2f contours, meshlib.planartriangulation.ISweepLineCache cache)
static meshlib.std_optional_MR_Mesh triangulateDisjointContours (meshlib.Mesh mesh, meshlib.std_vector_std_vector_MR_EdgeId loops, meshlib.Vector3f normal, meshlib.WholeEdgeMap outPatchMap, meshlib.planartriangulation.ISweepLineCache cache)
 triangulate hole boundary loops of mesh in the mesh's own 3d space, orienting faces around normal combinatorics run on the dominant-axis projection of normal; output vertices keep the exact mesh coordinates (no projection round-trip), and loops sharing a mesh vertex are merged by identity.
static meshlib.std_optional_MR_HoleFillPlan getMonotonePlan (meshlib.Mesh mesh, meshlib.std_vector_std_vector_MR_EdgeId loops, meshlib.Vector3f normal)
 splits the near-planar region bounded by loops in monotone parts, without triangulating them this is the sweep-line triangulation stopped right after monotonation

Detailed Description

The free functions of this namespace.

Member Function Documentation

◆ getMonotonePlan()

meshlib.std_optional_MR_HoleFillPlan meshlib.planartriangulation.Functions.getMonotonePlan ( meshlib.Mesh mesh,
meshlib.std_vector_std_vector_MR_EdgeId loops,
meshlib.Vector3f normal )
static

splits the near-planar region bounded by loops in monotone parts, without triangulating them this is the sweep-line triangulation stopped right after monotonation

Parameters
loopsone closed EdgeLoop per boundary of one region, bounding holes of mesh as trackRightBoundaryLoop returns them (a slit of one edge is a loop of 2 edges, and a loop of one edge is skipped); which way round a loop runs does not matter; the holes can be several parts of one region split by edges between them, as all the holes of a face cut along contours (the parts between the contours that cross its sides, and both sides of every island), since an edge taken both ways adds zero winding
normalthe orientation the region is monotone around, see triangulateDisjointContours
Returns
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 executeHoleFillPlan, which then only adds edges (empty if already monotone, a no-op). Validate it with isFillingMultipleEdgeFree, since a chord may duplicate an off-loop mesh edge

Generated from function MR::PlanarTriangulation::getMonotonePlan.

Calls MR_PlanarTriangulation_getMonotonePlan().

◆ getOutline() [1/2]

Generated from function MR::PlanarTriangulation::getOutline.

Calls MR_PlanarTriangulation_getOutline_std_vector_std_vector_MR_Vector2d().

◆ getOutline() [2/2]

returns Contour representing outline if input contours Generated from function MR::PlanarTriangulation::getOutline.

Calls MR_PlanarTriangulation_getOutline_std_vector_std_vector_MR_Vector2f().

◆ getOutlineMesh() [1/2]

Generated from function MR::PlanarTriangulation::getOutlineMesh.

Calls MR_PlanarTriangulation_getOutlineMesh_std_vector_std_vector_MR_Vector2d().

◆ getOutlineMesh() [2/2]

returns Mesh with boundaries representing outline if input contours interMap optional output intersection map Generated from function MR::PlanarTriangulation::getOutlineMesh.

Calls MR_PlanarTriangulation_getOutlineMesh_std_vector_std_vector_MR_Vector2f().

◆ makeSweepLineCache()

meshlib.planartriangulation.ISweepLineCache meshlib.planartriangulation.Functions.makeSweepLineCache ( )
static

creates a cache for the sweep-line triangulation Generated from function MR::PlanarTriangulation::makeSweepLineCache.

Calls MR_PlanarTriangulation_makeSweepLineCache().

◆ triangulateContours() [1/2]

meshlib.Mesh meshlib.planartriangulation.Functions.triangulateContours ( meshlib.std_vector_std_vector_MR_Vector2d contours,
meshlib.planartriangulation.TriangulationParameters params )
static

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

Returns
return created mesh

Generated from function MR::PlanarTriangulation::triangulateContours.

Calls MR_PlanarTriangulation_triangulateContours_std_vector_std_vector_MR_Vector2d().

◆ triangulateContours() [2/2]

meshlib.Mesh meshlib.planartriangulation.Functions.triangulateContours ( meshlib.std_vector_std_vector_MR_Vector2f contours,
meshlib.planartriangulation.TriangulationParameters params )
static

Generated from function MR::PlanarTriangulation::triangulateContours.

Calls MR_PlanarTriangulation_triangulateContours_std_vector_std_vector_MR_Vector2f().

◆ triangulateDisjointContours() [1/3]

meshlib.std_optional_MR_Mesh meshlib.planartriangulation.Functions.triangulateDisjointContours ( meshlib.Mesh mesh,
meshlib.std_vector_std_vector_MR_EdgeId loops,
meshlib.Vector3f normal,
meshlib.WholeEdgeMap outPatchMap,
meshlib.planartriangulation.ISweepLineCache cache )
static

triangulate hole boundary loops of mesh in the mesh's own 3d space, orienting faces around normal combinatorics run on the dominant-axis projection of normal; output vertices keep the exact mesh coordinates (no projection round-trip), and loops sharing a mesh vertex are merged by identity.

Parameters
loopsone closed EdgeLoop per contour (as produced by trackRightBoundaryLoop on each hole edge)
outPatchMapoptional 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
Returns
std::nullopt if the loops self-intersect, otherwise the patch mesh

Generated from function MR::PlanarTriangulation::triangulateDisjointContours.

Calls MR_PlanarTriangulation_triangulateDisjointContours_5().

◆ triangulateDisjointContours() [2/3]

meshlib.std_optional_MR_Mesh meshlib.planartriangulation.Functions.triangulateDisjointContours ( meshlib.std_vector_std_vector_MR_Vector2d contours,
meshlib.planartriangulation.ISweepLineCache cache )
static

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

Returns
std::optional<Mesh> : if some contours intersect return false, otherwise return created mesh

Generated from function MR::PlanarTriangulation::triangulateDisjointContours.

Calls MR_PlanarTriangulation_triangulateDisjointContours_2_std_vector_std_vector_MR_Vector2d().

◆ triangulateDisjointContours() [3/3]

meshlib.std_optional_MR_Mesh meshlib.planartriangulation.Functions.triangulateDisjointContours ( meshlib.std_vector_std_vector_MR_Vector2f contours,
meshlib.planartriangulation.ISweepLineCache cache )
static

Generated from function MR::PlanarTriangulation::triangulateDisjointContours.

Calls MR_PlanarTriangulation_triangulateDisjointContours_2_std_vector_std_vector_MR_Vector2f().


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