video tutorial Create a Workbench

A place to share learning material: written tutorials, videos, etc.
User avatar
Anam
Posts: 39
Joined: Mon Mar 20, 2017 10:22 am
Location: Teramo, Italy

video tutorial Create a Workbench

Postby Anam » Thu Nov 09, 2017 7:32 pm

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 ?
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: video tutorial Create a Workbench

Postby triplus » Thu Nov 09, 2017 7:57 pm

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.
User avatar
Anam
Posts: 39
Joined: Mon Mar 20, 2017 10:22 am
Location: Teramo, Italy

Re: video tutorial Create a Workbench

Postby Anam » Thu Nov 09, 2017 8:31 pm

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
User avatar
looo
Posts: 3180
Joined: Mon Nov 11, 2013 5:29 pm

Re: video tutorial Create a Workbench

Postby looo » 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
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
felipe
Posts: 9
Joined: Mon Sep 05, 2016 3:53 pm
Location: Madrid, Spain
Contact:

Re: video tutorial Create a Workbench

Postby felipe » Tue Nov 21, 2017 11:36 am

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
User avatar
looo
Posts: 3180
Joined: Mon Nov 11, 2013 5:29 pm

Re: video tutorial Create a Workbench

Postby looo » Tue Nov 21, 2017 11:50 am

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...
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
felipe
Posts: 9
Joined: Mon Sep 05, 2016 3:53 pm
Location: Madrid, Spain
Contact:

Re: video tutorial Create a Workbench

Postby felipe » Tue Nov 21, 2017 11:31 pm

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,
felipe
Posts: 9
Joined: Mon Sep 05, 2016 3:53 pm
Location: Madrid, Spain
Contact:

Re: video tutorial Create a Workbench

Postby felipe » 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
User avatar
Anam
Posts: 39
Joined: Mon Mar 20, 2017 10:22 am
Location: Teramo, Italy

Re: video tutorial Create a Workbench

Postby Anam » Wed Nov 22, 2017 7:06 pm

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
User avatar
looo
Posts: 3180
Joined: Mon Nov 11, 2013 5:29 pm

Re: video tutorial Create a Workbench

Postby looo » Wed Nov 22, 2017 8:14 pm

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.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/