Automate Reinforcement GSoC proposal

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Sun Jul 21, 2019 7:52 am

amrit3701 wrote:
Thu Jul 18, 2019 1:40 pm

I think bent angle and extension factor should be same for all ties in the column because all ties have same diameter.
I have set these parameters equal for all ties as in commits: commit1, commit2

I have created functions to create and edit TwoTiesSixRebars column reinforcement. commit

Now user can create TwoTiesSixRebars column reinforcement through UI.

I will enable editing of TwoTiesSixRebars column reinforcement through UI by today.
After that I will create user documentation for the work done upto now.

Please give your suggestions.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Mon Jul 22, 2019 4:05 am

Hello everyone,

I have completed creating and editing of TwoTiesSixRebars column reinforcement through UI.
commit

Example output:

TwoTiesSixRebars2.png
TwoTiesSixRebars2.png (124.28 KiB) Viewed 837 times

Please test it and let me know if you want any changes.

Now, I will write documentation for TwoTiesSixRebars and Circular column reinforcement.

Thanks,
User avatar
amrit3701
Posts: 235
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Mon Jul 22, 2019 4:21 pm

Suraj Dadral wrote:
Mon Jul 22, 2019 4:05 am
Hello everyone,

I have completed creating and editing of TwoTiesSixRebars column reinforcement through UI.
commit

Please test it and let me know if you want any changes.
Hi @Suraj,

I have reviewed and test your code. Everything is good.

Some suggestions:
  • I saw that you are using `print` function to show warnings or errors to user. `print` statement not print anything in FreeCAD console and in the status bar. In FreeCAD, we have some special methods do that job.
    For eg,

    Code: Select all

    FreeCAD.Console.PrintMessage("Some message.\n")
    FreeCAD.Console.PrintWarning("To warn the user.\n")
    FreeCAD.Console.PrintError("Error message.\n")
    
    Don't forget to add `\n` at the end of the message.
  • It will be good if you add an image for two ties six rebar column reinforcement in the dialog box.
As your second evaluation is closer, I suggest you write a short summary like what is done and pending.
User avatar
Suraj Dadral
Posts: 99
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Tue Jul 23, 2019 6:14 pm

amrit3701 wrote:
Mon Jul 22, 2019 4:21 pm

Hi @Suraj,

I have reviewed and test your code. Everything is good.
Thanks @amrit3701

amrit3701 wrote:
Mon Jul 22, 2019 4:21 pm
Some suggestions:
  • I saw that you are using `print` function to show warnings or errors to user. `print` statement not print anything in FreeCAD console and in the status bar. In FreeCAD, we have some special methods do that job.
    For eg,

    Code: Select all

    FreeCAD.Console.PrintMessage("Some message.\n")
    FreeCAD.Console.PrintWarning("To warn the user.\n")
    FreeCAD.Console.PrintError("Error message.\n")
    
    Don't forget to add `\n` at the end of the message.
Done as you suggested here: https://github.com/amrit3701/FreeCAD-Re ... -264891401
commit: https://github.com/SurajDadral/FreeCAD- ... 9bbcfdf2ed

amrit3701 wrote:
Mon Jul 22, 2019 4:21 pm
  • It will be good if you add an image for two ties six rebar column reinforcement in the dialog box.
Done: https://github.com/SurajDadral/FreeCAD- ... 85daa934ad

amrit3701 wrote:
Mon Jul 22, 2019 4:21 pm
As your second evaluation is closer, I suggest you write a short summary like what is done and pending.
In first coding phase:
- Implemented SingleTieFourRebars and SingleTieMultipleRebars column reinforcement.
- Created user documentation.

In second coding phase:
- Implemented circular column reinforcement.
- Implemented TwoTiesSixRebars column reinforcement.

Pending work:
- Implement beam reinforcement.
- Implement master configuration file for rebar addon.
- Create user documentation.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Sun Jul 28, 2019 7:49 am

Hello everyone,
I was unable to interact from few days due to some health related issue. Now, I am fine to work.

I have created user documentation for work done till now.
Documentation page for TwoTiesSixRebars Column Reinforcement: https://www.freecadweb.org/wiki/Arch_Re ... sSixRebars
Documentation page for Circular Column Reinforcement: https://www.freecadweb.org/wiki/Arch_Re ... nforcement

Please review and give your suggestions.

Now, I will start creating beam reinforcement.

Thanks,
User avatar
amrit3701
Posts: 235
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Sun Jul 28, 2019 5:32 pm

Suraj Dadral wrote:
Sun Jul 28, 2019 7:49 am
I have created user documentation for work done till now.
Documentation page for TwoTiesSixRebars Column Reinforcement: https://www.freecadweb.org/wiki/Arch_Re ... sSixRebars
Documentation page for Circular Column Reinforcement: https://www.freecadweb.org/wiki/Arch_Re ... nforcement

Please review and give your suggestions.
Nice work! Please share all things which we discussed in the yesterday's meeting. I don't want to do all things in this GSoC but if everything is documented then it will be great. ;) One thing more, also write all the assumptions which we assume that user should know while creating reinforcinment with addon. For eg, which staretegy we are using when creating rebars with spacing and what happens when user enter wrong value of spacing.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Mon Jul 29, 2019 6:09 pm

