Automate Reinforcement GSoC proposal

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!
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

yorik wrote: Tue Aug 20, 2019 2:10 pm Hi Suraj,
Hi Yorik
yorik wrote: Tue Aug 20, 2019 2:10 pm
As you know we need to finish this week. I am looking at your code now, your work is basically in the "automate" branch on your github repo, is that correct? I think it would be good if you could write a wrap-up explaining how to use your work, how to install, etc. I know you are busy writing docs, so probably you are doing this already.
I have completed documentation pages for new features of Rebar Addon and here are related links:
https://www.freecadweb.org/wiki/Arch_Re ... nforcement
https://www.freecadweb.org/wiki/Arch_Re ... sSixRebars
https://www.freecadweb.org/wiki/Arch_Re ... nforcement

Now, I will write assumptions which we assume that user should know while creating reinforcinment with addon as suggested by @amrit3701 here:
https://forum.freecadweb.org/viewtopic. ... 70#p323817
yorik wrote: Tue Aug 20, 2019 2:10 pm Great work so far anyway! Congrats!
Thanks,
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

amrit3701 wrote: Tue Aug 20, 2019 4:35 pm
@Suraj,

I am trying to create reinforcement in beam by using your beam reinforcement dialog (`suraj/gsoc19-two-legged-stirrup` branch). It only creates stirrups rebars, no longitudinal rebars. Also, it throws below error in the `Report view`:

Code: Select all

Traceback (most recent call last):
  File "/Users/ambu/Library/Preferences/FreeCAD/Mod/Reinforcement/BeamReinforcement/MainBeamReinforcement.py", line 1171, in clicked
    self.accept(button)
  File "/Users/ambu/Library/Preferences/FreeCAD/Mod/Reinforcement/BeamReinforcement/MainBeamReinforcement.py", line 1233, in accept
    self.FaceName,
  File "/Users/ambu/Library/Preferences/FreeCAD/Mod/Reinforcement/BeamReinforcement/TwoLeggedBeam.py", line 240, in makeReinforcement
    structure,
  File "/Users/ambu/Library/Preferences/FreeCAD/Mod/Reinforcement/BeamReinforcement/TwoLeggedBeam.py", line 306, in makeTopReinforcement
    facename, structure
  File "/Users/ambu/Library/Preferences/FreeCAD/Mod/Reinforcement/Rebarfunc.py", line 701, in getFacenamesforBeamReinforcement
    return (facename_for_tb_rebars, facename_for_s_rebars)
UnboundLocalError: local variable 'facename_for_s_rebars' referenced before assignment
Hi @amrit3701, the beam reinforcement dialog seems to work fine as in documentation example:
https://www.freecadweb.org/wiki/Arch_Re ... nt#Example

I will try to investigate the error you faced and will report here.
amrit3701 wrote: Tue Aug 20, 2019 4:35 pm Also, there is no image of beam reinforcement present in the dialog box. Please take a look on this issue.
I have added the image in beam reinforcement dialog box as per commit: https://github.com/SurajDadral/FreeCAD- ... c152be483e

Please check if it is fine.

Thanks,
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

Suraj Dadral wrote: Tue Aug 20, 2019 6:58 pm
Hi @amrit3701, the beam reinforcement dialog seems to work fine as in documentation example:
https://www.freecadweb.org/wiki/Arch_Re ... nt#Example

I will try to investigate the error you faced and will report here.
Hello everyone,
Today, I discussed about the error with @amrit3701 in a video conference.
When we created reinforcement in a beam having length along x-axis, then the reinforcement created successfully.
But, when we tried to create reinforcement in a beam having length along y-axis, then it gives the same error as reported by @amrit3701.

Then @amrit3701 suggested a way to create shear rebars in beam having length along y-axis.
Now, I am implementing suggestion of @amrit3701. I will complete it by tomorrow.

Thanks,
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Automate Reinforcement GSoC proposal

Post by yorik »

Suraj Dadral wrote: Tue Aug 20, 2019 6:49 pm I have completed documentation pages for new features of Rebar Addon and here are related links:
https://www.freecadweb.org/wiki/Arch_Re ... nforcement
https://www.freecadweb.org/wiki/Arch_Re ... sSixRebars
https://www.freecadweb.org/wiki/Arch_Re ... nforcement
Excellent!!
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

Suraj Dadral wrote: Wed Aug 21, 2019 5:57 pm
But, when we tried to create reinforcement in a beam having length along y-axis, then it gives the same error as reported by @amrit3701.

Then @amrit3701 suggested a way to create shear rebars in beam having length along y-axis.
Now, I am implementing suggestion of @amrit3701. I will complete it by tomorrow.
Hello everyone,
The error has been removed as per commit: https://github.com/SurajDadral/FreeCAD- ... 44760b12d5

Now, user can create beam reinforcement
- for beam having length along x-axis, by selecting right face of beam.
- for beam having length along y-axis, by selecting front face of beam.

I will modify the documentation accordingly.

Example:

Code: Select all

import FreeCAD, Arch
from BeamReinforcement import TwoLeggedBeam

