Dev logs of Rebar Addon for FreeCAD - GSoC project

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

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by amrit3701 »

regis wrote: Sat Jul 15, 2017 11:43 am not quite yet, so process i use is that I draw a draft wire shape like rectangle etc, and the convert that draftwire into a structure
no success yet
"Cannot identified shape or from which base object structural element is derived"
Astonished!

Have you updated a code of rebar add-on? If not, then update by (Tools -> Addon manager -> Select "Reinforcement" -> Click on "Install/Update" button -> Restart FreeCAD).

It works on my side. See the tree view in the below images:

1. Input:
rebardist1.png
rebardist1.png (231.04 KiB) Viewed 1932 times

Output:
rebardist2.png
rebardist2.png (214.89 KiB) Viewed 1932 times

2. Input:
rebardist3.png
rebardist3.png (217.44 KiB) Viewed 1932 times

Output:
rebardist4.png
rebardist4.png (198.46 KiB) Viewed 1932 times
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
regis
Posts: 751
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by regis »

amrit3701 wrote: Sat Jul 15, 2017 2:20 pm
regis wrote: Sat Jul 15, 2017 11:43 am not quite yet, so process i use is that I draw a draft wire shape like rectangle etc, and the convert that draftwire into a structure
no success yet
"Cannot identified shape or from which base object structural element is derived"
Astonished!

Have you updated a code of rebar add-on? If not, then update by (Tools -> Addon manager -> Select "Reinforcement" -> Click on "Install/Update" button -> Restart FreeCAD).

My dear friend
a 1000x gratitude
It works now,
I was sitting there and waiting for the linux update to update my freecad, and was wondering why it never came, haha
I'll be back with some testing news for you.
much regards
regis
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by thschrader »

cnirbhay wrote: Mon Jul 10, 2017 11:34 am I'm glad to see new fascinating improvements in FreeCAD for structural detailings.
Cheers.
according to:
https://cnirbhay.wordpress.com/2017/06/ ... ater-tank/
thats the reason why we need rebar-tools for cicular columns.... :geek:
tank.JPG
tank.JPG (43.76 KiB) Viewed 1875 times
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by chakkree »

@Amritpal
In function makeStraightRebar, makeUShapeRebar, makeLShapeRebar and makeStirrup, its should to add "return rebar" at the end. For handle rebar object by coding.

stir1 = Stirrup.makeStirrup(....
stir1.CustomSpacing = "%d@%d"%(num , spacing)
User avatar
cnirbhay
Posts: 115
Joined: Wed Aug 17, 2016 4:24 pm

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by cnirbhay »

thschrader wrote: Sun Jul 16, 2017 2:51 pm
cnirbhay wrote: Mon Jul 10, 2017 11:34 am I'm glad to see new fascinating improvements in FreeCAD for structural detailings.
Cheers.
according to:
https://cnirbhay.wordpress.com/2017/06/ ... ater-tank/
thats the reason why we need rebar-tools for cicular columns.... :geek:
tank.JPG
I'm glad that you viewed my blog and reviewed the files. :-)
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by amrit3701 »

I have created L-Shape rebar. In the L-Shape rebar, I have introduced new property in the dialog box i.e orientation and image appear in a L-Shape rebar dialog box is changing according to the orientation selected by a user.

I have also screencast one video for L-Shaped rebar:
phpBB [video]


Regards,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
amrit3701
Posts: 343
Joined: Mon Jun 13, 2016 5:37 pm

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by amrit3701 »

chakkree wrote: Sun Jul 16, 2017 3:40 pm @Amritpal
In function makeStraightRebar, makeUShapeRebar, makeLShapeRebar and makeStirrup, its should to add "return rebar" at the end. For handle rebar object by coding.
Done. Now, make.. function will return created rebar.
https://github.com/amrit3701/FreeCAD-Re ... 269c96decc

BTW, you can also create issues on FreeCAD-Reinforcement repo. :)

