MeshLib C++ Docs
Loading...
Searching...
No Matches
MR::FillingSurface::CellularSurface Namespace Reference

Surface of cylinders in a grid. More...

Classes

struct  Params

Enumerations

enum class  Type : int { Cylinder = 0 , Rect }
 Type of cellular surface base element. More...

Functions

std::vector< std::string > getTypeNames ()
 Returns the names for each type of filling.
Expected< Meshbuild (const Vector3f &size, const Params &params, const ProgressCallback &cb={})
 Build a cellular surface of size size.
Expected< Meshfill (const Mesh &mesh, const Params &params, const ProgressCallback &cb={})
 Fill given mesh with a cellular surface.
float estimateDensity (float period, float width, float r)
 Estimate the density of the cellular surface.
std::optional< float > estimateWidth (float period, float r, float targetDensity)

Detailed Description

Surface of cylinders in a grid.

Enumeration Type Documentation

◆ Type

Type of cellular surface base element.

Enumerator
Cylinder 
Rect 

Function Documentation

◆ build()

Expected< Mesh > MR::FillingSurface::CellularSurface::build ( const Vector3f & size,
const Params & params,
const ProgressCallback & cb = {} )

Build a cellular surface of size size.

◆ estimateDensity()

float MR::FillingSurface::CellularSurface::estimateDensity ( float period,
float width,
float r )

Estimate the density of the cellular surface.

◆ estimateWidth()

std::optional< float > MR::FillingSurface::CellularSurface::estimateWidth ( float period,
float r,
float targetDensity )

Estimate the width that is needed to attain the targetDensity. Inverse of estimateDensity.

Note
The width is not unique in general, no guarantees are made about which value among possible will be returned. Due to the simplification of the formula (sphere must either fully contain the intersection of cylinders or be inside it), solution not always exists.

◆ fill()

Expected< Mesh > MR::FillingSurface::CellularSurface::fill ( const Mesh & mesh,
const Params & params,
const ProgressCallback & cb = {} )

Fill given mesh with a cellular surface.

◆ getTypeNames()

std::vector< std::string > MR::FillingSurface::CellularSurface::getTypeNames ( )

Returns the names for each type of filling.