Static Public Member Functions | |
None | __init__ (*args, **kwargs) |
PolylineTopology | operator (*args, **kwargs) |
PolylineTopology | operator (*args, **kwargs) |
Generated from: MR::PolylineTopology topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines
|
static |
None mrmeshpy.PolylineTopology.__init__ | ( | self | ) |
bool mrmeshpy.PolylineTopology.__eq__ | ( | self, | |
PolylineTopology | b ) |
comparison via edges (all other members are considered as not important caches)
bool mrmeshpy.PolylineTopology.__ne__ | ( | self, | |
PolylineTopology | b ) |
None 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 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 mrmeshpy.PolylineTopology.addVertId | ( | self | ) |
creates new vert-id not associated with any edge yet
None 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 mrmeshpy.PolylineTopology.checkValidity | ( | self | ) |
verifies that all internal data structures are valid
int mrmeshpy.PolylineTopology.computeNotLoneUndirectedEdges | ( | self | ) |
computes the number of not-lone (valid) undirected edges
None mrmeshpy.PolylineTopology.computeValidsFromEdges | ( | self | ) |
computes numValidVerts_ and validVerts_ from edgePerVertex_
None 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 mrmeshpy.PolylineTopology.deleteEdges | ( | self, | |
UndirectedEdgeBitSet | es ) |
calls deleteEdge for every set bit
int mrmeshpy.PolylineTopology.edgeCapacity | ( | self | ) |
returns the number of allocated edge records
Vector_EdgeId_VertId mrmeshpy.PolylineTopology.edgePerVertex | ( | self | ) |
for all valid vertices this vector contains an edge with the origin there
None mrmeshpy.PolylineTopology.edgeReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of half-edges vector
int mrmeshpy.PolylineTopology.edgeSize | ( | self | ) |
returns the number of half-edge records including lone ones
returns valid edge if given vertex is present in the mesh
finds and returns edge from o to d in the mesh; returns invalid edge otherwise
None mrmeshpy.PolylineTopology.flip | ( | self | ) |
changes the orientation of all edges: every edge e is replaced with e.sym()
Vector_VertId_EdgeId mrmeshpy.PolylineTopology.getOrgs | ( | self | ) |
for all edges this vector contains its origin
VertBitSet mrmeshpy.PolylineTopology.getPathVertices | ( | self, | |
std_vector_Id_EdgeTag | path ) |
returns all vertices incident to path edges
VertBitSet mrmeshpy.PolylineTopology.getValidVerts | ( | self | ) |
returns cached set of all valid vertices
int 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 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 mrmeshpy.PolylineTopology.hasEdge | ( | self, | |
EdgeId | e ) |
returns true if given edge is within valid range and not-lone
bool mrmeshpy.PolylineTopology.hasVert | ( | self, | |
VertId | a ) |
returns true if given vertex is present in the mesh
int mrmeshpy.PolylineTopology.heapBytes | ( | self | ) |
returns the amount of memory this object occupies on heap
bool mrmeshpy.PolylineTopology.isClosed | ( | self | ) |
returns true if the polyline does not have any holes
bool mrmeshpy.PolylineTopology.isConsistentlyOriented | ( | self | ) |
returns true if for each edge e: e == e.next() || e.odd() == next( e ).sym().odd()
bool mrmeshpy.PolylineTopology.isLoneEdge | ( | self, | |
EdgeId | a ) |
checks whether the edge is disconnected from all other edges and disassociated from all vertices (as if after makeEdge)
EdgeId mrmeshpy.PolylineTopology.lastNotLoneEdge | ( | self | ) |
returns last not lone edge id, or invalid id if no such edge exists
UndirectedEdgeId mrmeshpy.PolylineTopology.lastNotLoneUndirectedEdge | ( | self | ) |
returns last not lone undirected edge id, or invalid id if no such edge exists
VertId mrmeshpy.PolylineTopology.lastValidVert | ( | self | ) |
returns last valid vertex id, or invalid id if no single valid vertex exists
EdgeId mrmeshpy.PolylineTopology.makeEdge | ( | self | ) |
creates an edge not associated with any vertex
makes an edge connecting vertices a and b \\param e if valid then the function does not make new edge, but connects the vertices using given one (and returns it) \\details if 1) any of the vertices is invalid or not within the vertSize(), 2) or a==b, 3) or either a or b already has 2 incident edges, 4) given edge e is not lone or not within the edgeSize() then makeEdge(a,b) does nothing and returns invalid edge
int mrmeshpy.PolylineTopology.makeEdges | ( | self, | |
Edges | edges ) |
for every given edge[ue] calls makeEdge( edge[ue][0], edge[ue][1], ue ), making new edges so that edges.size() <= undirectedEdgeSize() at the end \\return the total number of edges created
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
next (counter clock wise) half-edge in the origin ring
int mrmeshpy.PolylineTopology.numValidVerts | ( | self | ) |
returns the number of valid vertices
|
static |
|
static |
None 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 mrmeshpy.PolylineTopology.read | ( | self, | |
typing.Any | s ) |
loads this from binary stream
sets new origin to the full origin ring including this edge \\details edgePerVertex_ table is updated accordingly
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
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 mrmeshpy.PolylineTopology.undirectedEdgeCapacity | ( | self | ) |
returns the number of allocated undirected edges (pairs of half-edges)
int mrmeshpy.PolylineTopology.undirectedEdgeSize | ( | self | ) |
returns the number of undirected edges (pairs of half-edges) including lone ones
int mrmeshpy.PolylineTopology.vertCapacity | ( | self | ) |
returns the number of allocated vert records
None mrmeshpy.PolylineTopology.vertReserve | ( | self, | |
int | newCapacity ) |
sets the capacity of vertices vector
None mrmeshpy.PolylineTopology.vertResize | ( | self, | |
int | newSize ) |
explicitly increases the size of vertices vector
None mrmeshpy.PolylineTopology.vertResizeWithReserve | ( | self, | |
int | newSize ) |
explicitly increases the size of vertices vector, doubling the current capacity if it was not enough
int mrmeshpy.PolylineTopology.vertSize | ( | self | ) |
returns the number of vertex records including invalid ones
None mrmeshpy.PolylineTopology.write | ( | self, | |
typing.Any | s ) |
saves this in binary stream