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

Classes

struct  DistMapImproveDirectionParameters
 
struct  FindParams
 Parameters that is used to find undercuts. More...
 
struct  FixParams
 Fix undercuts function paramters. More...
 
struct  ImproveDirectionParameters
 

Typedefs

using UndercutMetric = std::function<double( const FaceBitSet&, const FindParams& params )>
 

Functions

MRVOXELS_API void fixUndercuts (Mesh &mesh, const Vector3f &upDirection, float voxelSize=0.0f, float bottomExtension=0.0f)
 
MRVOXELS_API void fixUndercuts (Mesh &mesh, const FaceBitSet &selectedArea, const Vector3f &upDirection, float voxelSize=0.0f, float bottomExtension=0.0f)
 
MRVOXELS_API Expected< void > fix (Mesh &mesh, const FixParams &params)
 
MRVOXELS_API UndercutMetric getUndercutAreaMetric (const Mesh &mesh)
 returns the metric that computes total area of undercut faces
 
MRVOXELS_API UndercutMetric getUndercutAreaProjectionMetric (const Mesh &mesh)
 returns the metric that computes summed absolute projected area of undercut
 
MRVOXELS_API void findUndercuts (const Mesh &mesh, const Vector3f &upDirection, FaceBitSet &outUndercuts)
 Adds to.
 
MRVOXELS_API void findUndercuts (const Mesh &mesh, const Vector3f &upDirection, VertBitSet &outUndercuts)
 Adds to.
 
MRVOXELS_API double findUndercuts (const Mesh &mesh, const Vector3f &upDirection, FaceBitSet &outUndercuts, const UndercutMetric &metric)
 
MRVOXELS_API double find (const Mesh &mesh, const FindParams &params, FaceBitSet &outUndercuts, const UndercutMetric &metric={})
 
MRVOXELS_API void find (const Mesh &mesh, const FindParams &params, VertBitSet &outUndercuts)
 Adds undercuts to.
 
MRVOXELS_API double scoreUndercuts (const Mesh &mesh, const Vector3f &upDirection, const Vector2i &resolution)
 
MRVOXELS_API Vector3f improveDirection (const Mesh &mesh, const ImproveDirectionParameters &params, const UndercutMetric &metric)
 
MRVOXELS_API Vector3f distMapImproveDirection (const Mesh &mesh, const DistMapImproveDirectionParameters &params)
 

Typedef Documentation

◆ UndercutMetric

using MR::FixUndercuts::UndercutMetric = std::function<double( const FaceBitSet&, const FindParams& params )>

Function Documentation

◆ distMapImproveDirection()

MRVOXELS_API Vector3f MR::FixUndercuts::distMapImproveDirection ( const Mesh & mesh,
const DistMapImproveDirectionParameters & params )
nodiscard

Score candidates with distance maps, lower resolution -> faster score

Note
does not support wallAngle yet

◆ find() [1/2]

MRVOXELS_API double MR::FixUndercuts::find ( const Mesh & mesh,
const FindParams & params,
FaceBitSet & outUndercuts,
const UndercutMetric & metric = {} )

Adds undercuts to

Parameters
outUndercutsif metric is set returns metric of found undercuts, otherwise returns DBL_MAX

◆ find() [2/2]

MRVOXELS_API void MR::FixUndercuts::find ( const Mesh & mesh,
const FindParams & params,
VertBitSet & outUndercuts )

Adds undercuts to.

Parameters
outUndercuts

◆ findUndercuts() [1/3]

MRVOXELS_API void MR::FixUndercuts::findUndercuts ( const Mesh & mesh,
const Vector3f & upDirection,
FaceBitSet & outUndercuts )

Adds to.

Parameters
outUndercutsundercut faces

◆ findUndercuts() [2/3]

MRVOXELS_API double MR::FixUndercuts::findUndercuts ( const Mesh & mesh,
const Vector3f & upDirection,
FaceBitSet & outUndercuts,
const UndercutMetric & metric )
nodiscard

Adds to

Parameters
outUndercutsundercut faces Returns summary metric of undercut faces

◆ findUndercuts() [3/3]

MRVOXELS_API void MR::FixUndercuts::findUndercuts ( const Mesh & mesh,
const Vector3f & upDirection,
VertBitSet & outUndercuts )

Adds to.

Parameters
outUndercutsundercut vertices

◆ fix()

MRVOXELS_API Expected< void > MR::FixUndercuts::fix ( Mesh & mesh,
const FixParams & params )

Fixes undercut areas by building vertical walls under it, algorithm is performed in voxel space, so the mesh is completely rebuilt after this operation

◆ fixUndercuts() [1/2]

MRVOXELS_API void MR::FixUndercuts::fixUndercuts ( Mesh & mesh,
const FaceBitSet & selectedArea,
const Vector3f & upDirection,
float voxelSize = 0.0f,
float bottomExtension = 0.0f )

◆ fixUndercuts() [2/2]

MRVOXELS_API void MR::FixUndercuts::fixUndercuts ( Mesh & mesh,
const Vector3f & upDirection,
float voxelSize = 0.0f,
float bottomExtension = 0.0f )

◆ getUndercutAreaMetric()

MRVOXELS_API UndercutMetric MR::FixUndercuts::getUndercutAreaMetric ( const Mesh & mesh)
nodiscard

returns the metric that computes total area of undercut faces

◆ getUndercutAreaProjectionMetric()

MRVOXELS_API UndercutMetric MR::FixUndercuts::getUndercutAreaProjectionMetric ( const Mesh & mesh)
nodiscard

returns the metric that computes summed absolute projected area of undercut

◆ improveDirection()

MRVOXELS_API Vector3f MR::FixUndercuts::improveDirection ( const Mesh & mesh,
const ImproveDirectionParameters & params,
const UndercutMetric & metric )
nodiscard
Note
does not support wallAngle yet
Top view: / __/ -----> maximum radial line Side view: | / _/ / / \/ \ \ | / _/ - maxBaseAngle |–|---—|–| | / _/ difference between two angles is baseAngleStep \ _/_/ / | / _/ __/____/ |/_/ This picture shows polarAngle = 60 deg

◆ scoreUndercuts()

MRVOXELS_API double MR::FixUndercuts::scoreUndercuts ( const Mesh & mesh,
const Vector3f & upDirection,
const Vector2i & resolution )
nodiscard

Fast score undercuts projected area via distance map with given resolution lower resolution means lower precision, but faster work

Note
does not support wallAngle yet