From 917e1a7be7c00976283edc100c343fa3a1dfa856 Mon Sep 17 00:00:00 2001 From: Samuel Abels Date: Tue, 20 May 2025 00:29:25 +0200 Subject: [PATCH] CAM: Fix: Show builtin shapes in separate section in shape selector --- src/Mod/CAM/Path/Tool/shape/models/base.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Mod/CAM/Path/Tool/shape/models/base.py b/src/Mod/CAM/Path/Tool/shape/models/base.py index 9f08dac869..9b72adf837 100644 --- a/src/Mod/CAM/Path/Tool/shape/models/base.py +++ b/src/Mod/CAM/Path/Tool/shape/models/base.py @@ -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