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

Public Member Functions

None __init__ (self)
 
None __init__ (self, std_vector_Vector3_float contour)
 
None __init__ (self, std_vector_std_vector_Vector3_float contours)
 
None __init__ (self, std_vector_Id_VertTag comp2firstVert, VertCoords ps)
 
Id_EdgeTag addFromEdgePath (self, Mesh mesh, std_vector_Id_EdgeTag path)
 
Id_EdgeTag addFromGeneralSurfacePath (self, Mesh mesh, MeshTriPoint start, std_vector_EdgePoint path, MeshTriPoint end)
 
Id_EdgeTag addFromPoints (self, Vector3f vs, int num, bool closed)
 
Id_EdgeTag addFromPoints (self, Vector3f vs, int num)
 
Id_EdgeTag addFromSurfacePath (self, Mesh mesh, std_vector_EdgePoint path)
 
None addPart (self, Polyline3 from_, VertMap outVmap=None, WholeEdgeMap outEmap=None)
 
None addPartByMask (self, Polyline3 from_, UndirectedEdgeBitSet mask, VertMap outVmap=None, EdgeMap outEmap=None)
 
Box3f computeBoundingBox (self, AffineXf3f toWorld=None)
 
std_vector_std_vector_Vector3_float contours (self, std_vector_std_vector_Id_VertTag vertMap=None)
 
Vector3f destPnt (self, Id_EdgeTag e)
 
Vector3f edgeCenter (self, Id_EdgeTag e)
 
float edgeLength (self, Id_EdgeTag e)
 
float edgeLengthSq (self, Id_EdgeTag e)
 
Vector3f edgePoint (self, Id_EdgeTag e, float f)
 
Vector3f edgePoint (self, EdgePoint ep)
 
LineSegm3f edgeSegment (self, Id_EdgeTag e)
 
Vector3f edgeVector (self, Id_EdgeTag e)
 
Vector3f findCenterFromPoints (self)
 
AABBTreePolyline3 getAABBTree (self)
 
AABBTreePolyline3 getAABBTreeNotCreate (self)
 
Box3f getBoundingBox (self)
 
int heapBytes (self)
 
None invalidateCaches (self)
 
Vector3f loopDirArea (self, Id_EdgeTag e)
 
None mirror (self, Plane3f plane)
 
Vector3f orgPnt (self, Id_EdgeTag e)
 
None pack (self, VertMap outVmap=None, WholeEdgeMap outEmap=None)
 
Id_EdgeTag splitEdge (self, Id_EdgeTag e, Vector3f newVertPos)
 
Id_EdgeTag splitEdge (self, Id_EdgeTag e)
 
EdgePoint toEdgePoint (self, VertId v)
 
EdgePoint toEdgePoint (self, Id_EdgeTag e, Vector3f p)
 
float totalLength (self)
 
None transform (self, AffineXf3f xf)
 

Static Public Member Functions

None __init__ (*args, **kwargs)
 
Polyline3 operator (*args, **kwargs)
 
Polyline3 operator (*args, **kwargs)
 

Static Protected Attributes

typing _offsetof_points = 88
 
typing _offsetof_topology = 0
 

Detailed Description

Generated from:  MR::Polyline3
Aliases:  std_shared_ptr_const_Polyline3, std_shared_ptr_Polyline3, PolylineTraits_Vector3f.Polyline

polyline that stores points of type V
\\ingroup PolylineGroup

Constructor & Destructor Documentation

◆ __init__() [1/5]

None mrmeshpy.Polyline3.__init__ ( * args,
** kwargs )
static

◆ __init__() [2/5]

None mrmeshpy.Polyline3.__init__ ( self)

◆ __init__() [3/5]

None mrmeshpy.Polyline3.__init__ ( self,
std_vector_Vector3_float contour )
creates polyline from one contour (open or closed)

◆ __init__() [4/5]

None mrmeshpy.Polyline3.__init__ ( self,
std_vector_std_vector_Vector3_float contours )
creates polyline from several contours (each can be open or closed)

◆ __init__() [5/5]