Structure = Arch.makeStructure(length=200.0,width=3000.0,height=400.0)
Structure.ViewObject.Transparency = 80
FreeCAD.ActiveDocument.recompute()

RebarGroup = TwoLeggedBeam.makeReinforcement(
    l_cover_of_stirrup=20,
    r_cover_of_stirrup=20,
    t_cover_of_stirrup=20,
    b_cover_of_stirrup=20,
    offset_of_stirrup=100,
    bent_angle=135,
    extension_factor=4,
    dia_of_stirrup=8,
    number_spacing_check=False,
    number_spacing_value=200,
    top_reinforcement_number_diameter_offset=("1#20@-60+2#16@-60+1#20@-60", "3#16@-100"),
    top_reinforcement_rebar_type="LShapeRebar",
    top_reinforcement_layer_spacing=30,
    bottom_reinforcement_number_diameter_offset=("1#20@-60+2#16@-60+1#20@-60", "3#16@-100"),
    bottom_reinforcement_rebar_type="LShapeRebar",
    bottom_reinforcement_layer_spacing=30,
    left_rebars_number_diameter_offset="1#16@-100+1#16@-100+1#16@-100",
    left_rebars_type="LShapeRebar",
    left_rebars_spacing=30,
    right_rebars_number_diameter_offset="1#16@-100+1#16@-100+1#16@-100",
    right_rebars_type="LShapeRebar",
    right_rebars_spacing=30,
    top_reinforcement_l_rebar_rounding=2,
    top_reinforcement_hook_extension=100,
    top_reinforcement_hook_orientation="Rear Outside",
    bottom_reinforcement_l_rebar_rounding=2,
    bottom_reinforcement_hook_extension=100,
    bottom_reinforcement_hook_orientation="Rear Outside",
    left_l_rebar_rounding=2,
    left_rebars_hook_extension=80,
    left_rebars_hook_orientation=("Rear Inside", "Front Inside", "Rear Inside"),
    right_l_rebar_rounding=2,
    right_rebars_hook_extension=80,
    right_rebars_hook_orientation=("Front Inside", "Rear Inside", "Front Inside"),
    structure=Structure,
    facename="Face1",
)
Please review and give your suggestions.
Thanks,
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Post by amrit3701 »

Hi Suraj,

I have tested beam reinforcement and all previous issues are solved. :) Now, going to merge you MR.

Excellent work so far. :D
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

amrit3701 wrote: Sun Aug 25, 2019 10:04 am Hi Suraj,

I have tested beam reinforcement and all previous issues are solved. :) Now, going to merge you MR.

Excellent work so far. :D
Thanks @Amrit

I have also modified the README.md file and here is PR: https://github.com/amrit3701/FreeCAD-Re ... nt/pull/33

Here is wrap of the work done during GSoC:
ProjectMilestones.png
ProjectMilestones.png (41.59 KiB) Viewed 3518 times

Thanks @All for your support. I will keep contributing in development of Rebar Addon.

Now, I am working on editing of Beam Reinforcement. After that I will implement master configuration for Rebar Addon.

Thanks,
User avatar
ebrahim raeyat
Posts: 619
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: Automate Reinforcement GSoC proposal

Post by ebrahim raeyat »

Suraj Dadral wrote: Fri Aug 30, 2019 5:01 pm
amrit3701 wrote: Sun Aug 25, 2019 10:04 am Hi Suraj,

I have tested beam reinforcement and all previous issues are solved. :) Now, going to merge you MR.

Excellent work so far. :D
Thanks @Amrit

I have also modified the README.md file and here is PR: https://github.com/amrit3701/FreeCAD-Re ... nt/pull/33

Here is wrap of the work done during GSoC:

ProjectMilestones.png


Thanks @All for your support. I will keep contributing in development of Rebar Addon.

Now, I am working on editing of Beam Reinforcement. After that I will implement master configuration for Rebar Addon.

Thanks,
Thanks @Suraj. do you have any plan for multi beam reinforcement? I mean continues beams.

and another question:
I want to produce 2d drafting for concrete structures, like in my pyconcrete github. do you think i can use your work for this goal or i must work from scratch? till now i can give some parameters from user and produce 2D beam drawing, but i want to first bring this drafting in freecad and let user to modify some parameters and then export it to dxf or dwg format.

related topic: automation if design

Thanks a lot.
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: Automate Reinforcement GSoC proposal

Post by bitacovir »

Is it available this automate reinforcement?
I just installed the rebar addon and these are not present in the list of options.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19311 (Git)
Build type: Release
Branch: master
Hash: 120b69c74f7dac8c4fa6dbc0a7e10674bde9216c
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
::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
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Post by Suraj Dadral »

bitacovir wrote: Sun Jan 19, 2020 1:52 pm Is it available this automate reinforcement?
I just installed the rebar addon and these are not present in the list of options.
You can use branch "gsoc19" from repository https://github.com/amrit3701/FreeCAD-Re ... ree/gsoc19 as code is not merged in master yet.

Thanks,
Post Reply