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

Classes

class  LargeByLengthComponentsSettings
 

Static Public Member Functions

std_vector_TypedBitSet_Id_UndirectedEdgeTag getAllComponents (PolylineTopology topology)
 
tuple[std_vector_TypedBitSet_Id_UndirectedEdgeTag, int] getAllComponents (PolylineTopology topology, int maxComponentCount)
 
UndirectedEdgeBitSet getComponent (PolylineTopology topology, UndirectedEdgeId id)
 
UndirectedEdgeBitSet getLargestComponent (Polyline2 polyline, float minLength=0, int_output numSmallerComponents=None)
 
UndirectedEdgeBitSet getLargestComponent (Polyline3 polyline, float minLength=0, int_output numSmallerComponents=None)
 
std_vector_TypedBitSet_Id_UndirectedEdgeTag getNLargeByLengthComponents (Polyline2 polyline, PolylineComponents.LargeByLengthComponentsSettings settings)
 
std_vector_TypedBitSet_Id_UndirectedEdgeTag getNLargeByLengthComponents (Polyline3 polyline, PolylineComponents.LargeByLengthComponentsSettings settings)
 
int getNumComponents (PolylineTopology topology)
 
UnionFind_UndirectedEdgeId getUnionFindStructure (PolylineTopology topology)
 

Detailed Description

This is a namespace.

Member Function Documentation

◆ getAllComponents() [1/2]

std_vector_TypedBitSet_Id_UndirectedEdgeTag mrmeshpy.PolylineComponents.getAllComponents ( PolylineTopology topology)
static
gets all connected components of polyline topology
\\note be careful, if mesh is large enough and has many components, the memory overflow will occur

◆ getAllComponents() [2/2]

tuple[std_vector_TypedBitSet_Id_UndirectedEdgeTag, int] mrmeshpy.PolylineComponents.getAllComponents ( PolylineTopology topology,
int maxComponentCount )
static
gets all connected components of polyline topology
\\detail if components  number more than the maxComponentCount, they will be combined into groups of the same size 
\\param maxComponentCount should be more then 1
\\return pair components bitsets vector and number components in one group if components number more than maxComponentCount

◆ getComponent()

UndirectedEdgeBitSet mrmeshpy.PolylineComponents.getComponent ( PolylineTopology topology,
UndirectedEdgeId id )
static
returns one connected component containing given undirected edge id, 
not effective to call more than once, if several components are needed use getAllComponents

◆ getLargestComponent() [1/2]

UndirectedEdgeBitSet mrmeshpy.PolylineComponents.getLargestComponent ( Polyline2 polyline,
float minLength = 0,
int_output numSmallerComponents = None )
static
returns largest by length component

◆ getLargestComponent() [2/2]

UndirectedEdgeBitSet mrmeshpy.PolylineComponents.getLargestComponent ( Polyline3 polyline,
float minLength = 0,
int_output numSmallerComponents = None )
static
returns largest by length component

◆ getNLargeByLengthComponents() [1/2]

std_vector_TypedBitSet_Id_UndirectedEdgeTag mrmeshpy.PolylineComponents.getNLargeByLengthComponents ( Polyline2 polyline,
PolylineComponents.LargeByLengthComponentsSettings settings )
static
returns requested number of largest by length connected components in descending by length order

◆ getNLargeByLengthComponents() [2/2]

std_vector_TypedBitSet_Id_UndirectedEdgeTag mrmeshpy.PolylineComponents.getNLargeByLengthComponents ( Polyline3 polyline,
PolylineComponents.LargeByLengthComponentsSettings settings )
static
returns requested number of largest by length connected components in descending by length order

◆ getNumComponents()

int mrmeshpy.PolylineComponents.getNumComponents ( PolylineTopology topology)
static
returns the number of connected components in polyline

◆ getUnionFindStructure()

UnionFind_UndirectedEdgeId mrmeshpy.PolylineComponents.getUnionFindStructure ( PolylineTopology topology)
static
gets union-find structure for given polyline

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