Static Public Member Functions | |
None | __init__ (*args, **kwargs) |
Polyline2 | operator (*args, **kwargs) |
Polyline2 | operator (*args, **kwargs) |
Static Protected Attributes | |
typing | _offsetof_points = 88 |
typing | _offsetof_topology = 0 |
Generated from: MR::Polyline2 Aliases: PolylineTraits_Vector2f.Polyline polyline that stores points of type V
|
static |
None mrmeshpy.Polyline2.__init__ | ( | self | ) |
None mrmeshpy.Polyline2.__init__ | ( | self, | |
std_vector_Vector2_float | contour ) |
creates polyline from one contour (open or closed)
None mrmeshpy.Polyline2.__init__ | ( | self, | |
std_vector_std_vector_Vector2_float | contours ) |
creates polyline from several contours (each can be open or closed)
None mrmeshpy.Polyline2.__init__ | ( | self, | |
std_vector_Id_VertTag | comp2firstVert, | ||
VertCoords2 | 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
EdgeId mrmeshpy.Polyline2.addFromEdgePath | ( | self, | |
Mesh | mesh, | ||
std_vector_Id_EdgeTag | path ) |
adds path to this polyline \\return the edge from first new to second new vertex
EdgeId mrmeshpy.Polyline2.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
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
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
EdgeId mrmeshpy.Polyline2.addFromSurfacePath | ( | self, | |
Mesh | mesh, | ||
std_vector_EdgePoint | path ) |
adds path to this polyline \\return the edge from first new to second new vertex
None mrmeshpy.Polyline2.addPart | ( | self, | |
Polyline2 | 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
None mrmeshpy.Polyline2.addPartByMask | ( | self, | |
Polyline2 | from_, | ||
UndirectedEdgeBitSet | mask, | ||
VertMap | outVmap = None, | ||
EdgeMap | outEmap = None ) |
appends polyline (from) in addition to this polyline: creates new edges, verts and points
float mrmeshpy.Polyline2.averageEdgeLength | ( | self | ) |
returns average edge length in the polyline
Box2f mrmeshpy.Polyline2.computeBoundingBox | ( | self, | |
AffineXf2f | 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
std_vector_std_vector_Vector2_float mrmeshpy.Polyline2.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
float mrmeshpy.Polyline2.edgeLength | ( | self, | |
EdgeId | e ) |
returns Euclidean length of the edge
float mrmeshpy.Polyline2.edgeLengthSq | ( | self, | |
EdgeId | e ) |
returns squared Euclidean length of the edge (faster to compute than length)
returns a point on the edge: origin point for f=0 and destination point for f=1
computes coordinates of point given as edge and relative position on it
LineSegm2f mrmeshpy.Polyline2.edgeSegment | ( | self, | |
EdgeId | e ) |
returns line segment of given edge
returns vector equal to edge destination point minus edge origin point
Vector2f mrmeshpy.Polyline2.findCenterFromPoints | ( | self | ) |
computes average position of all valid polyline vertices
AABBTreePolyline2 mrmeshpy.Polyline2.getAABBTree | ( | self | ) |
returns cached aabb-tree for this polyline, creating it if it did not exist in a thread-safe manner
AABBTreePolyline2 mrmeshpy.Polyline2.getAABBTreeNotCreate | ( | self | ) |
returns cached aabb-tree for this polyline, but does not create it if it did not exist
Box2f mrmeshpy.Polyline2.getBoundingBox | ( | self | ) |
returns the minimal bounding box containing all valid vertices (implemented via getAABBTree())
int mrmeshpy.Polyline2.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
None mrmeshpy.Polyline2.invalidateCaches | ( | self | ) |
Invalidates caches (e.g. aabb-tree) after a change in polyline
calculates directed loop area if iterating in `e` direction .z = FLT_MAX if `e` does not represent a loop
|
static |
|
static |
None mrmeshpy.Polyline2.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
same, but split given edge on two equal parts
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)
converts edge and point's coordinates into edge-point representation
converts vertex into edge-point representation
float mrmeshpy.Polyline2.totalLength | ( | self | ) |
returns total length of the polyline
None mrmeshpy.Polyline2.transform | ( | self, | |
AffineXf2f | xf ) |
applies given transformation to all valid polyline vertices
|
staticprotected |
|
staticprotected |