Generated from: MR::PolylineTopology topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines \\ingroup PolylineGroup
None meshlib.mrmeshpy.PolylineTopology.__init__ | ( | self | ) |
Implicit default constructor.
None meshlib.mrmeshpy.PolylineTopology.__init__ | ( | self, | |
PolylineTopology | arg0 ) |
Implicit copy constructor.
bool meshlib.mrmeshpy.PolylineTopology.__eq__ | ( | self, | |
PolylineTopology | b ) |
comparison via edges (all other members are considered as not important caches)
bool meshlib.mrmeshpy.PolylineTopology.__ne__ | ( | self, | |
PolylineTopology | b ) |
None meshlib.mrmeshpy.PolylineTopology.addPart | ( | self, | |
PolylineTopology | from_, | ||
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None ) |
appends polyline topology (from) in addition to the current topology: creates new edges, verts; \\param outVmap,outEmap (optionally) returns mappings: from.id -> this.id
None meshlib.mrmeshpy.PolylineTopology.addPartByMask | ( | self, | |
PolylineTopology | from_, | ||
UndirectedEdgeBitSet | mask, | ||
VertMap | outVmap = None, | ||
EdgeMap | outEmap = None ) |
appends polyline topology (from) in addition to the current topology: creates new edges, verts;
VertId meshlib.mrmeshpy.PolylineTopology.addVertId | ( | self | ) |
creates new vert-id not associated with any edge yet
None meshlib.mrmeshpy.PolylineTopology.buildOpenLines | ( | self, | |
std_vector_Id_VertTag | comp2firstVert ) |
build topology of comp2firstVert.size()-1 not-closed polylines each pair (a,b) of indices in \\param comp2firstVert defines vertex range of a polyline [a,b)
bool meshlib.mrmeshpy.PolylineTopology.checkValidity | ( | self | ) |
verifies that all internal data structures are valid
int meshlib.mrmeshpy.PolylineTopology.computeNotLoneUndirectedEdges | ( | self | ) |
computes the number of not-lone (valid) undirected edges
None meshlib.mrmeshpy.PolylineTopology.computeValidsFromEdges | ( | self | ) |
computes numValidVerts_ and validVerts_ from edgePerVertex_
None meshlib.mrmeshpy.PolylineTopology.deleteEdge | ( | self, | |
UndirectedEdgeId | ue ) |
given edge becomes lone after the call, so it is un-spliced from connected edges, and if it was not connected at origin or destination, then that vertex is deleted as well
None meshlib.mrmeshpy.PolylineTopology.deleteEdges | ( | self, | |
UndirectedEdgeBitSet | es ) |
calls deleteEdge for every set bit
VertId meshlib.mrmeshpy.PolylineTopology.dest | ( | self, | |
Id_EdgeTag | he ) |
returns destination vertex of half-edge
Vector_Id_EdgeTag_VertId meshlib.mrmeshpy.PolylineTopology.edgePerVertex | ( | self | ) |
for all valid vertices this vector contains an edge with the origin there
None meshlib.mrmeshpy.PolylineTopology.edgeReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of half-edges vector
int meshlib.mrmeshpy.PolylineTopology.edgeSize | ( | self | ) |
returns the number of half-edge records including lone ones
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.edgeWithOrg | ( | self, | |
VertId | a ) |
returns valid edge if given vertex is present in the mesh
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.findEdge | ( | self, | |
VertId | o, | ||
VertId | d ) |
finds and returns edge from o to d in the mesh; returns invalid edge otherwise
None meshlib.mrmeshpy.PolylineTopology.flip | ( | self | ) |
changes the orientation of all edges: every edge e is replaced with e.sym()
VertBitSet meshlib.mrmeshpy.PolylineTopology.getPathVertices | ( | self, | |
std_vector_Id_EdgeTag | path ) |
returns all vertices incident to path edges
VertBitSet meshlib.mrmeshpy.PolylineTopology.getValidVerts | ( | self | ) |
returns cached set of all valid vertices
int meshlib.mrmeshpy.PolylineTopology.getVertDegree | ( | self, | |
VertId | a ) |
returns 0 if given vertex does not exist, 1 if it has one incident edge, and 2 if it has two incident edges
VertBitSet meshlib.mrmeshpy.PolylineTopology.getVertIds | ( | self, | |
VertBitSet | region ) |
if region pointer is not null then converts it in reference, otherwise returns all valid vertices in the mesh
bool meshlib.mrmeshpy.PolylineTopology.hasEdge | ( | self, | |
Id_EdgeTag | e ) |
returns true if given edge is within valid range and not-lone
bool meshlib.mrmeshpy.PolylineTopology.hasVert | ( | self, | |
VertId | a ) |
returns true if given vertex is present in the mesh
int meshlib.mrmeshpy.PolylineTopology.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
bool meshlib.mrmeshpy.PolylineTopology.isClosed | ( | self | ) |
returns true if the polyline does not have any holes
bool meshlib.mrmeshpy.PolylineTopology.isConsistentlyOriented | ( | self | ) |
returns true if for each edge e: e == e.next() || e.odd() == next( e ).sym().odd()
bool meshlib.mrmeshpy.PolylineTopology.isLoneEdge | ( | self, | |
Id_EdgeTag | a ) |
checks whether the edge is disconnected from all other edges and disassociated from all vertices (as if after makeEdge)
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.lastNotLoneEdge | ( | self | ) |
returns last not lone edge id, or invalid id if no such edge exists
VertId meshlib.mrmeshpy.PolylineTopology.lastValidVert | ( | self | ) |
returns last valid vertex id, or invalid id if no single valid vertex exists
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.makeEdge | ( | self | ) |
creates an edge not associated with any vertex
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.makeEdge | ( | self, | |
VertId | a, | ||
VertId | b ) |
makes an edge from vertex a to b (both must be within reserved capacity for vertices) \\details if either of the vertices already has 2 incident edges, then makeEdge(a,b) fails and returns invalid edge
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.makePolyline | ( | self, | |
VertId | vs, | ||
int | num ) |
adds polyline in this topology passing progressively via vertices *[vs, vs+num); if vs[0] == vs[num-1] then a closed polyline is created; return the edge from first to second vertex
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.next | ( | self, | |
Id_EdgeTag | he ) |
next (counter clock wise) half-edge in the origin ring
int meshlib.mrmeshpy.PolylineTopology.numValidVerts | ( | self | ) |
returns the number of valid vertices
VertId meshlib.mrmeshpy.PolylineTopology.org | ( | self, | |
Id_EdgeTag | he ) |
returns origin vertex of half-edge
None meshlib.mrmeshpy.PolylineTopology.pack | ( | self, | |
VertMap | outVmap = None, | ||
WholeEdgeMap | outEmap = None ) |
tightly packs all arrays eliminating lone edges and invalid vertices \\param outVmap,outEmap if given returns mappings: old.id -> new.id;
bool meshlib.mrmeshpy.PolylineTopology.read | ( | self, | |
typing.Any | s ) |
None meshlib.mrmeshpy.PolylineTopology.setOrg | ( | self, | |
Id_EdgeTag | a, | ||
VertId | v ) |
sets new origin to the full origin ring including this edge \\details edgePerVertex_ table is updated accordingly
None meshlib.mrmeshpy.PolylineTopology.splice | ( | self, | |
Id_EdgeTag | a, | ||
Id_EdgeTag | b ) |
given two half edges do either of two: \\n 1) if a and b were from distinct rings, puts them in one ring; \\n 2) if a and b were from the same ring, puts them in separate rings; \\details the cut in rings in both cases is made after a and b
Id_EdgeTag meshlib.mrmeshpy.PolylineTopology.splitEdge | ( | self, | |
Id_EdgeTag | e ) |
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)
int meshlib.mrmeshpy.PolylineTopology.undirectedEdgeSize | ( | self | ) |
returns the number of undirected edges (pairs of half-edges) including lone ones
int meshlib.mrmeshpy.PolylineTopology.vertCapacity | ( | self | ) |
returns the number of allocated vert records
None meshlib.mrmeshpy.PolylineTopology.vertReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of vertices vector
None meshlib.mrmeshpy.PolylineTopology.vertResize | ( | self, | |
int | newSize ) |
explicitly increases the size of vertices vector
None meshlib.mrmeshpy.PolylineTopology.vertResizeWithReserve | ( | self, | |
int | newSize ) |
explicitly increases the size of vertices vector, doubling the current capacity if it was not enough
int meshlib.mrmeshpy.PolylineTopology.vertSize | ( | self | ) |
returns the number of vertex records including invalid ones
None meshlib.mrmeshpy.PolylineTopology.write | ( | self, | |
typing.Any | s ) |
saves and loads in binary stream