MeshLib C++ Docs
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{
10
11
13{
14
17{
19 bool touchIsIntersection = true;
37 int maxExpand = 3;
40 float subdivideEdgeLen = 0.0f;
42 bool mimicPatch = false;
47 FaceMap* new2Old = nullptr;
48};
49
51MRMESH_API Expected<FaceBitSet> getFaces( const Mesh& mesh, bool touchIsIntersection = true, ProgressCallback cb = {} );
52
54MRMESH_API Expected<void> fix( Mesh& mesh, const Settings& settings );
55}
56
57}
#define MRMESH_API
Definition MRMeshFwd.h:85
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:790
Expected< FaceBitSet > getFaces(const Mesh &mesh, bool touchIsIntersection=true, ProgressCallback cb={})
Find all self-intersections faces component-wise.
float subdivideEdgeLen
Definition MRFixSelfIntersections.h:40
Expected< void > fix(Mesh &mesh, const Settings &settings)
Finds and fixes self-intersections per component:
tl::expected< T, E > Expected
Definition MRExpected.h:31
int maxExpand
Maximum expand count (edge steps from self-intersecting faces), should be >= 0.
Definition MRFixSelfIntersections.h:37
bool mimicPatch
trying to stay close to initial surface when patching
Definition MRFixSelfIntersections.h:42
Method
Fix method.
Definition MRFixSelfIntersections.h:22
FaceMap * new2Old
Definition MRFixSelfIntersections.h:47
int relaxIterations
Maximum relax iterations.
Definition MRFixSelfIntersections.h:35
ProgressCallback callback
Callback function.
Definition MRFixSelfIntersections.h:44
bool touchIsIntersection
If true then count touching faces as self-intersections.
Definition MRFixSelfIntersections.h:19
Method method
Definition MRFixSelfIntersections.h:33
@ SelfBoolean
Definition MRFixSelfIntersections.h:31
@ CutAndFill
Cut and re-fill regions around self-intersections (may fall back to Relax)
Definition MRFixSelfIntersections.h:26
@ Relax
Relax mesh around self-intersections.
Definition MRFixSelfIntersections.h:24
Definition MRFixSelfIntersections.h:13
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh.h:24
Setting set for mesh self-intersections fix.
Definition MRFixSelfIntersections.h:17