None mrmeshpy.Polyline3.__init__ ( self,
std_vector_Id_VertTag comp2firstVert,
VertCoords ps )
creates comp2firstVert.size()-1 not-closed polylines
each pair (a,b) of indices in \\param comp2firstVert defines vertex range of a polyline [a,b)
\\param ps point coordinates

Member Function Documentation

◆ addFromEdgePath()

Id_EdgeTag mrmeshpy.Polyline3.addFromEdgePath ( self,
Mesh mesh,
std_vector_Id_EdgeTag path )
adds path to this polyline
\\return the edge from first new to second new vertex

◆ addFromGeneralSurfacePath()

Id_EdgeTag mrmeshpy.Polyline3.addFromGeneralSurfacePath ( self,
Mesh mesh,
MeshTriPoint start,
std_vector_EdgePoint path,
MeshTriPoint end )
adds general path = start-path-end (where both start and end are optional) to this polyline
\\return the edge from first new to second new vertex

◆ addFromPoints() [1/2]

Id_EdgeTag mrmeshpy.Polyline3.addFromPoints ( self,
Vector3f vs,
int num )
adds connected line in this, passing progressively via points *[vs, vs+num)
\\details if num > 2 && vs[0] == vs[num-1] then a closed line is created
\\return the edge from first new to second new vertex

◆ addFromPoints() [2/2]

Id_EdgeTag mrmeshpy.Polyline3.addFromPoints ( self,
Vector3f vs,
int num,
bool closed )
adds connected line in this, passing progressively via points *[vs, vs+num)
\\details if closed argument is true then the last and the first points will be additionally connected
\\return the edge from first new to second new vertex    

◆ addFromSurfacePath()

Id_EdgeTag mrmeshpy.Polyline3.addFromSurfacePath ( self,
Mesh mesh,
std_vector_EdgePoint path )
adds path to this polyline
\\return the edge from first new to second new vertex

◆ addPart()

None mrmeshpy.Polyline3.addPart ( self,
Polyline3 from_,
VertMap outVmap = None,
WholeEdgeMap outEmap = None )
appends polyline (from) in addition to this polyline: creates new edges, verts and points;
\\param outVmap,outEmap (optionally) returns mappings: from.id -> this.id

◆ addPartByMask()

None mrmeshpy.Polyline3.addPartByMask ( self,
Polyline3 from_,
UndirectedEdgeBitSet mask,
VertMap outVmap = None,
EdgeMap outEmap = None )
appends polyline (from) in addition to this polyline: creates new edges, verts and points

◆ computeBoundingBox()

Box3f mrmeshpy.Polyline3.computeBoundingBox ( self,
AffineXf3f toWorld = None )
passes through all valid points and finds the minimal bounding box containing all of them
\\details if toWorld transformation is given then returns minimal bounding box in world space

◆ contours()

std_vector_std_vector_Vector3_float mrmeshpy.Polyline3.contours ( self,
std_vector_std_vector_Id_VertTag vertMap = None )
convert Polyline to simple contour structures with vector of points inside
\\details if all even edges are consistently oriented, then the output contours will be oriented the same
\\param vertMap optional output map for for each contour point to corresponding VertId

◆ destPnt()

Vector3f mrmeshpy.Polyline3.destPnt ( self,
Id_EdgeTag e )
returns coordinates of the edge destination

◆ edgeCenter()

Vector3f mrmeshpy.Polyline3.edgeCenter ( self,
Id_EdgeTag e )
returns edge's centroid

◆ edgeLength()

float mrmeshpy.Polyline3.edgeLength ( self,
Id_EdgeTag e )
returns Euclidean length of the edge

◆ edgeLengthSq()

float mrmeshpy.Polyline3.edgeLengthSq ( self,
Id_EdgeTag e )
returns squared Euclidean length of the edge (faster to compute than length)

◆ edgePoint() [1/2]

Vector3f mrmeshpy.Polyline3.edgePoint ( self,
EdgePoint ep )
computes coordinates of point given as edge and relative position on it

◆ edgePoint() [2/2]

