2#include "MRVoxelsFwd.h"
27[[deprecated(
"Use fix( mesh, params )" )]]
40[[deprecated(
"Use fix( mesh, params )" )]]
92[[deprecated(
"Use find( mesh, params)" )]]
95[[deprecated(
"Use find( mesh, params )" )]]
100[[deprecated(
"Use find( mesh, params, metric )" )]]
112[[nodiscard]] MRVOXELS_API
double scoreUndercuts(
const Mesh& mesh,
const Vector3f& upDirection,
const Vector2i& resolution );
float bottomExtension
minimum extension of bottom part of the mesh
Definition MRFixUndercuts.h:66
float wallAngle
Definition MRFixUndercuts.h:53
MRVOXELS_API double scoreUndercuts(const Mesh &mesh, const Vector3f &upDirection, const Vector2i &resolution)
MRVOXELS_API Vector3f distMapImproveDirection(const Mesh &mesh, const DistMapImproveDirectionParameters ¶ms)
ProgressCallback cb
Definition MRFixUndercuts.h:74
MRVOXELS_API UndercutMetric getUndercutAreaMetric(const Mesh &mesh)
returns the metric that computes total area of undercut faces
MRVOXELS_API Vector3f improveDirection(const Mesh &mesh, const ImproveDirectionParameters ¶ms, const UndercutMetric &metric)
float maxBaseAngle
Maximum radial line given in radians look improveDirection comment.
Definition MRFixUndercuts.h:121
float voxelSize
voxel size for internal computations: lower size - better precision but more system resources require...
Definition MRFixUndercuts.h:63
tl::expected< T, E > Expected
Definition MRExpected.h:31
MRVOXELS_API Expected< void > fix(Mesh &mesh, const FixParams ¶ms)
Vector2i distanceMapResolution
Resolution of distance map, lower it is, faster score works.
Definition MRFixUndercuts.h:129
bool smooth
if true applies one iterations of gaussian filtering for voxels, useful if thin walls expected
Definition MRFixUndercuts.h:72
MRVOXELS_API double find(const Mesh &mesh, const FindParams ¶ms, FaceBitSet &outUndercuts, const UndercutMetric &metric={})
Vector3f hintDirection
Hint direction which will be improved.
Definition MRFixUndercuts.h:117
MRVOXELS_API UndercutMetric getUndercutAreaProjectionMetric(const Mesh &mesh)
returns the metric that computes summed absolute projected area of undercut
float polarAngleStep
Polar angle step.
Definition MRFixUndercuts.h:123
float baseAngleStep
Radial step given in radians look improveDirection comment.
Definition MRFixUndercuts.h:119
std::array< Vector3f, 3 > MR_BIND_IGNORE
Definition MRMeshBuilderTypes.h:13
Vector3f upDirection
Primitives that are not visible from up direction are considered as undercuts (fix undercuts is perfo...
Definition MRFixUndercuts.h:47
MRVOXELS_API MR_BIND_IGNORE void findUndercuts(const Mesh &mesh, const Vector3f &upDirection, FaceBitSet &outUndercuts)
Adds to.
MRVOXELS_API MR_BIND_IGNORE Expected< void > fixUndercuts(Mesh &mesh, const Vector3f &upDirection, float voxelSize=0.0f, float bottomExtension=0.0f)
std::function< double(const FaceBitSet &, const FindParams ¶ms)> UndercutMetric
Definition MRFixUndercuts.h:83
FindParams findParameters
parameters of what is considered as undercut
Definition MRFixUndercuts.h:60
const FaceBitSet * region
if set - only this region will be fixed (but still all mesh will be rebuild)
Definition MRFixUndercuts.h:69
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRFixUndercuts.h:127
Parameters that is used to find undercuts.
Definition MRFixUndercuts.h:45
Fix undercuts function parameters.
Definition MRFixUndercuts.h:58
Definition MRFixUndercuts.h:115