GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Contributions from the participants, questions and answers to their projects.
Discussions of proposals for upcoming events.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Shiv_Charan
Posts: 59
Joined: Wed Mar 03, 2021 12:10 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by Shiv_Charan »

Hi @amrit3701,

I have updated merge request for edit python api and FootingReinforcement Group Object
here is updated merge request: https://github.com/amrit3701/FreeCAD-Re ... t/pull/166

Now footing reinforcement can be edited by
  • Python edit API
  • From Properties panel
I am currently working on Footing reinforcement GUI and It will be complete very soon.

Example of Footing Reinforcement python edit API is as following.

file used:
rectangularFooting.FCStd
(10.61 KiB) Downloaded 109 times
script used to create footing reinforcement using makeFootingReinforcement python api:-

Code: Select all

from FootingReinforcement import FootingReinforcement
import importlib
importlib.reload(FootingReinforcement)
footingObj=FootingReinforcement.makeFootingReinforcement(
    parallel_rebar_type= "UShapeRebar",
    parallel_front_cover= 20,
    parallel_rear_cover= 20,
    parallel_left_cover= 10,
    parallel_right_cover= 10,
    parallel_top_cover= 20,
    parallel_bottom_cover= 20,
    parallel_diameter= 8,
    parallel_amount_spacing_check=True,
    parallel_amount_spacing_value=15,
    cross_rebar_type="UShapeRebar",
    cross_front_cover=20,
    cross_rear_cover=20,
    cross_left_cover=10,
    cross_right_cover=10,
    cross_top_cover= 20,
    cross_bottom_cover= 20,
    cross_diameter= 8,
    cross_amount_spacing_check= True,
    cross_amount_spacing_value=15,
    column_front_cover= 100,
    column_left_cover= 100,
    column_right_cover= 100,
    column_rear_cover= 100,
    tie_top_cover= 1500,
    tie_bottom_cover= 10,
    tie_bent_angle= 135,
    tie_extension_factor= 2,
    tie_diameter= 8,
    tie_number_spacing_check= True,
    tie_number_spacing_value= 5,
    column_main_rebar_diameter= 8,
    column_main_rebars_t_offset= 1500,
    column_width= 400,
    column_length= 400,
    xdir_column_amount_spacing_check= True,
    xdir_column_amount_spacing_value= 1,
    ydir_column_amount_spacing_check= True,
    ydir_column_amount_spacing_value= 2,
    parallel_rounding = 2,
    cross_rounding= 2,
    column_main_rebars_type=  "LShapeRebar",
    column_main_hook_orientation= "Bottom Outside",
    column_main_hook_extend_along= "x-axis",
    column_l_main_rebar_rounding=  2,
    column_main_hook_extension= 80,
    column_sec_rebar_check= False,
    column_sec_rebars_t_offset= (1500, 1500),
    column_sec_rebars_number_diameter = (
        "1#6mm+1#6mm+1#6mm",
        "1#6mm+1#6mm+1#6mm",
    ),
    column_sec_rebars_type= (
        "LShapeRebar",
        "LShapeRebar",
    ),
    column_sec_hook_orientation = (
        "Bottom Outside",
        "Bottom Outside",
    ),
    column_l_sec_rebar_rounding = (2, 2),
    column_sec_hook_extension = (80, 80),
    mesh_cover_along=  "Both",
    structure=  App.getDocument("rectangularFooting").getObject("Structure"),
    facename=  "Face3",
)

Outputs:
initial Footing reinforcement.png
initial Footing reinforcement.png (232.64 KiB) Viewed 7592 times
To edit this footing Reinforcement:
Footing reinforcement edit python API or properties panel can be used

Footing reinforcement Edit Python API (editFootingReinforcement) example to update above footing reinforcement is as following.

Code: Select all

