Dev logs of Rebar Addon for FreeCAD - GSoC project
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
-
- Veteran
- Posts: 2630
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Amrit,
as info on "custom-spacing":
front/side cover initially was set to 100 mm, after running "custom-spacing",
front cover seems to remain at 100 mm, side cover seems to be a bigger value.
slab was taken from arch-structure predefined.
regards thomas OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11528 (Git)
Build type: Release
Branch: master
Hash: d31be3117de386b4f6cd3444e0b330db56dc6ba2
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
as info on "custom-spacing":
front/side cover initially was set to 100 mm, after running "custom-spacing",
front cover seems to remain at 100 mm, side cover seems to be a bigger value.
slab was taken from arch-structure predefined.
regards thomas OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11528 (Git)
Build type: Release
Branch: master
Hash: d31be3117de386b4f6cd3444e0b330db56dc6ba2
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Yorik, I have noticed one more thing in the Rebar addon. I don't know it's a bug of rebar addon or FreeCAD. For eg. after opening .fcstd file in which reinforcement is created with rebar addon (https://forum.freecadweb.org/download/file.php?id=40127) and when I try to change properties of rebar from rebar addon dialog box it gave below error:yorik wrote:
Code: Select all
Traceback (most recent call last):
File "<string>", line 1, in <module>
<type 'exceptions.IOError'>: The project '/home/ambu/Desktop/slab_test.FCStd' is already open!
Exception (Wed Jul 12 16:26:40 2017): Sketch::checkGeoId. GeoId index out range.
Traceback (most recent call last):
File "/home/ambu/.FreeCAD/Mod/Reinforcement/StraightRebar.py", line 89, in accept
editStraightRebar(self.Rebar, f_cover, b_cover, s_cover, diameter, True, amount, self.SelectedObj, self.FaceName)
File "/home/ambu/.FreeCAD/Mod/Reinforcement/StraightRebar.py", line 171, in editStraightRebar
sketch.movePoint(0, 1, points[0], 0)
<class 'Base.FreeCADError'>: Sketch::checkGeoId. GeoId index out range.
Regards,
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Sorry, but I unable to get. It will be better if you can explain error a bit more or may explain through a screencast.thschrader wrote: ↑Wed Jul 12, 2017 8:49 am Amrit,
as info on "custom-spacing":
front/side cover initially was set to 100 mm, after running "custom-spacing",
front cover seems to remain at 100 mm, side cover seems to be a bigger value.
slab was taken from arch-structure predefined.
Regards,
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
I think currently I should focus more on different rebar shapes but I will do it later.
Regards,
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Sweet. Thanks!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
-
- Veteran
- Posts: 2630
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Amrit,
I did the following:
Step 1: Goto Arch-WB, select green face on slab, activate "straight-rebar" dialog.
Step 2: first initial settings front/side cover =100 mm, bottom 80 mm, diameter 12 mm, amount 10 (as a start...) Click OK
Result: (set transparency to 80) 10 bars are generated. Front/side cover is equal as given in dialog. rebar position is at the
bottom of slab (? maybe I misunderstood input dialog). Never mind. With rebar placement z=+80 mm lift the rebars up.
Then acivate rebar sketch, pick the right node and stretch rebar outside the slab.
Step 3: doublick rebar in tree, dialog opens with previous parameters. activate "spacing", then "custom-spacing).
I want 6 rebars dist=50 mm in segment 1, 6 rebar dist=180 mm in segment 2, segment 3=segment1. And I want that front/side
cover is equal! Hit ok, see result: distance is unequal. Is that a bug or your intention.
regards thomas (the attachment drives me crazy, sorry for scrambling...)
- Attachments
-
- rebars_moved_up_and_stretched.PNG (22.31 KiB) Viewed 1648 times
-
- result.PNG (27.29 KiB) Viewed 1648 times
-
- step3.PNG (71.94 KiB) Viewed 1648 times
-
- step2.PNG (42.43 KiB) Viewed 1648 times
-
- step1.PNG (8.54 KiB) Viewed 1648 times
-
- Veteran
- Posts: 2630
- Joined: Sat May 20, 2017 12:06 pm
- Location: Germany
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
amrit,
I forgot the file. man... ..
done with
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11528 (Git)
Build type: Release
Branch: master
Hash: d31be3117de386b4f6cd3444e0b330db56dc6ba2
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
I forgot the file. man... ..
done with
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11528 (Git)
Build type: Release
Branch: master
Hash: d31be3117de386b4f6cd3444e0b330db56dc6ba2
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Great job Amritpal!
The "custom spacing" button is only available when editing the rebar, not when creating it, is that normal?
About the unit tests, there is one for the rebar object already, so I don't think it is absolutely necessary to add more. Up to you to see that later.
About your error, I don't really know... There have been changes in underlying geometry objects recently, maybe some new bugs have appeared. I'll see if I can narrow things down
The "custom spacing" button is only available when editing the rebar, not when creating it, is that normal?
About the unit tests, there is one for the rebar object already, so I don't think it is absolutely necessary to add more. Up to you to see that later.
About your error, I don't really know... There have been changes in underlying geometry objects recently, maybe some new bugs have appeared. I'll see if I can narrow things down
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
Yes as you suggested it works on my system when I use the normal structure, but it doesn't work from when the structure is derived from a wire. But i'm wondering why should the rebar only be derived from the structure and not other arch objects like walls or any other shape for that matter? could there be an option to check a box to enable and disable that feature? It will continue the philosophy of freecad unlike other BIM products that, any shape can be converted into any other useful object, like a wall can now be a structure vice versa. Just my natural User Experience feel.
Also I was wondering, what are the possibilities for a rebar to be created just from a wire. a little bit like the pipe tool in a way, that will a allow any wire sketch to be converted into rebar and not only depend on a flat face sketch.
Just some things i'm wondering about feasibility and implementation.
So far, good job on your progress, they are looking really good.
much regards,
Regis
Re: Dev logs of Rebar Addon for FreeCAD - GSoC project
It's not a bug.thschrader wrote: ↑Wed Jul 12, 2017 3:01 pm Amrit,
I did the following:
Step 1: Goto Arch-WB, select green face on slab, activate "straight-rebar" dialog.
Step 2: first initial settings front/side cover =100 mm, bottom 80 mm, diameter 12 mm, amount 10 (as a start...) Click OK
Result: (set transparency to 80) 10 bars are generated. Front/side cover is equal as given in dialog. rebar position is at the
bottom of slab (? maybe I misunderstood input dialog). Never mind. With rebar placement z=+80 mm lift the rebars up.
Then acivate rebar sketch, pick the right node and stretch rebar outside the slab.
Step 3: doublick rebar in tree, dialog opens with previous parameters. activate "spacing", then "custom-spacing).
I want 6 rebars dist=50 mm in segment 1, 6 rebar dist=180 mm in segment 2, segment 3=segment1. And I want that front/side
cover is equal! Hit ok, see result: distance is unequal. Is that a bug or your intention.
regards thomas (the attachment drives me crazy, sorry for scrambling...)

Let me explain in detail.
We have a structural element whose width has 2000 mm and rebar is to be distributed along width of that element. We have also assigned rebar start and end offset values to 100 mm. Now, actual length left for placing rebars is 1800 mm (2000 - OffsetStart - OffsetEnd).
According to the inputs given by you in the rebar distribution dialog box, the custom spacing string is "6@50+6@180+6@50" and according to that, your rebars covers only 1630 mm length.
Following is how rebars distributed length is calculate from custom spacing string:
1. Length of first segment: 25+50+50+50+50+50 = 25+50*5 = 275 mm
2. Length of second segment: 180+180+180+180+180+180 = 180*6 = 1080 mm
3. Length of third segment: 50+50+50+50+50+25 = 50*5+25 = 275 mm
Total length covered: 275+1080+275 = 1630 mm
But actual length available is 1800 mm hence, 170 mm (1800-1630) spacing left from the end offset.
In the dialog box, look carefully at: "n@s (give either n or s)”. As it is saying, you need to provide input either for n or s, but not both because one value automatically determines other.
Given below are a few screenshots:
1. When the spacing is 180 mm and amount is 0 of segment 2.
Output:
2. When amount is 6 and spacing is 0 mm of segment 2.
Output:
But if you know the syntax of custom spacing you can do more fun with that.

https://forum.freecadweb.org/viewtopic. ... 50#p181428
https://forum.freecadweb.org/viewtopic. ... 30#p180510
Regards,