#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRCameraOrientationPlugin.h:8
MRMESH_API Contours2f offsetContours(const Contours2f &contours, float offset, const OffsetContoursParams ¶ms={})
offsets 2d contours in plane
std::function< float(int, int)> ContoursVariableOffset
Definition MROffsetContours.h:84
std::vector< OffsetContoursVertMap > OffsetContoursVertMaps
Definition MROffsetContours.h:45
Contours2< float > Contours2f
Definition MRMesh/MRMeshFwd.h:283
std::vector< OffsetContoursOrigins > OffsetContoursVertMap
Definition MROffsetContours.h:44
Contours3< float > Contours3f
Definition MRMesh/MRMeshFwd.h:285
Definition MROffsetContours.h:12
int vertId
Definition MROffsetContours.h:16
bool valid() const
Definition MROffsetContours.h:17
int contourId
Definition MROffsetContours.h:14
Definition MROffsetContours.h:21
float lRatio
Definition MROffsetContours.h:35
OffsetContourIndex uDest
Definition MROffsetContours.h:30
OffsetContourIndex uOrg
Definition MROffsetContours.h:28
bool valid() const
Definition MROffsetContours.h:41
OffsetContourIndex lDest
Definition MROffsetContours.h:26
float uRatio
Definition MROffsetContours.h:39
bool isIntersection() const
Definition MROffsetContours.h:42
OffsetContourIndex lOrg
Definition MROffsetContours.h:24
Definition MROffsetContours.h:48
EndType
type of offsetting on ends of non-closed contours
Definition MROffsetContours.h:58
@ Round
creates round ends (use minAnglePrecision)
@ Cut
creates sharp end (same as Round with minAnglePrecision < 180 deg)
float minAnglePrecision
precision of round corners and ends
Definition MROffsetContours.h:71
float maxSharpAngle
limit for sharp corners connection
Definition MROffsetContours.h:73
CornerType
type of positive offset curve in corners
Definition MROffsetContours.h:65
@ Sharp
creates sharp connected corner (use maxSharpAngle as limit)
@ Round
creates round corners (use minAnglePrecision)
OffsetContoursVertMaps * indicesMap
optional output that maps result contour ids to input contour ids
Definition MROffsetContours.h:76
enum MR::OffsetContoursParams::Type Offset
enum MR::OffsetContoursParams::EndType Round
Type
type of offset
Definition MROffsetContours.h:51
@ Offset
One-side signed offset, requires closed contours.
Parameters of restoring Z coordinate of XY offset 3d contours.
Definition MROffsetContours.h:91
std::function< float(const Contours2f &offsetCont, const OffsetContourIndex &offsetIndex, const OffsetContoursOrigins &origingContourMapoing)> OriginZCallback
Definition MROffsetContours.h:94
OriginZCallback zCallback
Definition MROffsetContours.h:95
int relaxIterations
if > 0 z coordinate will be relaxed this many iterations
Definition MROffsetContours.h:97