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 {
21 Flat,
23 Ball,
27 Chamfer,
28
29 Count
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}
EndMillCutter cutter
cutter
Definition MREndMill.h:48
MRMESH_API Mesh toMesh(int horizontalResolution=32, int verticalResolution=32) const
create a tool mesh
Type type
Definition MREndMill.h:31
MRMESH_API 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 cuttingAngle
(chamfer) cutting angle
Definition MREndMill.h:35
MRMESH_API float getMinimalCutLength() const
compute the minimal cut length based on the cutter parameters
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
MRMESH_API Expected< void > deserializeFromJson(const Json::Value &root, EndMillCutter &cutter)
@ BullNose
bull nose end mill
@ Chamfer
chamfer end mill
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