from FootingReinforcement import FootingReinforcement
import importlib
importlib.reload(FootingReinforcement)
footingObj=FootingReinforcement.editFootingReinforcement(
    footingReinforcementGroup=footingObj,
    parallel_rebar_type= "UShapeRebar",
    parallel_front_cover= 20,
    parallel_rear_cover= 20,
    parallel_left_cover= 10,
    parallel_right_cover= 10,
    parallel_top_cover= 20,
    parallel_bottom_cover= 20,
    parallel_diameter= 8,
    parallel_amount_spacing_check=True,
    parallel_amount_spacing_value=15,
    cross_rebar_type="UShapeRebar",
    cross_front_cover=20,
    cross_rear_cover=20,
    cross_left_cover=10,
    cross_right_cover=10,
    cross_top_cover= 20,
    cross_bottom_cover= 20,
    cross_diameter= 8,
    cross_amount_spacing_check= True,
    cross_amount_spacing_value=15,
    column_front_cover= 100,
    column_left_cover= 100,
    column_right_cover= 100,
    column_rear_cover= 100,
    tie_top_cover= 1500,
    tie_bottom_cover= 10,
    tie_bent_angle= 135,
    tie_extension_factor= 2,
    tie_diameter= 8,
    tie_number_spacing_check= True,
    tie_number_spacing_value= 5,
    column_main_rebar_diameter= 8,
    column_main_rebars_t_offset= 1500,
    column_width= 400,
    column_length= 400,
    xdir_column_amount_spacing_check= True,
    xdir_column_amount_spacing_value= 2,
    ydir_column_amount_spacing_check= True,
    ydir_column_amount_spacing_value= 1,
    parallel_rounding = 2,
    cross_rounding= 2,
    column_main_rebars_type=  "LShapeRebar",
    column_main_hook_orientation= "Bottom Outside",
    column_main_hook_extend_along= "x-axis",
    column_l_main_rebar_rounding=  2,
    column_main_hook_extension= 80,
    column_sec_rebar_check= False,
    column_sec_rebars_t_offset= (1500, 1500),
    column_sec_rebars_number_diameter = (
        "1#6mm+1#6mm+1#6mm",
        "1#6mm+1#6mm+1#6mm",
    ),
    column_sec_rebars_type= (
        "LShapeRebar",
        "LShapeRebar",
    ),
    column_sec_hook_orientation = (
        "Bottom Outside",
        "Bottom Outside",
    ),
    column_l_sec_rebar_rounding = (2, 2),
    column_sec_hook_extension = (80, 80),
    mesh_cover_along=  "Bottom",
    structure=  App.getDocument("rectangularFooting").getObject("Structure"),
    facename=  "Face3",
)

Output:
after edit footing reinforcement.png
after edit footing reinforcement.png (94.21 KiB) Viewed 7592 times
In this example rebar mesh alignment and count of column in x direction and y direction is change.
similar other properties can also be changed to update different types of footing reinforcements.

Thanks and Regards
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by amrit3701 »

Shiv_Charan wrote: Sun Aug 15, 2021 6:46 pm Hi @amrit3701,

I have updated merge request for edit python api and FootingReinforcement Group Object
here is updated merge request: https://github.com/amrit3701/FreeCAD-Re ... t/pull/166

Now footing reinforcement can be edited by
  • Python edit API
  • From Properties panel
I am currently working on Footing reinforcement GUI and It will be complete very soon.
Hey Shiv,

Nice progress. Can't wait to see the GUI footing reinforcement. :)

Google Summer of Code 2021 Timeline:
- August 16 - 23 18:00 UTC Final week: Students submit their final work product and their final mentor evaluation
- August 23 - 30 18:00 UTC Mentors submit final student evaluations
- August 31 Final results of Google Summer of Code 2021 announced

Thanks,
Amritpal Singh
Github, Like my work, sponsor me!
Shiv_Charan
Posts: 59
Joined: Wed Mar 03, 2021 12:10 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by Shiv_Charan »

amrit3701 wrote: Mon Aug 16, 2021 6:01 pm
Nice progress. Can't wait to see the GUI footing reinforcement. :)
Hi @amrit3701

I have created a merge request for Footing reinforcement GUI for making or editing footing reinforcement.
here is the merge request: https://github.com/amrit3701/FreeCAD-Re ... t/pull/167

Now user can make Footing reinforcement through:
  • makeFootingReinforcement python API
  • GUI to make footing reinforcement

To edit footing Reinforcement user can use:
  • editFootingReinforcement python API
  • GUI to edit footing reinforcement
  • by using Properties panel of freecad


Detailed steps to make Footing Reinforcement through GUI:
file used :
rectangularFooting.FCStd
(10.61 KiB) Downloaded 110 times
1. Select any face of a previously created Footing Structure object. as shown in below image.
FootingSelectedFace.png
FootingSelectedFace.png (12.55 KiB) Viewed 7448 times
2. Then select Footing Reinforcement icons from the rebar tools.(currently there is temporary icon)

3. A footing reinforcement dialog box will pop-out on screen as shown below.
GUIFootingParallelRebars.png
GUIFootingParallelRebars.png (65.83 KiB) Viewed 7448 times
4. Select the desired raber type and other input data for rabars in parallel direction of selected face in footing reinforcement mesh as show in below image.
GUIFilledParallelRebars Footing.png
GUIFilledParallelRebars Footing.png (68.36 KiB) Viewed 7448 times
5. Now click on Next button or select Cross Rebars in list view and desired data for input data for rabars in cross direction of selected face in footing reinforcement mesh as show in below image.
GUICrossRebarInputsFooting.png
GUICrossRebarInputsFooting.png (66.15 KiB) Viewed 7448 times
6. click next or click on Columns in list view and fill desired input for columns in footing reinforcement.
Here you can select to add secondary rebars in columns or not.

Image

7. click next or click on Ties in list view and fill desired input for Ties in columns of footing reinforcement.

Image

8. click next or click on Main rebars in list view and fill desired input for main rebars in columns of footing reinforcement.

Image

Only if secondary rebars check is enable then:
9. click next or click on XDir Secoundry rebar in list view and fill desired input for secondary rebars in X direction in a column in footing reinforcement.

