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 »

saso wrote: Wed Aug 09, 2017 10:00 pm Here is one bug, probably for yorik, if using StraightRebar the vertical orientation will create wrong Centerline representation of the rebar, both if choosing it as a first option or if switching later from horizontal to vertical.
Yes, this happens sometimes when any new point of straight rebar matches with older points. Like in the above straight rebar, when orientation is horizontal let points are (0, 10) and (0, 90) (here we are not considering z-axis because sketch is the base of rebar object and it is always drawn on 2D plane ) and when you change orientation to vertical, new points are (0, 90) and (90, 90). Therefore, on move first point i.e. (0, 10) to new point i.e. (0, 90) by (sketch.movePoint(0, 1, new_point, 0)), FreeCAD gives below error:

Code: Select all

Updating geometry: Error build geometry(0): Both points are equal
Invalid solution from DogLeg solver.
That's why Straight rebar isn't shows the expected result.

However, we can overcome this error by following ways:
1. Press "Apply" or "Ok" button twice.
2. We can add some error value or a random number like 0.00001 to new points. I don't know it is a right approach or not.

Regards,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

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

Post by saso »

regis wrote: Wed Aug 09, 2017 11:29 pm I use to wonder why you have the 'cancel, apply, ok' trio combination in applications when validating and modifying inputs,
over the years i've convinced my self that cancel is needed by default, apply is perhaps when you are modifying some data, and it doesn't have have an auto generate preview, or realtime input modification preview of some sort, then you hit apply, it changes, then you say, i like it, hmm i don't like, change again, apply, etc, and then when you are staisfied you hit "ok", to validate the final option and to close out of the submenu.
But the strange thing in freecad is that you have the reload botton, and you have some part tools which when you hit apply the generate something like okay as well, so no difference, an then you have in the arch workbench, the section cut tool which when you modify something, not only does it not generate automatically, (maybe for the better because crazy complex calc which crash program at this point might make freecad unsable in the end, so it is best to have an option that tells the section plane, ok recompute new changes.
Yes, I mostly share your views, the user interface (UI) and and user experience (UX) design is however an somewhat separate topic from the FreeCAD need to recompute the model. Having consistent placement and behavior of GUI elements, like buttons, is important and there are guides, best practices and standards about it. What are the best ways and times to recompute the model is however something that is special for parametric CAD programs and is something that should probably be possible to optimize for FreeCAD in the future.
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

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

Post by saso »

amrit3701 wrote: Thu Aug 10, 2017 9:38 am May be we can set the order of standard buttons but at present, I don't know how.
No, I did not know that there was such an system to automatically place this buttons. It is IMO not so important in what order the buttons are placed but that they are placed consistently in the different dialog and task windows. OK-Cancel-Apply is common for Windows, on Mac and Linux it can be different. So if we have a system that can help us to keep this consistent, I would not go and work around it :)
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

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

Post by saso »

amrit3701 wrote: Thu Aug 10, 2017 12:47 pm That's why Straight rebar isn't shows the expected result.

However, we can overcome this error by following ways:
1. Press "Apply" or "Ok" button twice.
2. We can add some error value or a random number like 0.00001 to new points. I don't know it is a right approach or not.
Yes, I also know about this issue with the sketch and have also found out the workaround of applying the settings twice, but this is not what I was talking about. The bug I described above is when rebar display mode is changed to Centerline (default is Flat Lines).
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 »

Now, I can add svg image to the dialog and control position of widget.
Extended dialog for helping create square footing with U-shape rebars.
requirement: amrit3701/FreeCAD-Reinforcement addons.

Next plan, simple beam and simple column.

SQ_Foot_01.png
SQ_Foot_01.png (393.4 KiB) Viewed 1856 times
https://github.com/chakkreetiya/FreeCAD-Rebars
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 »

Congratulations to all. Rebar addon passes 100 commits. :)

I have implemented Part::Helix in the circular (helical) stirrup. Now we have smooth helical rebar. See below images:

helicalrebar1.png
helicalrebar1.png (347.82 KiB) Viewed 1824 times
helicalrebar2.png
helicalrebar2.png (240.23 KiB) Viewed 1824 times
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: Fri Aug 11, 2017 3:37 pm I have implemented Part::Helix in the circular (helical) stirrup. Now we have smooth helical rebar. See below images:
Nice! :)
Info:
I used the red dummy/array to produce the red ones. When I select the top face
of the cylinder and go to straight-rebars, I get the green ones. The vertical rebars
dont react on -200 input in top cover value (but the sketch does...)
regards thomas
file:
circular001.FCStd
(69.06 KiB) Downloaded 41 times
system:
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11749 (Git)
Build type: Release
Branch: master
Hash: 6c4bdf24dfd697ee212ec5950969125851a0907c
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
circular.JPG
circular.JPG (160.54 KiB) Viewed 1781 times
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 »

amrit3701 wrote: Sat Aug 05, 2017 7:10 pm
Hello everyone,

Here is my TODO task list which I will complete before final phase evaluation:
1. Complete circular stirrup (spiral) which Yorik posted it in his previous post in this thread.
2. Create wiki pages for all rebar shapes which I completed.
3. Add "Apply" button in all dialog boxes of rebar shapes.
4. Add user facility to give custom spacing when he/she creating rebar. Now user gives custom spacing after creating rebar with rebar tool.
5. Also, discuss with Yorik that can we add rebar tools as default FreeCAD feature.
Also, I completed my 1st task from TODO task list. Now, I am working on creating user documentation (i.e. wiki pages). :)

Regards,
Amritpal Singh
Github, Like my work, sponsor me!
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

Just tested, works great Amritpal!

Two questions:
1) are circular stirrups always made with such helixes? I suppose there are also conventional stirrups (each stirrup is a separate bar)?
2) Be able to do the vertical bars like @thschrader says would also be nice... Maybe it could be done by extending the straight rebar code (detect if a face is cylindrical, and treat accordingly)?
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 »

yorik wrote: Sat Aug 12, 2017 3:34 pm 1) are circular stirrups always made with such helixes?
No.
source: dicad
circular_closed.png
circular_closed.png (148.12 KiB) Viewed 1751 times
Post Reply