-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from dubstar-04/FreeCAD-1.0
Update addon to support FreeCAD 1.0
- Loading branch information
Showing
8 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
# *************************************************************************** | ||
# * * | ||
# * Copyright (c) 2020 Daniel Wood <[email protected]> * | ||
# * Copyright (c) 2020-2024 Daniel Wood <[email protected]> * | ||
# * * | ||
# * This program is free software; you can redistribute it and/or modify * | ||
# * it under the terms of the GNU Lesser General Public License (LGPL) * | ||
|
@@ -24,7 +24,7 @@ | |
|
||
import FreeCADGui | ||
from PySide import QtGui | ||
import PathFeedsAndSpeedsGui | ||
import CAMFeedsAndSpeedsGui | ||
import os | ||
|
||
__dir__ = os.path.dirname(__file__) | ||
|
@@ -35,38 +35,38 @@ def getIcon(iconName): | |
|
||
def updateMenu(workbench): | ||
|
||
if workbench == 'PathWorkbench': | ||
if workbench == 'CAMWorkbench': | ||
|
||
print('Feeds and Speeds Addon loaded:', workbench) | ||
|
||
mw = FreeCADGui.getMainWindow() | ||
addonMenu = None | ||
|
||
# Find the main path menu | ||
pathMenu = mw.findChild(QtGui.QMenu, "&Path") | ||
pathMenu = mw.findChild(QtGui.QMenu, "&CAM") | ||
|
||
for menu in pathMenu.actions(): | ||
if menu.text() == "Path Addons": | ||
if menu.text() == "CAM Addons": | ||
# create a new addon menu | ||
addonMenu = menu.menu() | ||
break | ||
|
||
if addonMenu is None: | ||
addonMenu = QtGui.QMenu("Path Addons") | ||
addonMenu.setObjectName("Path_Addons") | ||
addonMenu = QtGui.QMenu("CAM Addons") | ||
addonMenu.setObjectName("CAM_Addons") | ||
|
||
# Find the dressup menu entry | ||
dressupMenu = mw.findChild(QtGui.QMenu, "Path Dressup") | ||
|
||
#addonMenu.setTitle("Path Addons") | ||
#addonMenu.setTitle("CAM Addons") | ||
pathMenu.insertMenu(dressupMenu.menuAction(), addonMenu) | ||
|
||
# create an action for this addon | ||
action = QtGui.QAction(addonMenu) | ||
action.setText("Feeds and Speeds") | ||
action.setIcon(QtGui.QPixmap(getIcon('Path_FeedsAndSpeeds.svg'))) | ||
action.setIcon(QtGui.QPixmap(getIcon('CAM_FeedsAndSpeeds.svg'))) | ||
action.setStatusTip("Check Feeds and Speeds") | ||
action.triggered.connect(PathFeedsAndSpeedsGui.Show) | ||
action.triggered.connect(CAMFeedsAndSpeedsGui.Show) | ||
|
||
# append this addon to addon menu | ||
addonMenu.addAction(action) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | ||
<package format="1"> | ||
<name>FeedsAndSpeeds</name> | ||
<description>A FreeCAD Path Addon to help generate basic feeds and speeds for machining.</description> | ||
<version>0.5</version> | ||
<description>A FreeCAD CAM Addon to help generate basic feeds and speeds for machining.</description> | ||
<version>0.6</version> | ||
<maintainer email="[email protected]">Daniel Wood</maintainer> | ||
<license file="LICENSE">LGPL-2.1</license> | ||
<url type="repository" branch="master">https://github.com/dubstar-04/FeedsAndSpeeds</url> | ||
|
@@ -12,8 +12,8 @@ | |
<workbench> | ||
<classname>FeedsAndSpeeds</classname> | ||
<subdirectory>./</subdirectory> | ||
<icon>Icons/Path_FeedsAndSpeeds.svg</icon> | ||
<freecadmin>0.20.0</freecadmin> | ||
<icon>Icons/CAM_FeedsAndSpeeds.svg</icon> | ||
<freecadmin>1.0.0</freecadmin> | ||
</workbench> | ||
</content> | ||
|
||
|