MeshLib C++ Docs
Loading...
Searching...
No Matches
MREndMill.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRExpected.h"
4#include "MRMeshFwd.h"
5
6namespace Json { class Value; }
7
8namespace MR
9{
12
13
16{
18 enum class Type
19 {
28
30 };
33 float cornerRadius = 0.f;
35 float cuttingAngle = 0.f;
37 float endDiameter = 0.f;
38};
39
42{
44 float length = 1.f;
46 float diameter = 0.1f;
49
51 [[nodiscard]] MRMESH_API float getMinimalCutLength() const;
52
54 [[nodiscard]] MRMESH_API Mesh toMesh( int horizontalResolution = 32, int verticalResolution = 32 ) const;
55};
56
57MRMESH_API void serializeToJson( const EndMillCutter& cutter, Json::Value& root );
58MRMESH_API void serializeToJson( const EndMillTool& tool, Json::Value& root );
59
60MRMESH_API Expected<void> deserializeFromJson( const Json::Value& root, EndMillCutter& cutter );
61MRMESH_API Expected<void> deserializeFromJson( const Json::Value& root, EndMillTool& tool );
62
63}
#define MRMESH_API
Definition MRMeshFwd.h:80
EndMillCutter cutter
cutter
Definition MREndMill.h:48
Type type
Definition MREndMill.h:31
void serializeToJson(const EndMillCutter &cutter, Json::Value &root)
tl::expected< T, E > Expected
Definition MRExpected.h:31
float cornerRadius
(bull nose) corner radius
Definition MREndMill.h:33
float getMinimalCutLength() const
compute the minimal cut length based on the cutter parameters
float cuttingAngle
(chamfer) cutting angle
Definition MREndMill.h:35
Expected< void > deserializeFromJson(const Json::Value &root, EndMillCutter &cutter)
float length
overall tool length
Definition MREndMill.h:44
Type
cutter type
Definition MREndMill.h:19
float endDiameter
(chamfer) end diameter
Definition MREndMill.h:37
float diameter
tool diameter
Definition MREndMill.h:46
Mesh toMesh(int horizontalResolution=32, int verticalResolution=32) const
create a tool mesh
@ Ball
ball end mill
Definition MREndMill.h:23
@ BullNose
bull nose end mill
Definition MREndMill.h:25
@ Flat
flat end mill
Definition MREndMill.h:21
@ Chamfer
chamfer end mill
Definition MREndMill.h:27
@ Count
Definition MREndMill.h:29
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
end mill cutter specifications
Definition MREndMill.h:16
end mill tool specifications
Definition MREndMill.h:42
Definition MRMesh.h:23