Generated from: MR::Polyline3 Aliases: Polyline_Vector3f, PolylineTraits_Vector3f.Polyline, PolylineTraits_Vector3f.Polyline, Polyline_Vector3f polyline that stores points of type V \\ingroup PolylineGroup
None meshlib.mrmeshpy.Polyline3.__init__ | ( | self | ) |
None meshlib.mrmeshpy.Polyline3.__init__ | ( | self, | |
std_vector_std_vector_Vector2_float | contours ) |
creates polyline from 2D contours, 3D polyline will get zero z-component
None meshlib.mrmeshpy.Polyline3.__init__ | ( | self, | |
std_vector_std_vector_Vector3_float | contours ) |
creates polyline from 3D contours, 2D polyline will lose z-component
None meshlib.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
None meshlib.mrmeshpy.Polyline3.__init__ | ( | self, | |
Polyline3 | arg0 ) |
Implicit copy constructor.
Id_EdgeTag meshlib.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
Id_EdgeTag meshlib.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
Id_EdgeTag meshlib.mrmeshpy.Polyline3.addFromPoints | ( | self, | |
Vector3f | vs, | ||
int | num ) |
adds connected line in this, passing progressively via points *[vs, vs+num) \\details if vs[0] == vs[num-1] then a closed line is created \\return the edge from first new to second new vertex
Id_EdgeTag meshlib.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
Id_EdgeTag meshlib.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
None meshlib.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
None meshlib.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
Box3f meshlib.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
std_vector_std_vector_Vector3_float meshlib.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
std_vector_std_vector_Vector2_float meshlib.mrmeshpy.Polyline3.contours2 | ( | self, | |
std_vector_std_vector_Id_VertTag | vertMap = None ) |
convert Polyline to simple 2D 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
Vector3f meshlib.mrmeshpy.Polyline3.destPnt | ( | self, | |
Id_EdgeTag | e ) |
returns coordinates of the edge destination
Vector3f meshlib.mrmeshpy.Polyline3.edgeCenter | ( | self, | |
Id_EdgeTag | e ) |
returns edge's centroid
float meshlib.mrmeshpy.Polyline3.edgeLength | ( | self, | |
Id_EdgeTag | e ) |
returns Euclidean length of the edge
float meshlib.mrmeshpy.Polyline3.edgeLengthSq | ( | self, | |
Id_EdgeTag | e ) |
returns squared Euclidean length of the edge (faster to compute than length)
computes coordinates of point given as edge and relative position on it
Vector3f meshlib.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
LineSegm3f meshlib.mrmeshpy.Polyline3.edgeSegment | ( | self, | |
Id_EdgeTag | e ) |
returns line segment of given edge
Vector3f meshlib.mrmeshpy.Polyline3.edgeVector | ( | self, | |
Id_EdgeTag | e ) |
returns vector equal to edge destination point minus edge origin point
Vector3f meshlib.mrmeshpy.Polyline3.findCenterFromPoints | ( | self | ) |
computes average position of all valid polyline vertices
AABBTreePolyline3 meshlib.mrmeshpy.Polyline3.getAABBTree | ( | self | ) |
returns cached aabb-tree for this polyline, creating it if it did not exist in a thread-safe manner
AABBTreePolyline3 meshlib.mrmeshpy.Polyline3.getAABBTreeNotCreate | ( | self | ) |
returns cached aabb-tree for this polyline, but does not create it if it did not exist
Box3f meshlib.mrmeshpy.Polyline3.getBoundingBox | ( | self | ) |
returns the minimal bounding box containing all valid vertices (implemented via getAABBTree())
int meshlib.mrmeshpy.Polyline3.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
None meshlib.mrmeshpy.Polyline3.invalidateCaches | ( | self | ) |
Invalidates caches (e.g. aabb-tree) after a change in polyline
Vector3f meshlib.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
Vector3f meshlib.mrmeshpy.Polyline3.orgPnt | ( | self, | |
Id_EdgeTag | e ) |
returns coordinates of the edge origin
None meshlib.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
Id_EdgeTag meshlib.mrmeshpy.Polyline3.splitEdge | ( | self, | |
Id_EdgeTag | e ) |
same, but split given edge on two equal parts
Id_EdgeTag meshlib.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)
EdgePoint meshlib.mrmeshpy.Polyline3.toEdgePoint | ( | self, | |
Id_EdgeTag | e, | ||
Vector3f | p ) |
converts edge and point's coordinates into edge-point representation
converts vertex into edge-point representation
float meshlib.mrmeshpy.Polyline3.totalLength | ( | self | ) |
returns total length of the polyline
None meshlib.mrmeshpy.Polyline3.transform | ( | self, | |
AffineXf3f | xf ) |
applies given transformation to all valid polyline vertices