MeshLib Python Docs
Loading...
Searching...
No Matches
mrmeshpy.PolylineTopology Class Reference

Public Member Functions

bool __eq__ (self, PolylineTopology b)
 
None __init__ (self)
 
None __init__ (self, PolylineTopology arg0)
 
bool __ne__ (self, PolylineTopology b)
 
None addPart (self, PolylineTopology from_, VertMap outVmap=None, WholeEdgeMap outEmap=None)
 
None addPartByMask (self, PolylineTopology from_, UndirectedEdgeBitSet mask, VertMap outVmap=None, EdgeMap outEmap=None)
 
VertId addVertId (self)
 
None buildOpenLines (self, std_vector_Id_VertTag comp2firstVert)
 
bool checkValidity (self)
 
int computeNotLoneUndirectedEdges (self)
 
None computeValidsFromEdges (self)
 
None deleteEdge (self, UndirectedEdgeId ue)
 
None deleteEdges (self, UndirectedEdgeBitSet es)
 
VertId dest (self, Id_EdgeTag he)
 
Vector_Id_EdgeTag_VertId edgePerVertex (self)
 
None edgeReserve (self, int newCapacity)
 
int edgeSize (self)
 
Id_EdgeTag edgeWithOrg (self, VertId a)
 
Id_EdgeTag findEdge (self, VertId o, VertId d)
 
None flip (self)
 
VertBitSet getPathVertices (self, std_vector_Id_EdgeTag path)
 
VertBitSet getValidVerts (self)
 
int getVertDegree (self, VertId a)
 
VertBitSet getVertIds (self, VertBitSet region)
 
bool hasEdge (self, Id_EdgeTag e)
 
bool hasVert (self, VertId a)
 
int heapBytes (self)
 
bool isClosed (self)
 
bool isConsistentlyOriented (self)
 
bool isLoneEdge (self, Id_EdgeTag a)
 
Id_EdgeTag lastNotLoneEdge (self)
 
VertId lastValidVert (self)
 
Id_EdgeTag makeEdge (self)
 
Id_EdgeTag makeEdge (self, VertId a, VertId b)
 
Id_EdgeTag makePolyline (self, VertId vs, int num)
 
Id_EdgeTag next (self, Id_EdgeTag he)
 
int numValidVerts (self)
 
VertId org (self, Id_EdgeTag he)
 
None pack (self, VertMap outVmap=None, WholeEdgeMap outEmap=None)
 
bool read (self, typing.Any s)
 
None setOrg (self, Id_EdgeTag a, VertId v)
 
None splice (self, Id_EdgeTag a, Id_EdgeTag b)
 
Id_EdgeTag splitEdge (self, Id_EdgeTag e)
 
int undirectedEdgeSize (self)
 
int vertCapacity (self)
 
None vertReserve (self, int newCapacity)
 
None vertResize (self, int newSize)
 
None vertResizeWithReserve (self, int newSize)
 
int vertSize (self)
 
None write (self, typing.Any s)
 

Static Protected Member Functions

 _pybind11_conduit_v1_ (*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
\\ingroup PolylineGroup

Constructor & Destructor Documentation

◆ __init__() [1/2]

None mrmeshpy.PolylineTopology.__init__ ( self)
Implicit default constructor.

◆ __init__() [2/2]

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

Member Function Documentation

◆ __eq__()

bool mrmeshpy.PolylineTopology.__eq__ ( self,
PolylineTopology b )
comparison via edges (all other members are considered as not important caches)

◆ __ne__()

bool mrmeshpy.PolylineTopology.__ne__ ( self,
PolylineTopology b )

◆ _pybind11_conduit_v1_()

mrmeshpy.PolylineTopology._pybind11_conduit_v1_ ( * args,
** kwargs )
staticprotected

◆ addPart()

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

◆ addPartByMask()

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;

◆ addVertId()

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

◆ buildOpenLines()

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)

◆ checkValidity()

bool mrmeshpy.PolylineTopology.checkValidity ( self)
verifies that all internal data structures are valid

◆ computeNotLoneUndirectedEdges()