Regards,
Amritpal Singh
Github, Like my work, sponsor me!
thschrader
Veteran
Posts: 3158
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by thschrader »

amrit3701 wrote: Sun Jul 16, 2017 7:05 pm I have created L-Shape rebar. ...
Regards,
:)
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11586 (Git)
Build type: Release
Branch: master
Hash: e6b9ec5dbcb57db186653d5cd22450418c454439
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
L_shape_rebar.JPG
L_shape_rebar.JPG (215.86 KiB) Viewed 1800 times
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by chakkree »

Test create a continuous beam.
Rebars are made from LShape, Straight, and Stirrup.
Add rebar at column used dummy structure for containing rebar.
If the rebar's properties, "S-Cover", separate to Left-Side-Cover and Right-Side-Cover, dummy structure may be not necessary.

TestContBeam-2.png
TestContBeam-2.png (417.68 KiB) Viewed 1752 times
Dummy1.png
Dummy1.png (122.93 KiB) Viewed 1751 times
TestContBeam2.FCStd
(193.96 KiB) Downloaded 43 times
-----------------------------
Rebar Addon: Commits on Jul 17, 2017
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11570 (Git)
Build type: Release
Branch: master
Hash: a68940340747d3f18818fc7b0bc72eb59e7a0f25
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
User avatar
chakkree
Posts: 327
Joined: Tue Jun 30, 2015 12:58 am
Location: Bangkok Thailand

Re: Dev logs of Rebar Addon for FreeCAD - GSoC project

Post by chakkree »

Test create rebar in retaining wall.

Code: Select all

#-*- coding=utf8 -*-
"""
   rebar in R-Wall
   18 Jul 2017
"""


import Arch
import Draft
import Stirrup

from FreeCAD import Vector
from math import cos , radians