Vector3f mrmeshpy.Polyline3.edgePoint ( self,
Id_EdgeTag e,
float f )
returns a point on the edge: origin point for f=0 and destination point for f=1

◆ edgeSegment()

LineSegm3f mrmeshpy.Polyline3.edgeSegment ( self,
Id_EdgeTag e )
returns line segment of given edge

◆ edgeVector()

Vector3f mrmeshpy.Polyline3.edgeVector ( self,
Id_EdgeTag e )
returns vector equal to edge destination point minus edge origin point

◆ findCenterFromPoints()

Vector3f mrmeshpy.Polyline3.findCenterFromPoints ( self)
computes average position of all valid polyline vertices

◆ getAABBTree()

AABBTreePolyline3 mrmeshpy.Polyline3.getAABBTree ( self)
returns cached aabb-tree for this polyline, creating it if it did not exist in a thread-safe manner

◆ getAABBTreeNotCreate()

AABBTreePolyline3 mrmeshpy.Polyline3.getAABBTreeNotCreate ( self)
returns cached aabb-tree for this polyline, but does not create it if it did not exist

◆ getBoundingBox()

Box3f mrmeshpy.Polyline3.getBoundingBox ( self)
returns the minimal bounding box containing all valid vertices (implemented via getAABBTree())

◆ heapBytes()

int mrmeshpy.Polyline3.heapBytes ( self)
returns the amount of memory this object occupies on heap

◆ invalidateCaches()

None mrmeshpy.Polyline3.invalidateCaches ( self)
Invalidates caches (e.g. aabb-tree) after a change in polyline

◆ loopDirArea()

Vector3f mrmeshpy.Polyline3.loopDirArea ( self,
Id_EdgeTag e )
calculates directed loop area if iterating in `e` direction
.z = FLT_MAX if `e` does not represent a loop

◆ mirror()

None mrmeshpy.Polyline3.mirror ( self,
Plane3f plane )
reflects the polyline from a given plane. Enabled only for Polyline3f

◆ operator() [1/2]

Polyline3 mrmeshpy.Polyline3.operator ( * args,
** kwargs )
static

◆ operator() [2/2]

Polyline3 mrmeshpy.Polyline3.operator ( * args,
** kwargs )
static

◆ orgPnt()

Vector3f mrmeshpy.Polyline3.orgPnt ( self,
Id_EdgeTag e )
returns coordinates of the edge origin

◆ pack()

None mrmeshpy.Polyline3.pack ( self,
VertMap outVmap = None,
WholeEdgeMap outEmap = None )
tightly packs all arrays eliminating lone edges and invalid verts and points,
optionally returns mappings: old.id -> new.id

◆ splitEdge() [1/2]

Id_EdgeTag mrmeshpy.Polyline3.splitEdge ( self,
Id_EdgeTag e )
same, but split given edge on two equal parts

◆ splitEdge() [2/2]

Id_EdgeTag mrmeshpy.Polyline3.splitEdge ( self,
Id_EdgeTag e,
Vector3f newVertPos )
split given edge on two parts:
dest(returned-edge) = org(e) - newly created vertex,
org(returned-edge) = org(e-before-split),
dest(e) = dest(e-before-split)

◆ toEdgePoint() [1/2]

EdgePoint mrmeshpy.Polyline3.toEdgePoint ( self,
Id_EdgeTag e,
Vector3f p )
converts edge and point's coordinates into edge-point representation

◆ toEdgePoint() [2/2]

EdgePoint mrmeshpy.Polyline3.toEdgePoint ( self,
VertId v )
converts vertex into edge-point representation

◆ totalLength()

float mrmeshpy.Polyline3.totalLength ( self)
returns total length of the polyline

◆ transform()

None mrmeshpy.Polyline3.transform ( self,
AffineXf3f xf )
applies given transformation to all valid polyline vertices

Member Data Documentation

◆ _offsetof_points

typing mrmeshpy.Polyline3._offsetof_points = 88
staticprotected

◆ _offsetof_topology

typing mrmeshpy.Polyline3._offsetof_topology = 0
staticprotected

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