Suggestions for a Separate Structure Workbench

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Suggestions for a Separate Structure Workbench

Post by amrit3701 »

I am, a programmer and working with my friend Nirbhay Chauhan(cnirbhay) from structural engineering. We are with an idea to develop a new separate workbench for structural engineering.

There are many difficulties we are facing in the current Arch workbench, like the rebaring process is quite lengthy and doesn't fulfill the required needs. One has to draw the reinforcement map by providing constraints w.r.t. the axis and/or origin in the sketcher workbench. Our requirement is to provide the cover and other such parameters w.r.t. the structural component. The new workbench should contain enough of parameters to easily model the reinforcements. The parameters may be like spacing, diameter, clear cover and effective cover which should be given by the user prior to modeling rather than creating the sketch first.

Therefore, I request all the experts of this forum to kindly guide us in the above mentioned issue.

I'll be very thankful to all of you.

--
Amritpal Singh
http://www.amritpals.com
https://github.com/amrit3701
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Suggestions for a Separate Structure Workbench

Post by yorik »

There are already a lot of things going on regardin g the implementation of structure tools in FreeCAD. Check for ex:

- The flamingo tools addon https://github.com/oddtopus/flamingo
- This viewtopic.php?f=23&t=17453&p=137525#p137525 or this viewtopic.php?f=23&t=16375 or any other post by chakkree memberlist.php?mode=viewprofile&u=6331
- The arch precast tools viewtopic.php?f=9&t=16155
- Plus all the integration with FEM that Bernd and others are working on...

There are many people with many ideas about the subject out there, what is mostly needed would be to synthetize all these ideas, see what is done and what is missing, and develop a good plan...
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Suggestions for a Separate Structure Workbench

Post by saso »

yorik wrote:There are many people with many ideas about the subject out there, what is mostly needed would be to synthetize all these ideas, see what is done and what is missing, and develop a good plan...
+1

For sure it can be more then just rebar...
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Suggestions for a Separate Structure Workbench

Post by bernd »

Wow, I'm curious ! Check this thread viewtopic.php?f=18&t=17061
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Suggestions for a Separate Structure Workbench

Post by amrit3701 »

Greetings,

Thanks for suggesting about Flamingo workbench but I want to create members (column, beam and slab etc) having rebars of different shape with some default values of different parameters like a clear cover, edge cover etc. In the whole process, I want to automate all user stuff. However, you gave me a solution of Flamingo workbench but this workbench is totally different from my requirements.

I have created some python programs which automate the work. Now my question is what method or procedure will I have to follow if I want a user to run those program from FreeCAD GUI and a user will update those parameter values from "property value" table? My job is similar like when we creates the structural objects, there are some precast concrete elements already present which will automate user work.

--
Amritpal Singh
http://www.amritpals.com
https://github.com/amrit3701
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Suggestions for a Separate Structure Workbench

Post by yorik »

To have objects that store parameter values, that the user can modify in the properties panel, you need to create parametric objects. Refer to http://www.freecadweb.org/wiki/index.ph ... ed_objects

To be able to launch scripts from the FreeCAD GUI, there are several ways to do that, from simple to complex. You could simply store your scripts as macros, and the user can launch them from the Macros menu (or even create toolbar buttons from them via Tools -> Customize). But if your colleciton of scripts becomes consequent, it might be best to turn them into a workbench. A workbench is nothing else that a folder containing an Init.py and/or InitGui.py. Then you need to define FreeCAD commands, that can be made into menuitems or toolbar buttons. Check on https://github.com/FreeCAD/FreeCAD-addons for many examples.
User avatar
cnirbhay
Posts: 115
Joined: Wed Aug 17, 2016 4:24 pm

Re: Suggestions for a Separate Structure Workbench

Post by cnirbhay »

amrit3701 wrote:Greetings,

Thanks for suggesting about Flamingo workbench but I want to create members (column, beam and slab etc) having rebars of different shape with some default values of different parameters like a clear cover, edge cover etc. In the whole process, I want to automate all user stuff. However, you gave me a solution of Flamingo workbench but this workbench is totally different from my requirements.

I have created some python programs which automate the work. Now my question is what method or procedure will I have to follow if I want a user to run those program from FreeCAD GUI and a user will update those parameter values from "property value" table? My job is similar like when we creates the structural objects, there are some precast concrete elements already present which will automate user work.
@Amrit, We need to work more on this and need to speed up the things a bit. Thanks, @Yorik for the help as always. :-)
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Suggestions for a Separate Structure Workbench

Post by amrit3701 »

yorik wrote:To have objects that store parameter values, that the user can modify in the properties panel, you need to create parametric objects. Refer to http://www.freecadweb.org/wiki/index.ph ... ed_objects :)
Yeah, making programs using parametric objects is a very good thing because it will solve my half problem. :)
To be able to launch scripts from the FreeCAD GUI, there are several ways to do that, from simple to complex. You could simply store your scripts as macros, and the user can launch them from the Macros menu (or even create toolbar buttons from them via Tools -> Customize). But if your colleciton of scripts becomes consequent, it might be best to turn them into a workbench. A workbench is nothing else that a folder containing an Init.py and/or InitGui.py. Then you need to define FreeCAD commands, that can be made into menuitems or toolbar buttons. Check on https://github.com/FreeCAD/FreeCAD-addons for many examples.
Yes, according to my requirements I also think that creating a separate workbench is a good choice for me. Can you share any documentation and tutorial which will helpful while creating a workbench?

I will give my all the updates here. :)

Thanking you,

--
Amritpal Singh
http://www.amritpals.com
https://github.com/amrit3701
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Suggestions for a Separate Structure Workbench

Post by amrit3701 »

amrit3701 wrote:I will give my all the updates here. :)
Hi Yorik, :)

I read both the links which you have shared and from those links I understood that the FreeCAD objects are separated into App and GUI parts. The app part, the Document Object, defines the geometry of our object (stores values of different parameters of an object), while its GUI part, the View Provider Object, defines how the object will be drawn on a screen.

I have gone through all the examples present in "src/Mod/TemplatePyMod/FeaturePython.py" but I unable to understand the code of ViewProviderBox class. How all the things actually works in FreeCAD? And also, Is there any difference present between "App::FeaturePython" and "Part::FeaturePython"?

--
Amritpal Singh
http://www.amritpals.com
https://github.com/amrit3701
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Suggestions for a Separate Structure Workbench

Post by yorik »

amrit3701 wrote:How all the things actually works in FreeCAD?
That's a much too large question, I don't know how to answer that! :)
amrit3701 wrote:Is there any difference present between "App::FeaturePython" and "Part::FeaturePython"?
The App::FeaturePython is based on the simple generic App::Feature. It basically does nothing. You need to do everything yourself in the python code.
The Part::FeaturePython is based on Part::Feature which already does a lot of things: It already comes with several defined properties such as Placement and Shape, and if you give it a shape, it will compute a coin3d representation of it automatically. In Draft.py, for example, both are used. Most Draft objects, that are based on shapes, use Part::Feature. But some others, the dimension for example, doesn't have a shape, and is therefore an App::FeaturePython.
Post Reply