def makeRetainingWall():
    L = 5000
    beam = Arch.makeStructure(length=L,width=300.0,height=400.0 , name='Beam')
    slab = Arch.makeStructure(length=L,width=1000.0,height=200.0 , name='Slab')
    wall = Arch.makeStructure(length=L,width=200.0,height=3000.0 , name='R-Wall')
    beam.Placement.Base = Vector(L , -0, -400/2)
    slab.Placement.Base = Vector(L , +500+150, -200/2)
    wall.Placement.Base = Vector(L , +50., +3000/2)

    beam.ViewObject.Transparency = 80
    slab.ViewObject.Transparency = 80
    wall.ViewObject.Transparency = 80

    # Slab Rebar
    spacing = 125
    num = int(L/spacing) 
    points=[Vector(0,1800,0.0),
            Vector(0,0.0,0.0),
            Vector(0,0,-150)]
    line = Draft.makeWire(points,closed=False,face=False,support=None)
    Draft.move(line , Vector(50,-150+25,-25))
    rebar1 = Arch.makeRebar(diameter = 12)
    rebar1.Base = line
    rebar1.Label = 'CustomRebar'
    rebar1.Host = slab
    rebar1.Amount = 1
    rebar1.Direction = (1., 0., 0.)
    rebar1.Rounding = 2
    rebar1.OffsetStart =50 ; rebar1.OffsetEnd =0
    rebar1.Role = u"Rebar"
    #Msg('%d@%d\n'%(num,spacing))
    rebar1.CustomSpacing = '%d@%d'%(num,spacing)
    #---------------------------------------------
    points=[Vector(0,1800,0.0),
            Vector(0,0.0,0.0),
            Vector(0,0,+150)]
    line = Draft.makeWire(points,closed=False,face=False,support=None)
    Draft.move(line , Vector(50,-150+25,-200+25))
    rebar2 = Arch.makeRebar(diameter = 12)
    rebar2.Base = line
    rebar2.Label = 'CustomRebar'
    rebar2.Host = slab
    rebar2.Amount = 1
    rebar2.Direction = (1., 0., 0.)
    rebar2.Rounding = 2
    rebar2.OffsetStart =50+12+2 ; rebar1.OffsetEnd =0
    rebar2.Role = u"Rebar"
    rebar2.CustomSpacing = '%d@%d'%(num,spacing)
    
    # Wall Rebar
    spacing = 200
    num = int(L/spacing) 
    points=[Vector(0,+300,0.0),
            Vector(0,0.0,0.0),
            Vector(0,0,3000+150)]
    line = Draft.makeWire(points,closed=False,face=False,support=None)
    Draft.move(line , Vector(0,150-25 ,-170))
    rebar3 = Arch.makeRebar(diameter = 12)
    rebar3.Base = line
    rebar3.Label = 'CustomRebar'
    rebar3.Host = wall
    rebar3.Amount = 1
    rebar3.Direction = (1., 0., 0.)
    rebar3.Rounding = 2
    rebar3.OffsetStart =50 ; rebar1.OffsetEnd =0
    rebar3.Role = u"Rebar"
    rebar3.CustomSpacing = '%d@%d'%(num,spacing)
    
    points=[Vector(0,-100,0.0),
            Vector(0,0.0,0.0),
            Vector(0,0,3000+150)]
    line = Draft.makeWire(points,closed=False,face=False,support=None)
    Draft.move(line , Vector(0,-50+25 ,-170))
    rebar4 = Arch.makeRebar(diameter = 12)
    rebar4.Base = line
    rebar4.Label = 'CustomRebar'
    rebar4.Host = wall
    rebar4.Amount = 1
    rebar4.Direction = (1., 0., 0.)
    rebar4.Rounding = 2
    rebar4.OffsetStart =50+12+2 ; rebar1.OffsetEnd =0
    rebar4.Role = u"Rebar"
    rebar4.CustomSpacing = '%d@%d'%(num,spacing)
    #-----------------------------
    spacing = 200
    num = int(3000/spacing) 
    points=[Vector(-150,0,0.0),
            Vector(L+150 ,0.0,0.0),]
    line = Draft.makeWire(points,closed=False,face=False,support=None)
    Draft.move(line , Vector(0,-50+25+12 ,50))
    rebar5 = Arch.makeRebar(diameter = 12)
    rebar5.Base = line
    rebar5.Label = 'CustomRebar'
    rebar5.Host = wall
    rebar5.Amount = 1
    rebar5.Direction = (0, 0., 1.)
    rebar5.Rounding = 2
    rebar5.OffsetStart =50 ; rebar1.OffsetEnd =0
    rebar5.Role = u"Rebar"
    rebar5.CustomSpacing = '%d@%d'%(num,spacing)
    
    points=[Vector(-150,0,0.0),
            Vector(L+150 ,0.0,0.0),]
    line = Draft.makeWire(points,closed=False,face=False,support=None)
    Draft.move(line , Vector(0,150-25-12 ,50))
    rebar6 = Arch.makeRebar(diameter = 12)
    rebar6.Base = line
    rebar6.Label = 'CustomRebar'
    rebar6.Host = wall
    rebar6.Amount = 1
    rebar6.Direction = (0, 0., 1.)
    rebar6.Rounding = 2
    rebar6.OffsetStart =50 ; rebar1.OffsetEnd =0
    rebar6.Role = u"Rebar"
    rebar6.CustomSpacing = '%d@%d'%(num,spacing)
    
    #wall.addComponents([slab,beam])
    #Arch.addComponents([beam,slab],wall)
if __name__=='__main__':
    
    makeRetainingWall()
    Msg('Done!!\n\n')
    FreeCAD.ActiveDocument.recompute()
RetainingWall.png
RetainingWall.png (861.7 KiB) Viewed 1733 times
TestRetainingWall.FCStd
(86.12 KiB) Downloaded 38 times
-----------------------------
Rebar Addon: Commits on Jul 17, 2017
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11570 (Git)
Build type: Release
Branch: master
Hash: a68940340747d3f18818fc7b0bc72eb59e7a0f25
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Post Reply