MeshLib C++ Docs
Loading...
Searching...
No Matches
MROffsetVerts.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRMeshFwd.h"
5#include <cfloat>
6#include <optional>
7
8namespace MR
9{
12
13
16MRMESH_API bool offsetVerts( Mesh& mesh, const VertMetric& offset, const ProgressCallback& cb = {} );
17
20MRMESH_API bool expandHoles( Mesh& mesh, float expansion, const ProgressCallback& cb = {} );
21
23{
25 float outsideOffset = 0;
26
28 float insideOffset = 0;
29
34};
35
39MRMESH_API Mesh makeThickMesh( const Mesh & m, const ThickenParams & params );
40
42{
45 float maxShift = 0;
46
49
51 float minThickness = 0;
52
55};
56
60MRMESH_API bool zCompensate( Mesh& mesh, const ZCompensateParams& params );
61
63[[nodiscard]] MRMESH_API std::optional<VertScalars> findZcompensationShifts( const Mesh& mesh, const ZCompensateParams& params );
64
66[[nodiscard]] MRMESH_API std::optional<VertCoords> findZcompensatedPositions( const Mesh& mesh, const ZCompensateParams& params );
67
68}
#define MRMESH_API
Definition MRMeshFwd.h:82
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:751
std::function< float(VertId)> VertMetric
Definition MRMeshFwd.h:579
Mesh makeThickMesh(const Mesh &m, const ThickenParams &params)
bool zCompensate(Mesh &mesh, const ZCompensateParams &params)
bool expandHoles(Mesh &mesh, float expansion, const ProgressCallback &cb={})
bool reduceSelfIntersections
if true, limits the movement of each vertex to reduce self-intersections in the mesh
Definition MROffsetVerts.h:48
ProgressCallback progress
to report progress and cancel processing
Definition MROffsetVerts.h:54
float outsideOffset
the amount of offset for original mesh vertices
Definition MROffsetVerts.h:25
float insideOffset
the amount of offset for cloned mirrored mesh vertices in the opposite direction
Definition MROffsetVerts.h:28
std::optional< VertScalars > findZcompensationShifts(const Mesh &mesh, const ZCompensateParams &params)
finds the shift along z-axis for each vertex without modifying the mesh
float minThickness
only if (reduceSelfIntersections = true), avoids moving a vertex closer than this distance to another...
Definition MROffsetVerts.h:51
bool offsetVerts(Mesh &mesh, const VertMetric &offset, const ProgressCallback &cb={})
float normalsTrustFactor
Definition MROffsetVerts.h:33
float maxShift
Definition MROffsetVerts.h:45
std::optional< VertCoords > findZcompensatedPositions(const Mesh &mesh, const ZCompensateParams &params)
finds vertices positions of the mesh after z-compensation without modifying the mesh
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh.h:23
Definition MROffsetVerts.h:23
Definition MROffsetVerts.h:42