GSoC Proposal: Extended functionality of Rebar Addon

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
ebrahim raeyat
Posts: 620
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by ebrahim raeyat »

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: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by amrit3701 »

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!
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
Suraj Dadral
Posts: 307
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by Suraj Dadral »

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: 620
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by ebrahim raeyat »

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: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by balrobs »

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

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by Suraj Dadral »

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

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by Suraj Dadral »

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 47 times
test_rebar_shape.png
test_rebar_shape.png (2.2 KiB) Viewed 1473 times
2. Create function getRebarShapeCutList() to get rebar shape cut list svg.
Sample Output:
test_rebar_shape.svg
(12.91 KiB) Downloaded 63 times
test_rebar_shape.png
test_rebar_shape.png (10.29 KiB) Viewed 1473 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: 620
Joined: Sun Sep 09, 2018 7:00 pm
Location: Iran
Contact:

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by ebrahim raeyat »

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: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by amrit3701 »

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. :)
Amritpal Singh
Github, Like my work, sponsor me!
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: GSoC Proposal: Extended functionality of Rebar Addon

Post by balrobs »

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
Post Reply