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
12struct EndMillCutter
13{
15 enum class Type
16 {
18 Flat,
20 Ball,
22 BullNose,
24 Chamfer,
25
26 Count
27 };
28 Type type = Type::Flat;
30 float cornerRadius = 0.f;
32 float cuttingAngle = 0.f;
34 float endDiameter = 0.f;
35};
36
38struct EndMillTool
39{
41 float length = 1.f;
43 float diameter = 0.1f;
45 EndMillCutter cutter;
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 MRMeshFwd.h:80
Definition MREndMill.h:13
new unsafe ref float cornerRadius
new unsafe ref float cuttingAngle
new unsafe ref float endDiameter
Definition MREndMill.h:39
new unsafe MR.EndMillCutter cutter
new unsafe ref float length
new unsafe ref float diameter
Definition MRCameraOrientationPlugin.h:8
MRMESH_API void serializeToJson(const EndMillCutter &cutter, Json::Value &root)
MRMESH_API Expected< void > deserializeFromJson(const Json::Value &root, EndMillCutter &cutter)