CAM: Fix: Show builtin shapes in separate section in shape selector

This commit is contained in:
Samuel Abels
2025-05-20 00:29:25 +02:00
parent 8c7de12990
commit 917e1a7be7

View File

@@ -79,8 +79,6 @@ class ToolBitShape(Asset):
self.id: str = id
self.is_builtin: bool = True
self.icon: Optional[ToolBitShapeIcon] = None
# Assign parameters
@@ -103,6 +101,16 @@ class ToolBitShape(Asset):
"""
return self.id
@property
def is_builtin(self) -> bool:
"""
Check if this shape is a built-in shape.
Returns:
bool: True if the shape is built-in, False otherwise.
"""
return self.name.lower() == self.id
@classmethod
def _get_shape_class_from_doc(cls, doc: "FreeCAD.Document") -> Type["ToolBitShape"]:
# Find the Body object to identify the shape type