GSoC Proposal: Extended functionality of Rebar Addon

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
ebrahim raeyat
Posts: 335
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby ebrahim raeyat » Thu Aug 06, 2020 8:34 am

Suraj Dadral wrote:
Thu Aug 06, 2020 12:06 am

Suggestions are always welcome. :)
thanks @Suraj Dadral. very thanks. it works well. one note:

in column and beam, it is not common to declare span between rebar except for Stirrups. in slab it is common to tell spans.
User avatar
amrit3701
Posts: 303
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby amrit3701 » Thu Aug 06, 2020 8:56 am

Suraj Dadral wrote:
Thu Aug 06, 2020 12:06 am
Hello @All

The documentation pages for reinforcement drawing and dimensioning are ready:
Reinforcement Drawing: Arch_Rebar_Drawing
Reinforcement Dimensioning: Arch_Rebar_Dimensioning
Reinforcement Drawing and Dimensioning: Arch_Rebar_Drawing_Dimensioning
Looks good. Nice job!
User avatar
Suraj Dadral
Posts: 279
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Thu Aug 06, 2020 1:20 pm

ebrahim raeyat wrote:
Thu Aug 06, 2020 8:34 am

thanks @Suraj Dadral. very thanks. it works well. one note:

in column and beam, it is not common to declare span between rebar except for Stirrups. in slab it is common to tell spans.
Hi @ebrahim raeyat

Thanks for introducing to the process. :)
As we are not handling dimensioning based on structure type, so this thing needs to be adjusted by user, which is possible while creating drawing and dimensioning and can also be altered after creating drawing and dimensioning.
In future, we can also have special wrapper functions for different structure types if need arises.

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

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby ebrahim raeyat » Thu Aug 06, 2020 8:11 pm

Suraj Dadral wrote:
Thu Aug 06, 2020 1:20 pm

Hi @ebrahim raeyat

As we are not handling dimensioning based on structure type,
Thanks,
thanks, you are right.
balrobs
Posts: 79
Joined: Fri Apr 24, 2020 8:58 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby balrobs » Fri Aug 07, 2020 8:37 am

Suraj Dadral wrote:
Thu Aug 06, 2020 1:20 pm

As we are not handling dimensioning based on structure type, so this thing needs to be adjusted by user, which is possible while creating drawing and dimensioning and can also be altered after creating drawing and dimensioning.
+1

Hi @Suraj,
BTW, it would be great if users could not only specify the span but also the spacing of the rebars in dimensioning text. Something like "%S/(%M-1)". Would this be possible? I think a lot of users would love this feature.

Thanks and regards!
User avatar
Suraj Dadral
Posts: 279
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Sun Aug 09, 2020 10:11 pm

balrobs wrote:
Fri Aug 07, 2020 8:37 am
Hi @Suraj,
BTW, it would be great if users could not only specify the span but also the spacing of the rebars in dimensioning text. Something like "%S/(%M-1)". Would this be possible? I think a lot of users would love this feature.
Hi @balrobs

We can add new placeholder like %s for spacing in rebars.
I will implement it soon. For now, created issue here to track this.

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

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby Suraj Dadral » Sun Aug 09, 2020 10:32 pm

Hi @All

Here is update:
1. Create function getRebarShapeSVG() to get rebar shape svg with its dimension.
Sample output:
test_rebar_shape.svg
(1.73 KiB) Downloaded 8 times
test_rebar_shape.png
test_rebar_shape.png (2.2 KiB) Viewed 315 times
2. Create function getRebarShapeCutList() to get rebar shape cut list svg.
Sample Output:
test_rebar_shape.svg
(12.91 KiB) Downloaded 10 times
test_rebar_shape.png
test_rebar_shape.png (10.29 KiB) Viewed 315 times

How to use:
You can get the latest code from here.

Code: Select all

import importlib
from xml.etree import ElementTree

import Draft
from RebarShapeCutList import RebarShapeCutListfunc

importlib.reload(RebarShapeCutListfunc)

base_rebars = Draft.get_objects_of_type(
    FreeCAD.ActiveDocument.Objects, "RebarShape"
)
arch_rebars = Draft.get_objects_of_type(FreeCAD.ActiveDocument.Objects, "Rebar")

rebars = []
rebars.extend(base_rebars)
rebars.extend(arch_rebars)

rebar_shapes_svg = []
for rebar in rebars:
    rebar_shapes_svg.append(
        RebarShapeCutListfunc.getRebarShapeSVG(rebar, scale=0.1)
    )

print(ElementTree.tostring(rebar_shapes_svg[0], encoding="unicode"))

rebar_shape_cut_list = RebarShapeCutListfunc.getRebarShapeCutList()

output_file = "/home/blank/GSoC20/test_rebar_shape.svg"
with open(output_file, "w") as f:
    f.write(ElementTree.tostring(rebar_shape_cut_list, encoding="unicode"))


- The above functions will work for ArchRebar and Rebar2 objects.
- The length of each edge is calculated as there would be no curves as suggested by @bernd here.

Do we also need to add bent angles in the rebar shape cut list, or will we do it in the bar bending schedule?

Please review and give your suggestions.

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

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby ebrahim raeyat » Sun Aug 09, 2020 11:53 pm

Suraj Dadral wrote:
Sun Aug 09, 2020 10:32 pm

Please review and give your suggestions.

Thanks,
Very thanks for your effort, works fine for me. one not:

in my stirrup I gave float point like 357.01 in mm.
User avatar
amrit3701
Posts: 303
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby amrit3701 » Mon Aug 10, 2020 4:43 pm

Suraj Dadral wrote:
Sun Aug 09, 2020 10:32 pm
Do we also need to add bent angles in the rebar shape cut list, or will we do it in the bar bending schedule?
Bent angle is part to specify rebar shape. So, I think it should be present in rebar share cut list. But we can skip 90 angle because user can interpret it from rebar shape. Maybe bernd, balrobs and ebrahim tell us better here. :)
balrobs
Posts: 79
Joined: Fri Apr 24, 2020 8:58 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Postby balrobs » Mon Aug 10, 2020 5:39 pm

amrit3701 wrote:
Mon Aug 10, 2020 4:43 pm
Suraj Dadral wrote:
Sun Aug 09, 2020 10:32 pm
Do we also need to add bent angles in the rebar shape cut list, or will we do it in the bar bending schedule?
Bent angle is part to specify rebar shape. So, I think it should be present in rebar share cut list. But we can skip 90 angle because user can interpret it from rebar shape. Maybe bernd, balrobs and ebrahim tell us better here. :)
I agree with you @amrit3701, whenever we draw the shape of a rebar and its dimensions, we should specify not only the length of the bended part but also either deltaX and deltaY or its bending angle if not equal to 90°.
BTW maybe at this point it might be useful to think about what the rebar shape cut list and the bar bending schedule we want to generate should look like. I believe that standards in this regard differ from country to country.

Kind regards