int mrmeshpy.PolylineTopology.computeNotLoneUndirectedEdges ( self)
computes the number of not-lone (valid) undirected edges

◆ computeValidsFromEdges()

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

◆ deleteEdge()

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

◆ deleteEdges()

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

◆ dest()

VertId mrmeshpy.PolylineTopology.dest ( self,
Id_EdgeTag he )
returns destination vertex of half-edge

◆ edgePerVertex()

Vector_Id_EdgeTag_VertId mrmeshpy.PolylineTopology.edgePerVertex ( self)
for all valid vertices this vector contains an edge with the origin there

◆ edgeReserve()

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

◆ edgeSize()

int mrmeshpy.PolylineTopology.edgeSize ( self)
returns the number of half-edge records including lone ones

◆ edgeWithOrg()

Id_EdgeTag mrmeshpy.PolylineTopology.edgeWithOrg ( self,
VertId a )
returns valid edge if given vertex is present in the mesh

◆ findEdge()

Id_EdgeTag mrmeshpy.PolylineTopology.findEdge ( self,
VertId o,
VertId d )
finds and returns edge from o to d in the mesh; returns invalid edge otherwise

◆ flip()

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

◆ getPathVertices()

VertBitSet mrmeshpy.PolylineTopology.getPathVertices ( self,
std_vector_Id_EdgeTag path )
returns all vertices incident to path edges

◆ getValidVerts()

VertBitSet mrmeshpy.PolylineTopology.getValidVerts ( self)
returns cached set of all valid vertices

◆ getVertDegree()

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

◆ getVertIds()

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

◆ hasEdge()

bool mrmeshpy.PolylineTopology.hasEdge ( self,
Id_EdgeTag e )
returns true if given edge is within valid range and not-lone

◆ hasVert()

bool mrmeshpy.PolylineTopology.hasVert ( self,
VertId a )
returns true if given vertex is present in the mesh

◆ heapBytes()

int mrmeshpy.PolylineTopology.heapBytes ( self)
returns the amount of memory this object occupies on heap

◆ isClosed()

bool mrmeshpy.PolylineTopology.isClosed ( self)
returns true if the polyline does not have any holes

◆ isConsistentlyOriented()

bool mrmeshpy.PolylineTopology.isConsistentlyOriented ( self)
returns true if for each edge e: e == e.next() || e.odd() == next( e ).sym().odd()

◆ isLoneEdge()

bool 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)

◆ lastNotLoneEdge()

Id_EdgeTag mrmeshpy.PolylineTopology.lastNotLoneEdge ( self)
returns last not lone edge id, or invalid id if no such edge exists

◆ lastValidVert()

VertId mrmeshpy.PolylineTopology.lastValidVert ( self)
returns last valid vertex id, or invalid id if no single valid vertex exists

◆ makeEdge() [1/2]

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

◆ makeEdge() [2/2]

Id_EdgeTag 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

◆ makePolyline()

Id_EdgeTag 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

◆ next()

Id_EdgeTag mrmeshpy.PolylineTopology.next ( self,
Id_EdgeTag he )
next (counter clock wise) half-edge in the origin ring

◆ numValidVerts()

int mrmeshpy.PolylineTopology.numValidVerts ( self)
returns the number of valid vertices

◆ org()

VertId mrmeshpy.PolylineTopology.org ( self,
Id_EdgeTag he )
returns origin vertex of half-edge

◆ 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 )

◆ setOrg()

None 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

◆ splice()

None 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

◆ splitEdge()

Id_EdgeTag 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)

◆ undirectedEdgeSize()

int mrmeshpy.PolylineTopology.undirectedEdgeSize ( self)
returns the number of undirected edges (pairs of half-edges) including lone ones

◆ vertCapacity()

int mrmeshpy.PolylineTopology.vertCapacity ( self)
returns the number of allocated vert records

◆ 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

◆ vertSize()

int mrmeshpy.PolylineTopology.vertSize ( self)
returns the number of vertex records including invalid ones

◆ write()

None mrmeshpy.PolylineTopology.write ( self,
typing.Any s )
saves and loads in binary stream

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