MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.ConstPolyline2 Class Reference
Inheritance diagram for mrmeshpy.ConstPolyline2:

Public Member Functions

 __init__ (self, *args, **kwargs)
float averageEdgeLength (self)
Box2f computeBoundingBox (self, ConstAffineXf2f toWorld=None)
std_vector_std_vector_Vector2_float contours (self, std_vector_std_vector_Id_VertTag vertMap=None)
Vector2f destPnt (self, ConstEdgeId e)
Vector2f edgeCenter (self, ConstEdgeId e)
float edgeLength (self, ConstEdgeId e)
float edgeLengthSq (self, ConstEdgeId e)
Vector2f edgePoint (self, ConstEdgeId e, float f)
Vector2f edgePoint (self, ConstEdgePoint ep)
LineSegm2f edgeSegment (self, ConstEdgeId e)
Vector2f edgeVector (self, ConstEdgeId e)
Vector2f findCenterFromPoints (self)
ConstAABBTreePolyline2 getAABBTree (self)
ConstAABBTreePolyline2 getAABBTreeNotCreate (self)
Box2f getBoundingBox (self)
int heapBytes (self)
Vector3f loopDirArea (self, ConstEdgeId e)
Vector2f orgPnt (self, ConstEdgeId e)
EdgePoint toEdgePoint (self, ConstVertId v)
EdgePoint toEdgePoint (self, ConstEdgeId e, ConstVector2f p)
float totalLength (self)
ConstVertCoords2 points (self)
ConstPolylineTopology topology (self)

Static Protected Attributes

typing _offsetof_points = 88
typing _offsetof_topology = 0

Detailed Description

Generated from:  MR::Polyline2
Aliases:  PolylineTraits_Vector2f.Polyline

polyline that stores points of type V

Constructor & Destructor Documentation

◆ __init__()

mrmeshpy.ConstPolyline2.__init__ ( self,
* args,
** kwargs )
__init__(*args, **kwargs)
Overloaded function.

1. __init__(self: meshlib.mrmeshpy.ConstPolyline2) -> None

2. __init__(self: meshlib.mrmeshpy.ConstPolyline2, contour: meshlib.mrmeshpy.Const_std_vector_Vector2_float) -> None

creates polyline from one contour (open or closed)

3. __init__(self: meshlib.mrmeshpy.ConstPolyline2, contours: meshlib.mrmeshpy.Const_std_vector_std_vector_Vector2_float) -> None

creates polyline from several contours (each can be open or closed)

4. __init__(self: meshlib.mrmeshpy.ConstPolyline2, comp2firstVert: meshlib.mrmeshpy.Const_std_vector_Id_VertTag, ps: meshlib.mrmeshpy.ConstVertCoords2) -> None

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

5. __init__(self: meshlib.mrmeshpy.ConstPolyline2, arg0: meshlib.mrmeshpy.ConstPolyline2) -> None

Implicit copy constructor.

6. __init__(self: meshlib.mrmeshpy.ConstPolyline2, : meshlib.mrmeshpy.ConstPolyline2) -> None

Member Function Documentation

◆ averageEdgeLength()

float mrmeshpy.ConstPolyline2.averageEdgeLength ( self)
returns average edge length in the polyline

◆ computeBoundingBox()

Box2f mrmeshpy.ConstPolyline2.computeBoundingBox ( self,
ConstAffineXf2f 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_Vector2_float mrmeshpy.ConstPolyline2.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()

Vector2f mrmeshpy.ConstPolyline2.destPnt ( self,
ConstEdgeId e )
returns coordinates of the edge destination

◆ edgeCenter()

Vector2f mrmeshpy.ConstPolyline2.edgeCenter ( self,
ConstEdgeId e )
returns edge's centroid

◆ edgeLength()

float mrmeshpy.ConstPolyline2.edgeLength ( self,
ConstEdgeId e )
returns Euclidean length of the edge

◆ edgeLengthSq()

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

◆ edgePoint() [1/2]

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

◆ edgePoint() [2/2]

Vector2f mrmeshpy.ConstPolyline2.edgePoint ( self,
ConstEdgePoint ep )
computes coordinates of point given as edge and relative position on it

◆ edgeSegment()

LineSegm2f mrmeshpy.ConstPolyline2.edgeSegment ( self,
ConstEdgeId e )
returns line segment of given edge

◆ edgeVector()

Vector2f mrmeshpy.ConstPolyline2.edgeVector ( self,
ConstEdgeId e )
returns vector equal to edge destination point minus edge origin point

◆ findCenterFromPoints()

Vector2f mrmeshpy.ConstPolyline2.findCenterFromPoints ( self)
computes average position of all valid polyline vertices

◆ getAABBTree()

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

◆ getAABBTreeNotCreate()

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

◆ getBoundingBox()

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

◆ heapBytes()

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

◆ loopDirArea()

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

◆ orgPnt()

Vector2f mrmeshpy.ConstPolyline2.orgPnt ( self,
ConstEdgeId e )
returns coordinates of the edge origin

◆ points()

ConstVertCoords2 mrmeshpy.ConstPolyline2.points ( self)

Reimplemented in mrmeshpy.Polyline2, and mrmeshpy.Polyline2.

◆ toEdgePoint() [1/2]

EdgePoint mrmeshpy.ConstPolyline2.toEdgePoint ( self,
ConstEdgeId e,
ConstVector2f p )
converts edge and point's coordinates into edge-point representation

◆ toEdgePoint() [2/2]

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

◆ topology()

ConstPolylineTopology mrmeshpy.ConstPolyline2.topology ( self)

Reimplemented in mrmeshpy.Polyline2, and mrmeshpy.Polyline2.

◆ totalLength()

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

Member Data Documentation

◆ _offsetof_points

typing mrmeshpy.ConstPolyline2._offsetof_points = 88
staticprotected

◆ _offsetof_topology

typing mrmeshpy.ConstPolyline2._offsetof_topology = 0
staticprotected

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