Image

10. click next or click on YDir Secoundry rebar in list view and fill desired input for secondary rebars in Y direction in a column in footing reinforcement.

Image

11. Click OK or Apply or Finish to generate Footing reinforcement.

Footing reinforcement without secondary rebar take comparatively less time then with secondary rebars.

Output of above inputs:

Image

Front view :
Image

SIde view:

Image


To EDIT Footing Reinforcement Double click on footing Reinforcement object.
Edit dialog box will open similar to above images.

Thanks and Ragards
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by amrit3701 »

Shiv_Charan wrote: Wed Aug 18, 2021 5:33 pm Hi @amrit3701

I have created a merge request for Footing reinforcement GUI for making or editing footing reinforcement.
here is the merge request: https://github.com/amrit3701/FreeCAD-Re ... t/pull/167
Hey Shiv,

Yes, I will test and review your merge request shortly. BTW, are you available this coming Sunday? I am thinking to schedule a meeting and summaries all the work done by you in GSoC period.

Thanks,
Amritpal Singh
Github, Like my work, sponsor me!
Shiv_Charan
Posts: 59
Joined: Wed Mar 03, 2021 12:10 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by Shiv_Charan »

amrit3701 wrote: Thu Aug 19, 2021 3:16 pm
Yes, I will test and review your merge request shortly. BTW, are you available this coming Sunday? I am thinking to schedule a meeting and summaries all the work done by you in GSoC period.
Hi @amrit3701,

Yes, I am available this Sunday.

Regards
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by amrit3701 »

Today, I and Shiv have a meeting related to work done by him in the second (last) evaluation.

Here is the video recording: https://www.patreon.com/posts/55210389

Shiv, please list all notes/suggestions here also. :)
Amritpal Singh
Github, Like my work, sponsor me!
Shiv_Charan
Posts: 59
Joined: Wed Mar 03, 2021 12:10 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by Shiv_Charan »

amrit3701 wrote: Sun Aug 22, 2021 6:45 pm Today, I and Shiv have a meeting related to work done by him in the second (last) evaluation.

Here is the video recording: https://www.patreon.com/posts/55210389

Shiv, please list all notes/suggestions here also. :)
Hi all,

The notes/suggestions from above meeting are as follows:-
  • Help button should open footing documentation on browser.
  • cover under columns tab should be given more suitable names.
  • images should be added in GUI dialog box to assist user while adding inputs.
  • icon for footing reinforcement should be updated ( currently there is temporary image is used as icon)
  • x and y direction value for columns should be update as per freecad view's x and y axis.
  • multi threading can be added to speed up reinforcement process.
Here is a brief report of work done in Slab and Footing Reinforcement during GSoC: https://gist.github.com/ShivCharanSharm ... 808362ee73

I am currently working on these suggestion, and will improve these further. :)

Thanks and Regards
Shiv_Charan
Posts: 59
Joined: Wed Mar 03, 2021 12:10 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by Shiv_Charan »

Shiv_Charan wrote: Mon Aug 23, 2021 6:29 pm The notes/suggestions from above meeting are as follows:-
  • Help button should open footing documentation on browser.
  • cover under columns tab should be given more suitable names.
  • images should be added in GUI dialog box to assist user while adding inputs.
  • icon for footing reinforcement should be updated ( currently there is temporary image is used as icon)
  • x and y direction value for columns should be update as per freecad view's x and y axis.
  • multi threading can be added to speed up reinforcement process.
Here is a brief report of work done in Slab and Footing Reinforcement during GSoC: https://gist.github.com/ShivCharanSharm ... 808362ee73

I am currently working on these suggestion, and will improve these further. :)
Hi @amrit3701,

I have created a merge request for following improvements from above list. :)
here is the merge request: https://github.com/amrit3701/FreeCAD-Re ... t/pull/168
  • Set x and y axis of column matrix in footing to add column in footing as per freeCAD x and y axis in display
  • Add redirect to footing/slab reinforcement documentation on help button clicked in there GUI Dialog Box
  • Change front/left/right/rear cover naming to front/left/right/rear spacing naming for all columns in columns tab.
I am working on other suggestions and will be completed soon.

Thanks and Regards
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: GSoC Proposal: Automate Reinforcement Process of Slab and Footing in FreeCAD

Post by balrobs »

@amrit3701 wrote:"ping"
Hi @amrit3701,
recently I updated the Reinforcement WB to version 0.3 and gave the new slab tool a try.
Creating lower reinforcement for a slab I get a bunch of error messages and alternatively FreeCad tells me to recompute once the reinforcement, then the reinforced element .. and so on.
When I then try to delete the reinforcement group I run into an Access violation!
Slab_Reinforcement.jpg
Slab_Reinforcement.jpg (244.16 KiB) Viewed 6750 times
Here is my test file:
Slab_Reinforcement.FCStd
(36.88 KiB) Downloaded 86 times
and my system info:
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26761 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)
Post Reply