Files
create/src/Mod/CAM/Path/Tool/toolbit/models/taperedballnose.py
Billy Huddleston bd699e4fe9 CAM: Add tapered ball nose toolbit/shape asset
Introduced new toolbit and shape models for tapered ball nose tools,
including schema, summary, and integration into CMake and module
imports. Added corresponding SVG and FCStd files to resources.

Updated SVGs so end markers (arrows) render correctly in Qt by
converting markers to paths. Kept a source SVG with markers as
strokes (not paths) for future editing and updates.

Reworked the ToolBitEditor UI to display the toolbit to the right of the
toolbit properties, improving usability. Shrunk the overall height of
the editor window to better fit typical screen sizes.

src/Mod/CAM/CMakeLists.txt:
- Registered new taperedballnose toolbit and shape models and resources
- Added updated SVGs and source SVGs for marker compatibility

src/Mod/CAM/Path/Tool/shape/__init__.py:
- Imported ToolBitShapeTaperedBallNose and added to __all__

src/Mod/CAM/Path/Tool/shape/models/taperedballnose.py:
- Added ToolBitShapeTaperedBallNose class with schema and label

src/Mod/CAM/Path/Tool/toolbit/__init__.py:
- Imported ToolBitTaperedBallNose and added to __all__

src/Mod/CAM/Path/Tool/toolbit/models/taperedballnose.py:
- Added ToolBitTaperedBallNose class with summary and integration

Tools/Shape/taperedballnose.svg, Tools/Shape/taperedballnose.fcstd:
- Added new SVG and FCStd for tapered ball nose
- Updated SVGs for correct marker rendering in Qt
- Kept editable source SVGs with markers as strokes for future updates
2026-01-17 17:33:03 -05:00

47 lines
2.5 KiB
Python

# SPDX-License-Identifier: LGPL-2.1-or-later
################################################################################
# #
# © 2026 Billy Huddleston <billy@ivdc.com> #
# #
# FreeCAD is free software: you can redistribute it and/or modify #
# it under the terms of the GNU Lesser General Public License as #
# published by the Free Software Foundation, either version 2.1 #
# of the License, or (at your option) any later version. #
# #
# FreeCAD is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty #
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. #
# See the GNU Lesser General Public License for more details. #
# #
# You should have received a copy of the GNU Lesser General Public #
# License along with FreeCAD. If not, see https://www.gnu.org/licenses #
# #
################################################################################
import FreeCAD
import Path
from ...shape import ToolBitShapeTaperedBallNose
from ..mixins import RotaryToolBitMixin, CuttingToolMixin
from .base import ToolBit
class ToolBitTaperedBallNose(ToolBit, CuttingToolMixin, RotaryToolBitMixin):
SHAPE_CLASS = ToolBitShapeTaperedBallNose
def __init__(self, shape: ToolBitShapeTaperedBallNose, id: str | None = None):
Path.Log.track(f"ToolBitTaperedBallNose __init__ called with shape: {shape}, id: {id}")
super().__init__(shape, id=id)
CuttingToolMixin.__init__(self, self.obj)
@property
def summary(self) -> str:
diameter = self.get_property_str("Diameter", "?", precision=3)
flutes = self.get_property("Flutes")
cutting_edge_height = self.get_property_str("CuttingEdgeHeight", "?", precision=3)
taper_angle = self.get_property_str("TaperAngle", "?", precision=1)
return FreeCAD.Qt.translate(
"CAM",
f"{diameter} tip, {taper_angle} taper, {flutes}-flute tapered ball nose, {cutting_edge_height} cutting edge",
)