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

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

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

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()

MRVOXELS_API 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()

MRVOXELS_API 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()

MRVOXELS_API 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()

MRVOXELS_API 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()

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

Constructs TPMS-filling for the given mesh.

◆ getMinimalResolution()

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

Returns minimal reasonable resolution for given parameters.

◆ getNumberOfVoxels() [1/2]

MRVOXELS_API 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]

MRVOXELS_API 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()

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

Returns the names for each type of filling.

◆ getTypeTooltips()

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

Returns the tooltips for each type of filling.

◆ isThick()

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

Returns true if the type is thick.