MeshLib
 
Loading...
Searching...
No Matches
MRFixSelfIntersections.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMesh/MRMeshFwd.h"
4#include "MRMesh/MRExpected.h"
5
6namespace MR
7{
8
9namespace SelfIntersections
10{
11
14{
16 enum class Method
17 {
19 Relax,
22 };
27 int maxExpand = 3;
30 float subdivideEdgeLen = 0.0f;
33};
34
37
39MRMESH_API VoidOrErrStr fix( Mesh& mesh, const Settings& settings );
40}
41
42}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:589
MRMESH_API VoidOrErrStr fix(Mesh &mesh, const Settings &settings)
Finds and fixes self-intersections per component:
MRMESH_API Expected< FaceBitSet > getFaces(const Mesh &mesh, ProgressCallback cb={})
Find all self-intersections faces component-wise.
Definition MRCameraOrientationPlugin.h:7
tl::expected< T, E > Expected
Definition MRExpected.h:49
Expected< void > VoidOrErrStr
return type for a void function that can produce an error string
Definition MRExpected.h:60
Definition MRMesh/MRMesh.h:23
Setting set for mesh self-intersections fix.
Definition MRFixSelfIntersections.h:14
float subdivideEdgeLen
Definition MRFixSelfIntersections.h:30
int maxExpand
Maximum expand count (edge steps from self-intersecting faces), should be > 0.
Definition MRFixSelfIntersections.h:27
Method
Fix method.
Definition MRFixSelfIntersections.h:17
@ CutAndFill
Cut and re-fill regions around self-intersections (may fall back to Relax)
@ Relax
Relax mesh around self-intersections.
int relaxIterations
Maximum relax iterations.
Definition MRFixSelfIntersections.h:25
ProgressCallback callback
Callback function.
Definition MRFixSelfIntersections.h:32
Method method
Definition MRFixSelfIntersections.h:23