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
12namespace SelfIntersections
13{
14
17{
19 bool touchIsIntersection = true;
21 enum class Method
22 {
24 Relax,
27 };
32 int maxExpand = 3;
35 float subdivideEdgeLen = 0.0f;
37 ProgressCallback callback = {};
38};
39
41MRMESH_API Expected<FaceBitSet> getFaces( const Mesh& mesh, bool touchIsIntersection = true, ProgressCallback cb = {} );
42
44MRMESH_API Expected<void> fix( Mesh& mesh, const Settings& settings );
45}
46
47}
MRMESH_API Expected< FaceBitSet > getFaces(const Mesh &mesh, bool touchIsIntersection=true, ProgressCallback cb={})
Find all self-intersections faces component-wise.
float subdivideEdgeLen
Definition MRFixSelfIntersections.h:35
MRMESH_API 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:32
Method
Fix method.
Definition MRFixSelfIntersections.h:22
int relaxIterations
Maximum relax iterations.
Definition MRFixSelfIntersections.h:30
ProgressCallback callback
Callback function.
Definition MRFixSelfIntersections.h:37
bool touchIsIntersection
If true then count touching faces as self-intersections.
Definition MRFixSelfIntersections.h:19
Method method
Definition MRFixSelfIntersections.h:28
@ CutAndFill
Cut and re-fill regions around self-intersections (may fall back to Relax)
@ Relax
Relax mesh around self-intersections.
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh.h:23
Setting set for mesh self-intersections fix.
Definition MRFixSelfIntersections.h:17