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: 97
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Sat Jul 13, 2019 5:25 am

hardeeprai wrote:
Thu Jul 11, 2019 4:19 pm

You may do following:

1. Corners bars bent at 45 degrees to side.
2. Non-corner bars bent perpendicular to side

Above mean, all bars bent towards centre (almost) of section.
To implement this, I need to do changes in core functionality of rebar addon or recreate function makeLShapeRebar()
I will discuss about this with @amrit3701

In meantime, I created function for circular column reinforcement and can be found here.

Example:

Code: Select all

from ColumnReinforcement import CircularColumn
CircularColumn.makeReinforcement(20, 20, 20, 50, 10, 16, True, 6)
Image:
CircularColumn.png
CircularColumn.png (107.23 KiB) Viewed 491 times
CircularColumn.FCStd
(140.88 KiB) Downloaded 2 times

There is one problem in this:
When I select Host for rebars, then rebars will go out of column from bottom as in this image:
CircularColumnProblem.png
CircularColumnProblem.png (151.83 KiB) Viewed 491 times

I am unable to identify the issue in this.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Mon Jul 15, 2019 8:15 am

Suraj Dadral wrote:
Sat Jul 13, 2019 5:25 am

I am unable to identify the issue in this.
The issue has been resolved :) by setting placement of line (created using draft) before creating rebars. Related code snippet:

Code: Select all

pl = FreeCAD.Placement()                                                        
pl.Rotation.Q = (0.5, 0.5, 0.5, 0.5)                                            
for points in points_list:                                                      
    line = Draft.makeWire(                                                      
        points, placement=pl, closed=False, face=True, support=None                
    )                                                                           
    rebar = Arch.makeRebar(structure, line, dia_of_straight_rebars, 1)
Related commit:
https://github.com/SurajDadral/FreeCAD- ... 631ff05cd1

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

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Mon Jul 15, 2019 5:10 pm

Suraj Dadral wrote:
Mon Jul 15, 2019 8:15 am
The issue has been resolved :) by setting placement of line (created using draft) before creating rebars. Related code snippet:

Code: Select all

pl = FreeCAD.Placement()                                                        
pl.Rotation.Q = (0.5, 0.5, 0.5, 0.5)                                            
for points in points_list:                                                      
    line = Draft.makeWire(                                                      
        points, placement=pl, closed=False, face=True, support=None                
    )                                                                           
    rebar = Arch.makeRebar(structure, line, dia_of_straight_rebars, 1)
Related commit:
https://github.com/SurajDadral/FreeCAD- ... 631ff05cd1
+1. Great! Today, I also tried to create rebar from draft wire manually and there I haven't seen this problem. So, I was also thinking that the issue is on your side, not the FreeCAD side.
User avatar
Suraj Dadral
Posts: 97
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Tue Jul 16, 2019 5:33 pm

amrit3701 wrote:
Mon Jul 15, 2019 5:10 pm

+1. Great! Today, I also tried to create rebar from draft wire manually and there I haven't seen this problem. So, I was also thinking that the issue is on your side, not the FreeCAD side.
Yes, the problem was from my side.

I have created UI for circular column reinforcement. Now, user can create circular column reinforcement from ui.

Preview:
CircularColumn1.png
CircularColumn1.png (68.96 KiB) Viewed 253 times

Please review and give your suggestions.

Thanks,
User avatar
yorik
Site Admin
Posts: 11397
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Automate Reinforcement GSoC proposal

Postby yorik » Wed Jul 17, 2019 2:02 pm

Looking good!
User avatar
bernd
Posts: 8046
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Automate Reinforcement GSoC proposal

Postby bernd » Wed Jul 17, 2019 2:21 pm

Suraj Dadral wrote:
Tue Jul 16, 2019 5:33 pm
amrit3701 wrote:
Mon Jul 15, 2019 5:10 pm

+1. Great! Today, I also tried to create rebar from draft wire manually and there I haven't seen this problem. So, I was also thinking that the issue is on your side, not the FreeCAD side.
Yes, the problem was from my side.

I have created UI for circular column reinforcement. Now, user can create circular column reinforcement from ui.

Preview:

CircularColumn.png


Please review and give your suggestions.

Thanks,
For normal columns this is great, but I would use it for piles too. On piles the pitch changes. Means if for example the pile is 25 meters long. Since maximum reabar lenght is 15 meters there need to be some smaller pitch in the area where the straight rebars meet around the 12.5 m.

BTW: GUI in Allplan is like yours. The changes in pitch is not possible there either.
User avatar
Suraj Dadral
Posts: 97
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Thu Jul 18, 2019 12:52 pm

bernd wrote:
Wed Jul 17, 2019 2:21 pm

For normal columns this is great, but I would use it for piles too. On piles the pitch changes. Means if for example the pile is 25 meters long. Since maximum reabar lenght is 15 meters there need to be some smaller pitch in the area where the straight rebars meet around the 12.5 m.

BTW: GUI in Allplan is like yours. The changes in pitch is not possible there either.
Thanks @bernd for your feedback.
I have added this to wish list here.
I will try implement it during gsoc period.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Thu Jul 18, 2019 12:54 pm

I have created function to edit circular column reinforcement. And implemented the same through ui.
Now, user can create and edit circular column reinforcement from ui.
Related PR is here: https://github.com/amrit3701/FreeCAD-Re ... nt/pull/29

Please review and give your suggestions.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Thu Jul 18, 2019 1:08 pm

hardeeprai wrote:
Thu Jul 11, 2019 4:24 pm
Suraj Dadral wrote:
Thu Jul 11, 2019 9:21 am
I also discussed this with my civil engineer friends and according to them, diameter of all ties in column is equal in 99% cases.
Take it 100%
In below image, in case of two ties column reinforcement, do we keep "Bent Angle" and "Extension Factor" of all the ties different or they will also be same?

TwoTiesColumn.png
TwoTiesColumn.png (37.56 KiB) Viewed 179 times

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

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Thu Jul 18, 2019 1:40 pm

Suraj Dadral wrote:
Thu Jul 18, 2019 1:08 pm
In below image, in case of two ties column reinforcement, do we keep "Bent Angle" and "Extension Factor" of all the ties different or they will also be same?
I think bent angle and extension factor should be same for all ties in the column because all ties have same diameter.