MeshLib C++ Docs
Loading...
Searching...
No Matches
MRMesh/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 bool touchIsIntersection = true;
18 enum class Method
19 {
21 Relax,
24 };
29 int maxExpand = 3;
32 float subdivideEdgeLen = 0.0f;
35};
36
38MRMESH_API Expected<FaceBitSet> getFaces( const Mesh& mesh, bool touchIsIntersection = true, ProgressCallback cb = {} );
39
41MRMESH_API Expected<void> fix( Mesh& mesh, const Settings& settings );
42}
43
44}
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:79
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:641
MRMESH_API Expected< FaceBitSet > getFaces(const Mesh &mesh, bool touchIsIntersection=true, ProgressCallback cb={})
Find all self-intersections faces component-wise.
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:59
Definition MRMesh/MRMesh.h:22
Setting set for mesh self-intersections fix.
Definition MRMesh/MRFixSelfIntersections.h:14
float subdivideEdgeLen
Definition MRMesh/MRFixSelfIntersections.h:32
int maxExpand
Maximum expand count (edge steps from self-intersecting faces), should be > 0.
Definition MRMesh/MRFixSelfIntersections.h:29
Method
Fix method.
Definition MRMesh/MRFixSelfIntersections.h:19
@ 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 MRMesh/MRFixSelfIntersections.h:27
ProgressCallback callback
Callback function.
Definition MRMesh/MRFixSelfIntersections.h:34
bool touchIsIntersection
If true then count touching faces as self-intersections.
Definition MRMesh/MRFixSelfIntersections.h:16
Method method
Definition MRMesh/MRFixSelfIntersections.h:25