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

Triply Periodic Minimal Surface. More...

Classes

struct  MeshParams
struct  VolumeParams

Enumerations

enum class  Type : int {
  SchwartzP , ThickSchwartzP , DoubleGyroid , ThickGyroid ,
  Count
}
 Supported types of TPMS (Triply Periodic Minimal Surfaces) More...

Functions

std::vector< std::string > getTypeNames ()
 Returns the names for each type of filling.
std::vector< std::string > getTypeTooltips ()
 Returns the tooltips for each type of filling.
bool isThick (Type type)
 Returns true if the type is thick.
FunctionVolume buildVolume (const Vector3f &size, const VolumeParams &params)
Expected< Meshbuild (const Vector3f &size, const MeshParams &params, ProgressCallback cb={})
 Constructs TPMS level-set and then convert it to mesh.
Expected< Meshfill (const Mesh &mesh, const MeshParams &params, ProgressCallback cb={})
 Constructs TPMS-filling for the given mesh.
size_t getNumberOfVoxels (const Mesh &mesh, float frequency, float resolution)
 Returns number of voxels that would be used to perform fillWithTPMS.
size_t getNumberOfVoxels (const Vector3f &size, float frequency, float resolution)
 Returns number of voxels that would be used to perform buildTPMS or buildTPMSVolume.
float estimateIso (Type type, float targetDensity)
float estimateDensity (Type type, float targetIso)
float getMinimalResolution (Type type, float iso)
 Returns minimal reasonable resolution for given parameters.

Detailed Description

Triply Periodic Minimal Surface.

Enumeration Type Documentation

◆ Type

enum class MR::FillingSurface::TPMS::Type : int
strong

Supported types of TPMS (Triply Periodic Minimal Surfaces)

Enumerator
SchwartzP 
ThickSchwartzP 
DoubleGyroid 
ThickGyroid 
Count 

Function Documentation

◆ build()

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

Constructs TPMS level-set and then convert it to mesh.

◆ buildVolume()

FunctionVolume MR::FillingSurface::TPMS::buildVolume ( const Vector3f & size,
const VolumeParams & params )

Construct TPMS using implicit function (https:/// www.researchgate.net/publication/350658078_Computational_method_and_program_for_generating_a_porous_scaffold_based_on_implicit_surfaces)

Parameters
sizeSize of the cube with the surface
Returns
Distance-volume starting at (0, 0, 0) and having specified size

◆ estimateDensity()

float MR::FillingSurface::TPMS::estimateDensity ( Type type,
float targetIso )

Returns approximate density corresponding to the given ISO value

Parameters
targetIsovalue in [-1; 1]
Returns
Value in [0; 1]

◆ estimateIso()

float MR::FillingSurface::TPMS::estimateIso ( Type type,
float targetDensity )

Returns approximated ISO value corresponding to the given density

Parameters
targetDensityvalue in [0; 1]
Returns
Value in [-1; 1]

◆ fill()

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

Constructs TPMS-filling for the given mesh.

◆ getMinimalResolution()

float MR::FillingSurface::TPMS::getMinimalResolution ( Type type,
float iso )

Returns minimal reasonable resolution for given parameters.

◆ getNumberOfVoxels() [1/2]

size_t MR::FillingSurface::TPMS::getNumberOfVoxels ( const Mesh & mesh,
float frequency,
float resolution )

Returns number of voxels that would be used to perform fillWithTPMS.

◆ getNumberOfVoxels() [2/2]

size_t MR::FillingSurface::TPMS::getNumberOfVoxels ( const Vector3f & size,
float frequency,
float resolution )

Returns number of voxels that would be used to perform buildTPMS or buildTPMSVolume.

◆ getTypeNames()

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

Returns the names for each type of filling.

◆ getTypeTooltips()

std::vector< std::string > MR::FillingSurface::TPMS::getTypeTooltips ( )

Returns the tooltips for each type of filling.

◆ isThick()

bool MR::FillingSurface::TPMS::isThick ( Type type)

Returns true if the type is thick.