MeshLib JavaScript Docs
Loading...
Searching...
No Matches
MeshComponents Class Reference

Static Public Member Functions

static FaceBitSet getComponent (Mesh meshPart, number id, MeshComponentsFaceIncidence incidence)
static FaceBitSet getComponents (Mesh meshPart, FaceBitSet seeds, MeshComponentsFaceIncidence incidence)
 returns union of connected components, each of which contains at least one seed face
static FaceBitSet getLargestComponent (Mesh meshPart, MeshComponentsFaceIncidence incidence, number minArea)
 returns the largest by surface area component or empty set if its area is smaller than
static FaceBitSet getLargeByAreaComponents (Mesh mp, number minArea)
 returns the union of connected components, each having at least given area
static number getNumComponents (Mesh meshPart, MeshComponentsFaceIncidence incidence)
 returns the number of connected components in mesh part
static FaceBitSet getAllComponents (Mesh meshPart, MeshComponentsFaceIncidence incidence)
static ComponentsMapResult getAllComponentsMap (Mesh meshPart, MeshComponentsFaceIncidence incidence)
static LargeByAreaRegionsResult getLargeByAreaRegions (Mesh meshPart, Face2RegionMap regionMap, number numRegions, number minArea)

Member Function Documentation

◆ getAllComponents()

FaceBitSet MeshComponents::getAllComponents ( Mesh meshPart,
MeshComponentsFaceIncidence incidence )
static

gets all connected components of mesh part @detail if components number more than the maxComponentCount, they will be combined into groups of the same size

Parameters
maxComponentCountshould be more than 1
Returns
pair components bitsets vector and number components in one group if components number more than maxComponentCount

◆ getAllComponentsMap()

ComponentsMapResult MeshComponents::getAllComponentsMap ( Mesh meshPart,
MeshComponentsFaceIncidence incidence )
static

gets all connected components of mesh part as

  1. the mapping: FaceId -> Component ID in [0, 1, 2, ...)
  2. the total number of components

◆ getComponent()

FaceBitSet MeshComponents::getComponent ( Mesh meshPart,
number id,
MeshComponentsFaceIncidence incidence )
static

returns one connected component containing given face, not effective to call more than once, if several components are needed use getAllComponents

◆ getComponents()

FaceBitSet MeshComponents::getComponents ( Mesh meshPart,
FaceBitSet seeds,
MeshComponentsFaceIncidence incidence )
static

returns union of connected components, each of which contains at least one seed face

◆ getLargeByAreaComponents()

FaceBitSet MeshComponents::getLargeByAreaComponents ( Mesh mp,
number minArea )
static

returns the union of connected components, each having at least given area

◆ getLargeByAreaRegions()

LargeByAreaRegionsResult MeshComponents::getLargeByAreaRegions ( Mesh meshPart,
Face2RegionMap regionMap,
number numRegions,
number minArea )
static

returns

  1. the union of all regions with area >= minArea
  2. the number of such regions

◆ getLargestComponent()

FaceBitSet MeshComponents::getLargestComponent ( Mesh meshPart,
MeshComponentsFaceIncidence incidence,
number minArea )
static

returns the largest by surface area component or empty set if its area is smaller than

Parameters
minAreaoptional output: the number of components in addition to returned one

◆ getNumComponents()

number MeshComponents::getNumComponents ( Mesh meshPart,
MeshComponentsFaceIncidence incidence )
static

returns the number of connected components in mesh part


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