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

Public Member Functions

None __init__ (self)
None __init__ (self, ConstPolylineTopology arg0)
None addPart (self, ConstPolylineTopology from_, VertMap outVmap=None, WholeEdgeMap outEmap=None)
None addPartByMask (self, ConstPolylineTopology from_, ConstUndirectedEdgeBitSet mask, VertMap outVmap=None, EdgeMap outEmap=None)
VertId addVertId (self)
PolylineTopology assign (self, ConstPolylineTopology other)
None buildOpenLines (self, Const_std_vector_Id_VertTag comp2firstVert)
None computeValidsFromEdges (self)
None deleteEdge (self, ConstUndirectedEdgeId ue)
None deleteEdges (self, ConstUndirectedEdgeBitSet es)
None edgeReserve (self, int newCapacity)
None flip (self)
EdgeId makeEdge (self)
EdgeId makeEdge (self, ConstVertId a, ConstVertId b, ConstEdgeId e=...)
int makeEdges (self, ConstEdges edges)
EdgeId makePolyline (self, ConstVertId vs, int num)
None pack (self, VertMap outVmap=None, WholeEdgeMap outEmap=None)
bool read (self, typing.Any s)
None setOrg (self, ConstEdgeId a, ConstVertId v)
None splice (self, ConstEdgeId a, ConstEdgeId b)
EdgeId splitEdge (self, ConstEdgeId e)
None vertReserve (self, int newCapacity)
None vertResize (self, int newSize)
None vertResizeWithReserve (self, int newSize)
Public Member Functions inherited from mrmeshpy.ConstPolylineTopology
bool __eq__ (self, ConstPolylineTopology b)
 __init__ (self, *args, **kwargs)
bool __ne__ (self, ConstPolylineTopology b)
bool checkValidity (self)
int computeNotLoneUndirectedEdges (self)
VertId dest (self, ConstEdgeId he)
int edgeCapacity (self)
ConstVector_EdgeId_VertId edgePerVertex (self)
int edgeSize (self)
EdgeId edgeWithOrg (self, ConstVertId a)
EdgeId findEdge (self, ConstVertId o, ConstVertId d)
Vector_VertId_EdgeId getOrgs (self)
VertBitSet getPathVertices (self, Const_std_vector_Id_EdgeTag path)
ConstVertBitSet getValidVerts (self)
int getVertDegree (self, ConstVertId a)
ConstVertBitSet getVertIds (self, ConstVertBitSet region)
bool hasEdge (self, ConstEdgeId e)
bool hasVert (self, ConstVertId a)
int heapBytes (self)
bool isClosed (self)
bool isConsistentlyOriented (self)
bool isLoneEdge (self, ConstEdgeId a)
EdgeId lastNotLoneEdge (self)
UndirectedEdgeId lastNotLoneUndirectedEdge (self)
VertId lastValidVert (self)
EdgeId next (self, ConstEdgeId he)
int numValidVerts (self)
VertId org (self, ConstEdgeId he)
int undirectedEdgeCapacity (self)
int undirectedEdgeSize (self)
int vertCapacity (self)
int vertSize (self)
None write (self, typing.Any s)

Static Public Member Functions

None __init__ (*args, **kwargs)

Detailed Description

Generated from:  MR::PolylineTopology

topology of one or several polylines (how line segments are connected in lines) common for 2D and 3D polylines

Constructor & Destructor Documentation

◆ __init__() [1/3]

None mrmeshpy.PolylineTopology.__init__ ( * args,
** kwargs )
static

◆ __init__() [2/3]

None mrmeshpy.PolylineTopology.__init__ ( self)

◆ __init__() [3/3]

None mrmeshpy.PolylineTopology.__init__ ( self,
ConstPolylineTopology arg0 )
Implicit copy constructor.

Member Function Documentation

◆ addPart()

None mrmeshpy.PolylineTopology.addPart ( self,
ConstPolylineTopology 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

◆ addPartByMask()

None mrmeshpy.PolylineTopology.addPartByMask ( self,
ConstPolylineTopology from_,
ConstUndirectedEdgeBitSet mask,
VertMap outVmap = None,
EdgeMap outEmap = None )
appends polyline topology (from) in addition to the current topology: creates new edges, verts;

◆ addVertId()

VertId mrmeshpy.PolylineTopology.addVertId ( self)
creates new vert-id not associated with any edge yet

◆ assign()

PolylineTopology mrmeshpy.PolylineTopology.assign ( self,
ConstPolylineTopology other )

◆ buildOpenLines()

None mrmeshpy.PolylineTopology.buildOpenLines ( self,
Const_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)

◆ computeValidsFromEdges()

None mrmeshpy.PolylineTopology.computeValidsFromEdges ( self)
computes numValidVerts_ and validVerts_ from edgePerVertex_

◆ deleteEdge()

None mrmeshpy.PolylineTopology.deleteEdge ( self,
ConstUndirectedEdgeId 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

◆ deleteEdges()

None mrmeshpy.PolylineTopology.deleteEdges ( self,
ConstUndirectedEdgeBitSet es )
calls deleteEdge for every set bit

◆ edgeReserve()

None mrmeshpy.PolylineTopology.edgeReserve ( self,
int newCapacity )
sets the capacity of half-edges vector

◆ flip()

None mrmeshpy.PolylineTopology.flip ( self)
changes the orientation of all edges: every edge e is replaced with e.sym()

◆ makeEdge() [1/2]

EdgeId mrmeshpy.PolylineTopology.makeEdge ( self)
creates an edge not associated with any vertex

◆ makeEdge() [2/2]

EdgeId mrmeshpy.PolylineTopology.makeEdge ( self,
ConstVertId a,
ConstVertId b,
ConstEdgeId e = ... )
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

◆ makeEdges()

int mrmeshpy.PolylineTopology.makeEdges ( self,
ConstEdges 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

◆ makePolyline()

EdgeId mrmeshpy.PolylineTopology.makePolyline ( self,
ConstVertId 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

◆ pack()

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;

◆ read()

bool mrmeshpy.PolylineTopology.read ( self,
typing.Any s )
loads this from binary stream

◆ setOrg()

None mrmeshpy.PolylineTopology.setOrg ( self,
ConstEdgeId a,
ConstVertId v )
sets new origin to the full origin ring including this edge
\\details edgePerVertex_ table is updated accordingly

◆ splice()

None mrmeshpy.PolylineTopology.splice ( self,
ConstEdgeId a,
ConstEdgeId 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

◆ splitEdge()

EdgeId mrmeshpy.PolylineTopology.splitEdge ( self,
ConstEdgeId 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)

◆ vertReserve()

None mrmeshpy.PolylineTopology.vertReserve ( self,
int newCapacity )
sets the capacity of vertices vector

◆ vertResize()

None mrmeshpy.PolylineTopology.vertResize ( self,
int newSize )
explicitly increases the size of vertices vector

◆ vertResizeWithReserve()

None mrmeshpy.PolylineTopology.vertResizeWithReserve ( self,
int newSize )
explicitly increases the size of vertices vector, doubling the current capacity if it was not enough

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