Page 1 of 2

video tutorial Create a Workbench

Posted: Thu Nov 09, 2017 7:32 pm
by Anam
Hello everyone, I would like start to create a workbench. I have experience with numeric calculation in Python but I find difficult to start to create My workbench. Please can somebody make a tutorial or video tutorial to explain a creation of a workbench whit one button ?

Re: video tutorial Create a Workbench

Posted: Thu Nov 09, 2017 7:57 pm
by triplus
There is some documentation available therefore best to start here:

https://www.freecadweb.org/wiki/Module_ ... e_manually

P.S. Creating a workbench and a command in it should take you around 10 minutes or less.

Re: video tutorial Create a Workbench

Posted: Thu Nov 09, 2017 8:31 pm
by Anam
Thanks for the answer
I saw that tutorial but I could not finish it. That is why I'm looking for more accessible information for a beginner

Re: video tutorial Create a Workbench

Posted: Thu Nov 09, 2017 9:11 pm
by looo
Please have a look at this "template-extension". Simple fork it and link it into ~/.FreeCAD/Mod or install it via setup.py or pip and start with the coding.
All current available workbenches in FreeCAD have some issues: name-clashes, ides-not finding the packages, inconvenient stuff. This new structure presented with the template-extension should avoid such things.

https://github.com/looooo/template_extension

Re: video tutorial Create a Workbench

Posted: Tue Nov 21, 2017 11:36 am
by felipe
Hello Anam,
I faced the same problem, and it was difficult for me to realize how to create a Workbench.
I have made some progress and I am documenting it.
This is the first very basic tutorial, and I am currently extending it.
https://github.com/felipe-m/tutorial_freecad_wb
Now I am learning how to add this tutorial and the following ones to the FreeCAD website.

I hope it helps,
Best,

Felipe

Re: video tutorial Create a Workbench

Posted: Tue Nov 21, 2017 11:50 am
by looo
Now I am learning how to add this tutorial and the following ones to the FreeCAD website.
can you try to update your work to the new way how to add workbenches? In my eyes your approach will be a bit misleading for newcomers, as they will use stuff which will lead to potential issues...

Re: video tutorial Create a Workbench

Posted: Tue Nov 21, 2017 11:31 pm
by felipe
Hello looo,
In my eyes your approach will be a bit misleading for newcomers
I am a newcomer, so I am probably misled :)
I have been searching the FreeCAD documentation to figure out how to create a FreeCAD workbench, and I came out with this way.
But I am sure there are better ways, like the ones you propose.
I am happy to change the tutorial to make it correctly.

Today I have been trying to follow your instructions, but I haven't been able to make it work.
I don't know why, I have no expertise in loading and installing libraries.
I am using FreeCAD in Windows 10, and I have tried with versions 0.16 64bit and 0.17.12619_x64_dev_win with no success.
I have copied your template-extension directory in my FreeCAD/Mod directory.
I also tried the pip installation, although I don't know if I did it correctly.

Thanks,

Re: video tutorial Create a Workbench

Posted: Wed Nov 22, 2017 6:18 pm
by felipe
I have extended the tutorial to include a simple Task Panel Dialog to set a parameter.

Now the tutorial has 3 parts: https://github.com/felipe-m/tutorial_freecad_wb

Re: video tutorial Create a Workbench

Posted: Wed Nov 22, 2017 7:06 pm
by Anam
felipe wrote: Wed Nov 22, 2017 6:18 pm I have extended the tutorial to include a simple Task Panel Dialog to set a parameter.
Now the tutorial has 3 parts: https://github.com/felipe-m/tutorial_freecad_wb
Thank you very much
looo wrote: Thu Nov 09, 2017 9:11 pm Please have a look at this "template-extension". Simple fork it and link it into ~/.FreeCAD/Mod or install it via setup.py or pip and start with the coding.
All current available workbenches in FreeCAD have some issues: name-clashes, ides-not finding the packages, inconvenient stuff. This new structure presented with the template-extension should avoid such things.

https://github.com/looooo/template_extension

Thank you to looo but I'm too much beginner for follow your advice, maybe one day i will do that

Re: video tutorial Create a Workbench

Posted: Wed Nov 22, 2017 8:14 pm
by looo
felipe wrote:I am using FreeCAD in Windows 10, and I have tried with versions 0.16 64bit and 0.17.12619_x64_dev_win with no success.
It is not available for 0.16. Only 0.17 allows to use the new structure. I should have said that earlier.
I am happy to change the tutorial to make it correctly.
I wanted to say, that it is not the best idea to make this an official Workbench documentation. For 0.16 there is no other way, but people will create workbenches for 0.17 and so on if we put this as the "official wb-tutorial" somewhere on FreeCAD's wiki.
Anam wrote:Thank you to looo but I'm too much beginner for follow your advice, maybe one day i will do that
I have experienced the same. Understanding why FreeCAD's current module/workbench structure has some drawbacks is not very easy. Also it's quite a boring topic compared to CAD. But in my eyes the ability to extend FreeCAD with python workbenches is a big advantage of FreeCAD and should be as solid as possible.