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!
Post Reply
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Automatic Light Gauge Steel Frame Creator And Panelizer macro

Post by hhassey »

I have created a small video showing the functionality as of today (not all functionality is shown but most is)

https://peertube.social/videos/watch/cb ... 0034c56703

I am working on a macro that creates Steel Frames (I belive this should be incorporated as a default function of the Arch Module) And would like to have your opinion. And have some help testing the macro. you can grab a copy of the macro Here:
Screenshot from 2017-12-28 10-05-46.png
Screenshot from 2017-12-28 10-05-46.png (326.69 KiB) Viewed 7950 times
Right now, its working features are:
  • Arbitrary Length Width and Height of the whole frame.
  • Arbitrary quantity, position and size of doors and windows.
  • Automaticly flips the studs to have the web facing the openings in windows and doors as needed.
  • Custom separation of Studs.
  • Parametric gauge of steel or a custom thickness.
  • Parametric Stud/Track dimensions, Web,Flange,Lip, etc..
  • Tracks for windows/Doors get the correct cut of the web to allow fastening on the framing studs next to them.
  • Structural boolean switch and if turned on, create the beams on top of windows and door openings.
  • Take off off all the Qty of materials (bill of materials) stud and tracks.
  • Weight Calculation for the assembly.
  • Center of Mass calculation for Hoisting/Lifting of prefabed assemblies.
  • FEM switch that creates geometry that can be meshed easily for Finite Element Analysis making the studs and tracks solidly connected.
To do list:
  • Have a structural boolean switch and if turned on, create the beams on top of windows and doors DONE!
  • Have an algorithm figure out the best strategy to fill the frame with board (this is a tough one but I think it would really be useful) DONE
  • Have the algorithm trim pieces and use the waste is possible somewhere else DONE!
  • Automatic PDF drawings of the pieces on the steel frame Assembly DONE!
  • Define minimum piece size for panelizing frames, both horizontal and vertical DONE!
  • Use Multilayered materials for panel creation DONE!
  • Double up studs supporting the Beams when Structural = True DONE!
  • Get panels correctly placed in a frame with an arbitrary position and rotation in space DONE!
  • Please help me figure out what I am missing....
Last edited by hhassey on Thu May 09, 2019 7:47 pm, edited 10 times in total.
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Automatic Steel Frame Creator macro

Post by thschrader »

Hello hhassey,
interesting project. Is the panel a 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... :)
regards Thomas (and have a happy new year!)
https://forum.freecadweb.org/viewtopic. ... 5&start=30
https://forum.freecadweb.org/viewtopic.php?f=8&t=22711
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Automatic Steel Frame Creator macro

Post by bitacovir »

Nice, hhassey. I will be happy testing your macro.
About missing stuff:
- What about diagonals?
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
User avatar
regis
Posts: 725
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Automatic Steel Frame Creator macro

Post by regis »

Amazing stuff,
probably 2 abilities i can sugest, the ability to put on walls, and also the ability to put on single face if one wants to control metal stud at a time. and to tweak it's properties while placing it.
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Steel Frame Creator macro

Post by hhassey »

Thanks Guys, here is the repository where you can grab a copy of the macro!

https://gitlab.com/Oriond/FreeCAD-Steel_Frame.git
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Steel Frame Creator macro

Post by hhassey »

bitacovir wrote: Sat Dec 30, 2017 3:50 pm Nice, hhassey. I will be happy testing your macro.
Thanks for the help, the link to the macro is above.
bitacovir wrote: Sat Dec 30, 2017 3:50 pm About missing stuff:
- What about diagonals?
Yep, I will need to include those,
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

[EDIT] Re: Automatic Steel Frame Creator macro

Post by paullee »

Hi, would be more than happy to try! Look very useful for construction!

[EDIT] I do not seem to get how to run it - does it run on 0.17_pre? Readme indicates setup on 0.16. I am on latest git of AppImage as shown below.

[EDIT] When I run the macro (copied from .py) in 0.17_pre, there are message returns as quoted below, and nothing.

[EDIT] I boot to the fedora 25 and run a 0.16 release version, I run but have have message below.

Now it is fun :)

As on desirable features [EDIT] (before I can try it) :)
  • Use an ArchWall to built the steel frame - as if the ArchWall is a simplified model with finishes e.g. gypsum board wall on steel stud.
  • So, select an ArchWall and macro measure its length, height, thickness, position etc. as its overall dimension for creating the underlying steel frame
  • Read the ArchWall hosted window and door openings to create the openings
  • Include in the ArchWall as Hi-Res object
Hope it helps!

Happy New Year!


FreeCAD-0.17.git201712281626.glibc-x86_64.AppImage
and not run
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12871 (Git)
Build type: None
Branch: master
Hash: 070395d67ca45826f1481da80aa9e0f6a9ef4292
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)


0.16 Release version of Fedora 25 some errors but run anyway

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.Unknown
Build type: Unknown
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18

on 0.16 release FreeCad

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
on 0.17_pre FreeCad

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
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 257, in execute
    parte.append(Draw_Steel_Stud(y-2*th1,x,th1,poste[2]-2*th1,fal,poste[3])) #dibujar poste
  File "/run/media/paullee/80G_Data/FreeCAD_Macro/FreeCAD_Hhassey/FreeCAD-Steel_Frame-master-942ec7a62468a731fc893daf6f5ebc268bdc9e43/Steel_Frame_Creator_to Macro.FCMacro", line 145, in Draw_Steel_Stud
    W=Part.Wire([E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11,E12])
<class 'Part.OCCError'>: BRep_API: command not done
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

Re: Automatic Steel Frame Creator macro

Post by hhassey »

@Paullee Thanks for your help, somehow I did not notice those errors but at the end it runs fine in 0.16, This macro is not designed for 0.17 yet. here are my system specs.

I did not understand if on 0.16 you actually got the frame or not can you clarify. I am checking out on those errors.
User avatar
hhassey
Posts: 246
Joined: Thu Jun 04, 2015 8:01 pm
Location: Ensenada, Mexico

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

Post by hhassey »

paullee wrote: Mon Jan 01, 2018 11:59 am As on desirable features [EDIT] (before I can try it) :)
  • Use an ArchWall to built the steel frame - as if the ArchWall is a simplified model with finishes e.g. gypsum board wall on steel stud.
  • So, select an ArchWall and macro measure its length, height, thickness, position etc. as its overall dimension for creating the underlying steel frame
  • Read the ArchWall hosted window and door openings to create the openings
  • Include in the ArchWall as Hi-Res object
Yes, those features are on my mind, it should be natural to integrate it transparently with @yorik 's work on walls and windows, once we have the code polished enough I will work on connecting it to Arch Walls.
Last edited by hhassey on Tue Jan 02, 2018 6:30 pm, edited 1 time in total.
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Automatic Steel Frame Creator macro

Post by paullee »

hhassey wrote: Tue Jan 02, 2018 5:54 pm @Paullee Thanks for your help, somehow I did not notice those errors but at the end it runs fine in 0.16, This macro is not designed for 0.17 yet. here are my system specs.

I did not understand if on 0.16 you actually got the frame or not can you clarify. I am checking out on those errors.
Yes, I got the frame after the messages quoted in above post :)

It maybe some difference between systems / linux favour!
Post Reply