CAM: Fix: all toolbits in camotics exported as Cylindrical

This commit is contained in:
Samuel Abels
2025-05-26 23:42:44 +02:00
parent 663d338a88
commit c0bf7ec4f2

View File

@@ -33,6 +33,7 @@ SHAPEMAP = {
"ballend": "Ballnose",
"endmill": "Cylindrical",
"v-bit": "Conical",
"vbit": "Conical",
"chamfer": "Snubnose",
}
SHAPEMAP_REVERSE = dict((v, k) for k, v in SHAPEMAP.items())
@@ -107,7 +108,7 @@ class CamoticsLibrarySerializer(AssetSerializer):
toolitem["length"] = length_serializable
toolitem["shape"] = SHAPEMAP.get(tool._tool_bit_shape.name, "Cylindrical")
toolitem["shape"] = SHAPEMAP.get(tool._tool_bit_shape.name.lower(), "Cylindrical")
toollist[str(tool_no)] = toolitem
return json.dumps(toollist, indent=2).encode("utf-8")