Moved PathPocket into 3d Tools command group with new icon.

This commit is contained in:
Markus Lampert
2017-09-17 16:23:16 -07:00
parent 73f14d69b6
commit 6aeaa5e76c
4 changed files with 292 additions and 7 deletions

View File

@@ -1,5 +1,6 @@
<RCC>
<qresource>
<file>icons/Path-3DPocket.svg</file>
<file>icons/Path-3DSurface.svg</file>
<file>icons/Path-Array.svg</file>
<file>icons/Path-Axis.svg</file>

View File

@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64px"
height="64px"
id="svg2816"
version="1.1"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="Path-3DPocket.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1528"
inkscape:window-height="790"
id="namedview32"
showgrid="true"
inkscape:snap-bbox="false"
inkscape:snap-nodes="true"
inkscape:snap-global="false"
inkscape:zoom="10.392983"
inkscape:cx="31.972524"
inkscape:cy="40.690185"
inkscape:window-x="0"
inkscape:window-y="26"
inkscape:window-maximized="1"
inkscape:current-layer="layer1">
<inkscape:grid
type="xygrid"
id="grid3009"
empspacing="2"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<defs
id="defs2818">
<linearGradient
inkscape:collect="always"
id="linearGradient3845">
<stop
style="stop-color:#8ae234;stop-opacity:1"
offset="0"
id="stop3847" />
<stop
style="stop-color:#4e9a06;stop-opacity:1"
offset="1"
id="stop3849" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3797">
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="0"
id="stop3799" />
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="1"
id="stop3801" />
</linearGradient>
<linearGradient
id="linearGradient6899"
osb:paint="solid">
<stop
style="stop-color:#074cff;stop-opacity:1;"
offset="0"
id="stop6901" />
</linearGradient>
<linearGradient
id="linearGradient6887"
osb:paint="solid">
<stop
style="stop-color:#074cff;stop-opacity:1;"
offset="0"
id="stop6889" />
</linearGradient>
<linearGradient
id="linearGradient4668"
osb:paint="gradient">
<stop
style="stop-color:#009b00;stop-opacity:1;"
offset="0"
id="stop4670" />
<stop
style="stop-color:#009b00;stop-opacity:0;"
offset="1"
id="stop4672" />
</linearGradient>
<linearGradient
id="linearGradient4662"
osb:paint="solid">
<stop
style="stop-color:#008000;stop-opacity:1;"
offset="0"
id="stop4664" />
</linearGradient>
<linearGradient
id="linearGradient4529"
osb:paint="solid">
<stop
style="stop-color:#0047ff;stop-opacity:1;"
offset="0"
id="stop4531" />
</linearGradient>
<linearGradient
id="linearGradient4513">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4515" />
<stop
style="stop-color:#999999;stop-opacity:1;"
offset="1"
id="stop4517" />
</linearGradient>
<radialGradient
xlink:href="#linearGradient4513"
id="radialGradient3132"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.39497909,0,0,1.1841158,-76.294432,-34.372515)"
cx="32.151962"
cy="27.950663"
fx="32.151962"
fy="27.950663"
r="23.634638" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3797"
id="radialGradient3805"
cx="16.46319"
cy="23.895996"
fx="16.46319"
fy="23.895996"
r="18.501005"
gradientTransform="matrix(0.80330389,1.0328193,-1.4593803,1.1350735,43.668994,-14.467522)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3845"
id="linearGradient3851"
x1="20.881355"
y1="21.480793"
x2="43.661018"
y2="44.870625"
gradientUnits="userSpaceOnUse"
gradientTransform="rotate(-163.43915,30.812073,39.486566)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4031"
id="linearGradient4055"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(71.494719,-3.1982556)"
x1="30.000002"
y1="10"
x2="36"
y2="54.227272" />
<linearGradient
id="linearGradient4031">
<stop
id="stop4033"
offset="0"
style="stop-color:#d3d7cf;stop-opacity:1" />
<stop
id="stop4035"
offset="1"
style="stop-color:#888a85;stop-opacity:1" />
</linearGradient>
</defs>
<metadata
id="metadata2821">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title>Path-3DSurface</dc:title>
<dc:date>2016-05-15</dc:date>
<dc:relation>http://www.freecadweb.org/wiki/index.php?title=Artwork</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier>FreeCAD/src/Mod/Path/Gui/Resources/icons/Path-3DSurface.svg</dc:identifier>
<dc:rights>
<cc:Agent>
<dc:title>FreeCAD LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<cc:license>https://www.gnu.org/copyleft/lesser.html</cc:license>
<dc:contributor>
<cc:Agent>
<dc:title>[agryson] Alexander Gryson</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
style="display:inline;opacity:1">
<circle
style="display:inline;opacity:0.97000002;fill:url(#radialGradient3805);fill-opacity:1;stroke:#0b1521;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4493"
cx="31.020594"
cy="39.659691"
r="17.5" />
<circle
style="display:inline;opacity:0.97000002;fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4493-1"
cx="31.116812"
cy="39.755905"
r="15.5" />
<g
style="display:inline;opacity:1"
id="g4358"
transform="matrix(0.58483815,0,0,0.51339436,78.144089,14.290628)" />
<path
style="fill:none;stroke:#172a04;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 59.29546,31.03118 -16.762552,0.129782 c 0,0 -4.363144,14.35141 -14.512504,13.356169 C 17.871045,43.521889 19.157163,32.415769 19.157163,32.415769 L 4.3081318,33.127305 6.1831723,44.149293 10.591968,43.399277 c 0,0 -0.6202341,12.353756 15.26969,15.094256 15.889923,2.740499 22.664209,-16.103838 22.664209,-16.103838 l 7.279078,0.122613"
id="path3807"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cczcccczcc" />
<path
style="display:inline;fill:none;stroke:url(#linearGradient3851);stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 59.301763,30.730423 -16.761448,0.23205 c 0,0 -4.275503,14.377763 -14.430746,13.444463 -10.155242,-0.933301 -8.936908,-12.04706 -8.936908,-12.04706 l -14.8444147,0.802117 1.942252,11.010344 4.4041387,-0.776901 c 0,0 -0.544852,12.357311 15.361497,15.000812 C 41.942482,61.03975 48.60167,42.154434 48.60167,42.154434 l 7.27969,0.0782"
id="path3807-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cczcccczcc" />
<path
style="display:inline;fill:none;stroke:#8ae234;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
d="m 59.438018,31.57913 -15.807495,0.350853 c 0,0 -4.928506,14.176949 -15.526813,12.996849 -10.598307,-1.1801 -9.452729,-12.126113 -9.452729,-12.126113 L 5.8451749,33.369087 7.0512242,40.443208 M 6.4312195,44.494829 10.04149,44.036436 c 0,0 -0.03589,12.046482 15.841772,14.857128 15.877665,2.810646 23.690573,-15.708492 23.690573,-15.708492 l 6.322998,-0.140341"
id="path3807-7-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cczccccczcc" />
<g
id="g4051"
transform="matrix(0.66585367,0,0,0.65271967,-13.019025,-2.4143722)">
<path
sodipodi:nodetypes="ccccccccccccccc"
inkscape:connector-curvature="0"
id="rect4417-3"
d="m 94.494721,6.8017444 -0.01099,27.5961536 18.021979,-7.660256 -0.011,-19.9358976 z M 112.49472,29.801744 94.483731,37.462 l 0.01099,8.339744 17.999999,-8 z m 0.011,10.724359 -16.520148,7.660256 7.509158,4.615385 9,-5 z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:url(#linearGradient4055);fill-opacity:1;fill-rule:nonzero;stroke:#2e3436;stroke-width:3.03373241;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
<path
sodipodi:nodetypes="ccccccccccccccc"
inkscape:connector-curvature="0"
id="rect4417-1"
d="M 97.487394,9.8850776 V 29.753867 l 11.991186,-5.098858 0.0235,-14.7699314 z m 12.014656,24.5647544 -11.989201,5.01406 v 1.711385 l 11.963741,-5.40113 z m 0.0452,10.829611 -7.19513,3.327881 1.20492,0.808046 5.9895,-3.408611 z"
style="color:#000000;display:inline;overflow:visible;visibility:visible;fill:none;stroke:#d3d7cf;stroke-width:3.03373241;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -68,7 +68,7 @@ class PathWorkbench (Workbench):
from PathScripts import PathSanity
from PathScripts import PathSimpleCopy
from PathScripts import PathStop
from PathScripts import PathSurfaceGui
from PathScripts import PathSurface
from PathScripts import PathToolController
from PathScripts import PathToolLenOffset
from PathScripts import PathToolLibraryManager
@@ -78,8 +78,8 @@ class PathWorkbench (Workbench):
projcmdlist = ["Path_Job", "Path_Post", "Path_Inspect", "Path_Sanity"]
toolcmdlist = ["Path_ToolLibraryEdit"]
prepcmdlist = ["Path_Plane", "Path_Fixture", "Path_ToolLenOffset", "Path_Comment", "Path_Stop", "Path_Custom", "Path_Shape"]
twodopcmdlist = ["Path_Contour", "Path_Profile_Faces", "Path_Profile_Edges", "Path_Pocket", "Path_Drilling", "Path_Engrave", "Path_MillFace", "Path_Helix"]
threedopcmdlist = ["Path_Surface"]
twodopcmdlist = ["Path_Contour", "Path_Profile_Faces", "Path_Profile_Edges", "Path_Drilling", "Path_Engrave", "Path_MillFace", "Path_Helix"]
threedopcmdlist = ["Path_Pocket", "Path_Surfacing"]
modcmdlist = ["Path_OperationCopy", "Path_Array", "Path_SimpleCopy" ]
dressupcmdlist = ["PathDressup_Dogbone", "PathDressup_DragKnife", "PathDressup_Tag", "PathDressup_RampEntry"]
extracmdlist = ["Path_SelectLoop", "Path_Shape", "Path_Area", "Path_Area_Workplane"]
@@ -90,12 +90,27 @@ class PathWorkbench (Workbench):
def QT_TRANSLATE_NOOP(scope, text):
return text
def translate(context, text):
return QtGui.QApplication.translate(context, text, None, QtGui.QApplication.UnicodeUTF8).encode("utf8")
class ThreeDCommandGroup:
def GetCommands(self):
return tuple(threedopcmdlist)
def GetResources(self):
return { 'MenuText': QT_TRANSLATE_NOOP("Path",'3D Operations'),
'ToolTip': QT_TRANSLATE_NOOP("Path",'3D Operations')
}
def IsActive(self):
if FreeCAD.ActiveDocument is not None:
for o in FreeCAD.ActiveDocument.Objects:
if o.Name[:3] == "Job":
return True
return False
FreeCADGui.addCommand('Path_3dTools', ThreeDCommandGroup())
self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Project Setup"), projcmdlist)
self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Tool Commands"), toolcmdlist)
#self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Partial Commands"), prepcmdlist)
self.appendToolbar(QT_TRANSLATE_NOOP("Path", "New Operations"), twodopcmdlist+threedopcmdlist)
self.appendToolbar(QT_TRANSLATE_NOOP("Path", "New Operations"), twodopcmdlist+['Path_3dTools'])
self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Path Modification"), modcmdlist)
self.appendToolbar(QT_TRANSLATE_NOOP("Path", "Helpful Tools"), extracmdlist)

View File

@@ -44,7 +44,7 @@ class TaskPanelOpPage(PathPocketBaseGui.TaskPanelOpPage):
Command = PathOpGui.SetupOperation('Pocket',
PathPocket.Create,
TaskPanelOpPage,
'Path-Pocket',
'Path-3DPocket',
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Pocket"),
QtCore.QT_TRANSLATE_NOOP("PathPocket", "Creates a Path Pocket object from a face or faces"))