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{
10
13{
15 enum class Type
16 {
18 Flat,
20 Ball,
24 Chamfer,
25
26 Count
27 };
30 float cornerRadius = 0.f;
32 float cuttingAngle = 0.f;
34 float endDiameter = 0.f;
35};
36
39{
41 float length = 1.f;
43 float diameter = 0.1f;
46
48 [[nodiscard]] MRMESH_API float getMinimalCutLength() const;
49
51 [[nodiscard]] MRMESH_API Mesh toMesh( int horizontalResolution = 32, int verticalResolution = 32 ) const;
52};
53
54MRMESH_API void serializeToJson( const EndMillCutter& cutter, Json::Value& root );
55MRMESH_API void serializeToJson( const EndMillTool& tool, Json::Value& root );
56
57MRMESH_API Expected<void> deserializeFromJson( const Json::Value& root, EndMillCutter& cutter );
58MRMESH_API Expected<void> deserializeFromJson( const Json::Value& root, EndMillTool& tool );
59
60} // namespace MR
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:80
Definition MRCameraOrientationPlugin.h:8
MRMESH_API void serializeToJson(const EndMillCutter &cutter, Json::Value &root)
tl::expected< T, E > Expected
Definition MRExpected.h:25
MRMESH_API Expected< void > deserializeFromJson(const Json::Value &root, EndMillCutter &cutter)
end mill cutter specifications
Definition MREndMill.h:13
Type type
Definition MREndMill.h:28
float cornerRadius
(bull nose) corner radius
Definition MREndMill.h:30
float cuttingAngle
(chamfer) cutting angle
Definition MREndMill.h:32
Type
cutter type
Definition MREndMill.h:16
@ BullNose
bull nose end mill
@ Chamfer
chamfer end mill
float endDiameter
(chamfer) end diameter
Definition MREndMill.h:34
end mill tool specifications
Definition MREndMill.h:39
EndMillCutter cutter
cutter
Definition MREndMill.h:45
MRMESH_API Mesh toMesh(int horizontalResolution=32, int verticalResolution=32) const
create a tool mesh
MRMESH_API float getMinimalCutLength() const
compute the minimal cut length based on the cutter parameters
float length
overall tool length
Definition MREndMill.h:41
float diameter
tool diameter
Definition MREndMill.h:43
Definition MRMesh/MRMesh.h:23