amrit3701 wrote:
Sun Jul 28, 2019 5:32 pm

Nice work!
Thanks :D
amrit3701 wrote:
Sun Jul 28, 2019 5:32 pm

Please share all things which we discussed in the yesterday's meeting.
Yesterday me, @amrit3701, @hardeeprai and some civil engineer students discussed about the project, and here is summary of discussion:
  • Default value of extension factor of ties should be 10.
  • Bent angle of two ties in column reinforcement can be different.
  • LShape rebars should bend towards (or opposite to) center of column in case of column reinforcement.
  • Helical rebars should become horizontal or should bend towards center of circle at end, and will complete one more circle after it became horizontal, just like spring.
  • Specify about offset end in case when rebars are made by giving spacing value for rebars instead of giving number of rebars.
  • It is better if user will be able to specify formula for hook extension in ui instead of directly giving its value.
  • Create LShape rebars in circular column.
  • When we created circular column reinforcement with angle between rebars equal to 17°, then two rebars overlapped each other. I need to fix this.
    According to suggestion by @hardeeprai, the spacing between straight rebars in case of circular column will always remains same. So, if user specifies angle which will not divide 360 completely, e.g. 17°, then first we needs to calculate number of rebars = math.ceil(360 / angle)
    e.g. number of rebars = math.ceil(360 / 17) = 22
    then we need to calculate angle again as angle = 360 / number of rebars
    e.g. angle = 360 / 22
    angle = 16°
    Now, we need to create straight rebars with angle between them equal to 16°.
amrit3701 wrote:
Sun Jul 28, 2019 5:32 pm

I don't want to do all things in this GSoC but if everything is documented then it will be great. ;)
Yes, I will try to finish beam reinforcement as soon as I can.
Then, I will create user and developer documentation.
amrit3701 wrote:
Sun Jul 28, 2019 5:32 pm

One thing more, also write all the assumptions which we assume that user should know while creating reinforcinment with addon. For eg, which staretegy we are using when creating rebars with spacing and what happens when user enter wrong value of spacing.
I will take care of this while creating documentation. I will create separate page for these assumptions.

@All community members, please review and give your suggestions.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Thu Aug 01, 2019 5:03 pm

Hello everyone,

I have created function to create straight rebars in top and bottom beam reinforcement.
commits: commit1, commit2.

Sample output:

Code: Select all

from BeamReinforcement import TwoLeggedBeam
TwoLeggedBeam.makeReinforcement(40, 40, 40, 40, 20, 135, 10, 8, True, 5, ("2#20mm@40mm+2#16mm@200mm+2#20mm@40mm", "4#16mm@50mm"), [("StraightRebar", "StraightRebar", "StraightRebar"), ("StraightRebar")], 25, ("2#20mm@40mm+2#16mm@200mm+2#20mm@40mm", "4#16mm@50mm"), [("StraightRebar", "StraightRebar", "StraightRebar"), ("StraightRebar")], 25, "3#16mm@50mm", "StraightRebar", 40, "3#16mm@50mm", "StraightRebar", 40)
Beam.png
Beam.png (5.62 KiB) Viewed 625 times

Now, I will add support for LShaped rebars in beam reinforcement.

Thanks,
Attachments
beam.FCStd
(54.14 KiB) Downloaded 17 times
User avatar
Suraj Dadral
Posts: 99
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Sat Aug 03, 2019 4:56 pm

Hello everyone,

I have completed function to create beam reinforcement. And can be found here: https://github.com/SurajDadral/FreeCAD- ... eam.py#L45

Example Output:

Code: Select all

from BeamReinforcement import TwoLeggedBeam
TwoLeggedBeam.makeReinforcement(40, 40, 40, 40, 20, 135, 10, 8, True, 5, ("2#20mm@40mm+2#16mm@-100mm+2#20mm@40mm", "3#16mm@50mm"), [("StraightRebar", "LShapeRebar", "StraightRebar"), ("StraightRebar")], 25, ("2#20mm@40mm+2#16mm@-100mm+2#20mm@40mm", "3#16mm@50mm"), [("StraightRebar", "LShapeRebar", "StraightRebar"), ("StraightRebar")], 25, "1#20mm@50mm+1#16mm@-100mm+1#20mm@50", ("StraightRebar", "LShapeRebar", "StraightRebar"), 40, "1#20mm@-50mm+1#16mm@-100mm+1#20mm@-50", ("LShapeRebar", "LShapeRebar", "LShapeRebar"), 40, 2, 100, "Front Outside", 2, 40, "Front Outside", 2, 100, "Rear Outside", (2, 1, 2), (100, 70, 100), ("Front Outside", "Rear Inside", "Front Outside"))
BeamReinforcement.png
BeamReinforcement.png (14.17 KiB) Viewed 592 times
beam.FCStd
(76.43 KiB) Downloaded 19 times
Please check and give your suggestions.

Now, I will add the created rebars under group object and will store their properties.

Thanks,
User avatar
amrit3701
Posts: 235
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Wed Aug 07, 2019 1:58 pm

Suraj Dadral wrote:
Sat Aug 03, 2019 4:56 pm

Please check and give your suggestions.
Looks good! :)