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

Classes

class  ConstLargeByLengthComponentsSettings
class  LargeByLengthComponentsSettings

Static Public Member Functions

std_vector_TypedBitSet_Id_UndirectedEdgeTag getAllComponents (ConstPolylineTopology topology)
tuple[std_vector_TypedBitSet_Id_UndirectedEdgeTag, int] getAllComponents (ConstPolylineTopology topology, int maxComponentCount)
UndirectedEdgeBitSet getComponent (ConstPolylineTopology topology, ConstUndirectedEdgeId id)
UndirectedEdgeBitSet getLargestComponent (ConstPolyline2 polyline, float minLength=0, int_output numSmallerComponents=None)
UndirectedEdgeBitSet getLargestComponent (ConstPolyline3 polyline, float minLength=0, int_output numSmallerComponents=None)
std_vector_TypedBitSet_Id_UndirectedEdgeTag getNLargeByLengthComponents (ConstPolyline2 polyline, PolylineComponents.ConstLargeByLengthComponentsSettings settings)
std_vector_TypedBitSet_Id_UndirectedEdgeTag getNLargeByLengthComponents (ConstPolyline3 polyline, PolylineComponents.ConstLargeByLengthComponentsSettings settings)
int getNumComponents (ConstPolylineTopology topology)
UnionFind_UndirectedEdgeId getUnionFindStructure (ConstPolylineTopology topology)

Detailed Description

This is a namespace.

Member Function Documentation

◆ getAllComponents() [1/2]

std_vector_TypedBitSet_Id_UndirectedEdgeTag mrmeshpy.PolylineComponents.getAllComponents ( ConstPolylineTopology 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 ( ConstPolylineTopology topology,
int maxComponentCount )
static
gets all connected components of polyline topology
\\details if components  number more than the maxComponentCount, they will be combined into groups of the same size
\\param maxComponentCount should be more than 1
\\return pair components bitsets vector and number components in one group if components number more than maxComponentCount

◆ getComponent()

UndirectedEdgeBitSet mrmeshpy.PolylineComponents.getComponent ( ConstPolylineTopology topology,
ConstUndirectedEdgeId 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 ( ConstPolyline2 polyline,
float minLength = 0,
int_output numSmallerComponents = None )
static
returns largest by length component

◆ getLargestComponent() [2/2]

UndirectedEdgeBitSet mrmeshpy.PolylineComponents.getLargestComponent ( ConstPolyline3 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 ( ConstPolyline2 polyline,
PolylineComponents.ConstLargeByLengthComponentsSettings 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 ( ConstPolyline3 polyline,
PolylineComponents.ConstLargeByLengthComponentsSettings settings )
static
returns requested number of largest by length connected components in descending by length order

◆ getNumComponents()

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

◆ getUnionFindStructure()

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

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