MeshLib Rust Docs
Loading...
Searching...
No Matches
meshlib::fix_undercuts Namespace Reference

Classes

struct  DistMapImproveDirectionParameters
struct  FindParams
struct  FixParams
struct  ImproveDirectionParameters

Functions

auto fix (mesh:&mut meshlib::Mesh, params:&meshlib::fix_undercuts::FixParams) -> meshlib::Owned< meshlib::expected_void_std_string >
auto get_undercut_area_metric (mesh:&meshlib::Mesh) -> meshlib::Owned< meshlib::std_function_double_from_const_MR_FaceBitSet_ref_const_MR_FixUndercuts_FindParams_ref >
auto get_undercut_area_projection_metric (mesh:&meshlib::Mesh) -> meshlib::Owned< meshlib::std_function_double_from_const_MR_FaceBitSet_ref_const_MR_FixUndercuts_FindParams_ref >
auto find_4 (mesh:&meshlib::Mesh, params:&meshlib::fix_undercuts::FindParams, outUndercuts:&mut meshlib::FaceBitSet, metric:Option<&meshlib::std_function_double_from_const_MR_FaceBitSet_ref_const_MR_FixUndercuts_FindParams_ref >) -> f64
void find_3 (mesh:&meshlib::Mesh, params:&meshlib::fix_undercuts::FindParams, outUndercuts:&mut meshlib::VertBitSet)
auto score_undercuts (mesh:&meshlib::Mesh, upDirection:&meshlib::Vector3f, resolution:&meshlib::Vector2i) -> f64
auto improve_direction (mesh:&meshlib::Mesh, params:&meshlib::fix_undercuts::ImproveDirectionParameters, metric:&meshlib::std_function_double_from_const_MR_FaceBitSet_ref_const_MR_FixUndercuts_FindParams_ref) -> meshlib::Vector3f
auto dist_map_improve_direction (mesh:&meshlib::Mesh, params:&meshlib::fix_undercuts::DistMapImproveDirectionParameters) -> meshlib::Vector3f

Function Documentation

◆ dist_map_improve_direction()

auto meshlib::fix_undercuts::dist_map_improve_direction ( mesh:&meshlib::Mesh ,
params:&meshlib::fix_undercuts::DistMapImproveDirectionParameters  ) -> meshlib::Vector3f

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

Note
does not support wallAngle yet Generated from function MR::FixUndercuts::distMapImproveDirection.

Calls MR_FixUndercuts_distMapImproveDirection().

◆ find_3()

void meshlib::fix_undercuts::find_3 ( mesh:&meshlib::Mesh ,
params:&meshlib::fix_undercuts::FindParams ,
outUndercuts:&mut meshlib::VertBitSet  )

Adds undercuts to

Parameters
outUndercutsGenerated from function MR::FixUndercuts::find.

Calls MR_FixUndercuts_find_3().

◆ find_4()

auto meshlib::fix_undercuts::find_4 ( mesh:&meshlib::Mesh ,
params:&meshlib::fix_undercuts::FindParams ,
outUndercuts:&mut meshlib::FaceBitSet ,
metric:Option<&meshlib::std_function_double_from_const_MR_FaceBitSet_ref_const_MR_FixUndercuts_FindParams_ref >  ) -> f64

Adds undercuts to

Parameters
outUndercutsif metric is set returns metric of found undercuts, otherwise returns DBL_MAX Generated from function MR::FixUndercuts::find.

Calls MR_FixUndercuts_find_4().

◆ fix()

auto meshlib::fix_undercuts::fix ( mesh:&mut meshlib::Mesh ,
params:&meshlib::fix_undercuts::FixParams  ) -> meshlib::Owned< meshlib::expected_void_std_string >

Fixes undercut areas by building vertical walls under it, algorithm is performed in voxel space, so the mesh is completely rebuilt after this operation Generated from function MR::FixUndercuts::fix.

Calls MR_FixUndercuts_fix().

◆ get_undercut_area_metric()

returns the metric that computes total area of undercut faces Generated from function MR::FixUndercuts::getUndercutAreaMetric.

Calls MR_FixUndercuts_getUndercutAreaMetric().

◆ get_undercut_area_projection_metric()

auto meshlib::fix_undercuts::get_undercut_area_projection_metric ( mesh:&meshlib::Mesh ) -> meshlib::Owned< meshlib::std_function_double_from_const_MR_FaceBitSet_ref_const_MR_FixUndercuts_FindParams_ref >

returns the metric that computes summed absolute projected area of undercut Generated from function MR::FixUndercuts::getUndercutAreaProjectionMetric.

Calls MR_FixUndercuts_getUndercutAreaProjectionMetric().

◆ improve_direction()

Parallel finds best of several directions defined by ImproveDirectionParameters struct

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 Generated from function MR::FixUndercuts::improveDirection.

Calls MR_FixUndercuts_improveDirection().

◆ score_undercuts()

auto meshlib::fix_undercuts::score_undercuts ( mesh:&meshlib::Mesh ,
upDirection:&meshlib::Vector3f ,
resolution:&meshlib::Vector2i  ) -> f64

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 Generated from function MR::FixUndercuts::scoreUndercuts.

Calls MR_FixUndercuts_scoreUndercuts().