Tool Addition to Workbench

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
Zig_mint
Posts: 12
Joined: Thu Jan 10, 2019 5:48 pm

Tool Addition to Workbench

Post by Zig_mint »

Hi,
I am trying to make a custom workbench for myself that contains all the tools that I use regularly. I have created a module using the FreeCad build tool and its all working fine.

I wanted to know, how will I add already established tools of freecad?

for instance, I want my workbench to contain rectangle and circle sketching tools, How do I go about doing that?
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Tool Addition to Workbench

Post by microelly2 »

You can load the moduls you want into your InitGui.py

Code: Select all


try: # some methods from curve wb
			import ZebraTool
			import ParametricComb
			import GeomInfo
except: pass

cmds= ['ZebraTool','ParametricComb','GeomInfo','Nurbs_DraftBSpline Editor',
		'Nurbs_Create Shoe','Nurbs_Create Sole','Nurbs_Sole Change Model',
		# ....
		]
 #create your menu with the imported methods and your own m
self.appendMenu("Nurbs", cmds)

You only need to know the names of the commands you want.
Zig_mint
Posts: 12
Joined: Thu Jan 10, 2019 5:48 pm

Re: Tool Addition to Workbench

Post by Zig_mint »

Thanks for the help but I wanted to specifically understand how can I import the "line tool" as the "Draft" and "Sketcher" workbench does.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Tool Addition to Workbench

Post by GeneFC »

There is a wiki page that explains all the details.

https://freecadweb.org/wiki/Customize_Toolbars

Gene
Post Reply