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
19{
21 float outsideOffset = 0;
22
24 float insideOffset = 0;
25
30};
31
35MRMESH_API Mesh makeThickMesh( const Mesh & m, const ThickenParams & params );
36
38{
41 float maxShift = 0;
42
45
47 float minThickness = 0;
48
50 ProgressCallback progress;
51};
52
56MRMESH_API bool zCompensate( Mesh& mesh, const ZCompensateParams& params );
57
59[[nodiscard]] MRMESH_API std::optional<VertScalars> findZcompensationShifts( const Mesh& mesh, const ZCompensateParams& params );
60
62[[nodiscard]] MRMESH_API std::optional<VertCoords> findZcompensatedPositions( const Mesh& mesh, const ZCompensateParams& params );
63
64}
MRMESH_API bool zCompensate(Mesh &mesh, const ZCompensateParams &params)
MRMESH_API std::optional< VertCoords > findZcompensatedPositions(const Mesh &mesh, const ZCompensateParams &params)
finds vertices positions of the mesh after z-compensation without modifying the mesh
bool reduceSelfIntersections
if true, limits the movement of each vertex to reduce self-intersections in the mesh
Definition MROffsetVerts.h:44
MRMESH_API Mesh makeThickMesh(const Mesh &m, const ThickenParams &params)
ProgressCallback progress
to report progress and cancel processing
Definition MROffsetVerts.h:50
float outsideOffset
the amount of offset for original mesh vertices
Definition MROffsetVerts.h:21
float insideOffset
the amount of offset for cloned mirrored mesh vertices in the opposite direction
Definition MROffsetVerts.h:24
MRMESH_API bool offsetVerts(Mesh &mesh, const VertMetric &offset, const ProgressCallback &cb={})
float minThickness
only if (reduceSelfIntersections = true), avoids moving a vertex closer than this distance to another...
Definition MROffsetVerts.h:47
float normalsTrustFactor
Definition MROffsetVerts.h:29
MRMESH_API std::optional< VertScalars > findZcompensationShifts(const Mesh &mesh, const ZCompensateParams &params)
finds the shift along z-axis for each vertex without modifying the mesh
float maxShift
Definition MROffsetVerts.h:41
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRMesh.h:23
Definition MROffsetVerts.h:19
Definition MROffsetVerts.h:38