Automatic Light Gauge Steel Frame Creator And Panelizer macro

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Steel Frame Creator macro

Post by hhassey »

Just to clarify, I do get those errors also. The line that has the problem refers to the center of mass calculation. somehow it is being calculated several times, you can see that because it gets printed 4 times, so maybe the onChanged method gets called several times while the frame is still not finished. but I don't know..

any ideas?

Other than that, could you play with adding windows / doors, etc...?
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Automatic Steel Frame Creator macro

Post by paullee »

hhassey wrote: Tue Jan 02, 2018 6:36 pm Just to clarify, I do get those errors also. The line that has the problem refers to the center of mass calculation. somehow it is being calculated several times, you can see that because it gets printed 4 times, so maybe the onChanged method gets called several times while the frame is still not finished. but I don't know..

any ideas?

Other than that, could you play with adding windows / doors, etc...?
Thanks, I just get very basic python knowledge and has not attempted code (some kind of 'class'?) like what you do - i really have a look at your code to have a feel how it should works to learn!

Haven't really tried windows / doors in depth yet - just quickly tweak the default numbers and the openings move!
User avatar
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: [EDIT] Re: Automatic Steel Frame Creator macro

Post by hhassey »

This error that was reported has been fixed !!!
paullee wrote: Mon Jan 01, 2018 11:59 am

Code: Select all

Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Traceback (most recent call last):
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 321, in onChanged
    vt=a.Shape.Volume
<type 'exceptions.RuntimeError'>: shape is invalid
Error Fixed!! , please grab a copy of the new version on Gitlab https://gitlab.com/Oriond/FreeCAD-Steel_Frame.git
User avatar
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Steel Frame Creator macro

Post by hhassey »

thschrader wrote: Sat Dec 30, 2017 3:40 pm Hello hhassey,
interesting project. Is the panel a part of the static structure?
Sorry I don't understand what do you mean by Is the panel part of the static structure

Do you know the flamingo-wb? There are some guys in the italian forum
working with steel-frames. Maybe you can get some inspiration... :)
https://forum.freecadweb.org/viewtopic. ... 5&start=30
https://forum.freecadweb.org/viewtopic.php?f=8&t=22711
No, I didn't know what they were doing, thanks for sharing, It seems that they don't deal with light gauge steel, (i might be wrong I have not spent enough time looking at their work, but it looks fantastic!)

Thanks for showing me that.

have a great 2018
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Automatic Steel Frame Creator macro

Post by thschrader »

hhassey wrote: Thu Jan 04, 2018 9:36 pm Sorry I don't understand what do you mean by Is the panel part of the static structure
Should the frame carry some loading or is it used as a building-facade alone?
frame.JPG
frame.JPG (63.75 KiB) Viewed 1775 times
User avatar
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Light Gauge Steel Frame Creator macro

Post by hhassey »

Ohh Fantastic!, right now that frame is not supposed to carry load, although they allways end up being loaded. The frames that are supposed to carry load, have a "sronger" beam called header that goes on the top track on the sections of windows/doors. I am working on the macro to create those extra beams when instructed to.

I didn't realize that we could do some Finite Element Analysis on the frames created with my macro, that is so cool! I have been working with Code-Aster but would love to put my hands on calculix/FreeCAD, I just have not spent the time to learn its workflow.

I bet meshing the frame will be tricky because some parts are just touching others like the tracks that make the windows.
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Automatic Light Gauge Steel Frame Creator macro

Post by thschrader »

hhassey wrote: Fri Jan 05, 2018 6:46 pm Ohh Fantastic!
I used the FEM-wb for visualizing the load/fixing. Did no calculation :oops:
Should I do a test?
User avatar
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Light Gauge Steel Frame Creator macro

Post by hhassey »

thschrader wrote: Fri Jan 05, 2018 7:20 pm Should I do a test?
Yes, please, that would be awesome!! , in case I need to modify anything on the geometry generation that makes the meshing / FEM easier, it would be great to know/fix now and taken into account over the development of the macro.

Thinking of FEA I took good care to make sure the end result was composed of only solids. at least that is a good start!
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Automatic Light Gauge Steel Frame Creator macro

Post by thschrader »

hhassey wrote: Fri Jan 05, 2018 8:23 pm ... to make sure the end result was composed of only solids.
Good idea!
Some profiles are not fixed together, the frame could collapse :)
But the FEM-analysis works, I got no errors when meshing and running calculix.
You see the deformation/stresses under vertical loading with 500 kg, distributed
along the upper beam. I used the predefined values from your macro to generate the geometry.
You can do the calculation by your own (but you need the newest 0.17 dev-snapshot from git).
Load FC-file, doubleclick on "Analysis" im model-tree, the FEM-wb activates.
Doubleclick on FEMMeshGmsh in tree, hit apply-button in dialog.
Click on CalculiXccxTools in tree, press solver button, write inp-file, press run.
When calculation finished, doubleclick on results in tree open result dialog.
File with cleared mesh:
frameFEM.FCStd
(46.28 KiB) Downloaded 61 times
solver.JPG
solver.JPG (7.88 KiB) Viewed 1715 times
frameFEM001.JPG
frameFEM001.JPG (255.67 KiB) Viewed 1715 times
von_Mises_Stress.JPG
von_Mises_Stress.JPG (76.57 KiB) Viewed 1715 times
User avatar
hhassey
Posts: 247
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Light Gauge Steel Frame Creator macro

Post by hhassey »

Some profiles are not fixed together, the frame could collapse :)
Yes the studs are exactly the internal size of the top track, and are just put there, I mean in real life we would have screws holding those things together.
What would be a good approach for FEA here?

I can think of making a non linear contact analysis, in that way all the studs would not just poke trough the top track and load. but that wold not work for shear...

Maybe we should join all the solids into one before starting the analyisis(I would have to create the studs slightly into the tracks) solid and assume all connections are perfect. I am not sure, what are your thoughts?
Post Reply