Automate Reinforcement GSoC proposal

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Suraj Dadral
Posts: 99
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Fri May 10, 2019 7:05 pm

amrit3701 wrote:
Thu May 09, 2019 7:01 am

Nice job.
Thanks


I suggest to put daily progress on FreeCAD wiki rather than on personal site.
I have created page on FreeCAD wiki to put my daily progress and here it is:
https://www.freecadweb.org/wiki/User:Su ... SoC19/logs

I also started to keep users wish list here: https://www.freecadweb.org/wiki/User_ta ... SoC19/logs

Now, I will start creating UI for column reinforcement as here: https://www.freecadweb.org/wiki/File:CreateColumn1.png

Regards,
User avatar
hardeeprai
Posts: 167
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Automate Reinforcement GSoC proposal

Postby hardeeprai » Sat May 11, 2019 1:19 pm

Suraj Dadral wrote:
Fri May 10, 2019 7:05 pm
Now, I will start creating UI for column reinforcement as here: https://www.freecadweb.org/wiki/File:CreateColumn1.png
For 1st and 2nd value, it should be "Clear Cover" in place of "Effective Cover".

In values like 20.00 mm, is it possible to remove trailing zeros. It may be like:

If actual value is:

123.123456789, then displayed value 123.12 mm or 123.123 (what ever decimal places you or user decide)
123.1, then displayed value 123.1 instead of 123.10
123, then displayed value 123 instead of 123.00 mm

What is difference between "Bent Factor" and "Rounding" of tie?

Dia of non-corner bars along X and Y may be different.

In example image:

Along X, number of bars are 2 of dia 8 mm (on each face) and along Y, number is 3.

It might be (to bring more flexibility):

Along X axis (on each face): 2@8mm
Along Y axis (on each face): 3@8mm

Other possibilities:

Along X axis (on each face): 12mm+16mm+12mm
Along Y axis (on each face): 2@20mm+1@16mm+2@20mm

The above are symmetric, but if used wish may put unsymmetric:

Along X axis (on each face): 8mm+1@10mm
Along Y axis (on each face): 8mm+10mm+12mm

There is no parameter to specify spacing of ties, which should be similar to stirrups in beam. It will be normally as:

End1 + Central non end part + End2

10@75mm+10@125mm+8@80mm
--
H.S.Rai
User avatar
Suraj Dadral
Posts: 99
Joined: Fri Sep 07, 2018 5:32 pm
Contact:

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Sat May 11, 2019 3:18 pm

hardeeprai wrote:
Sat May 11, 2019 1:19 pm
For 1st and 2nd value, it should be "Clear Cover" in place of "Effective Cover".

In values like 20.00 mm, is it possible to remove trailing zeros. It may be like:

If actual value is:

123.123456789, then displayed value 123.12 mm or 123.123 (what ever decimal places you or user decide)
123.1, then displayed value 123.1 instead of 123.10
123, then displayed value 123 instead of 123.00 mm
I will try to do this during implementation of UI.

hardeeprai wrote:
Sat May 11, 2019 1:19 pm

What is difference between "Bent Factor" and "Rounding" of tie?
Bent Factor is used to find length of extended part of stirrup:
length of extended part of stirrup = (dia_of_stirrup) x (bentFactor)

Rounding value is used to find rounding of stirrups by multiplying it to dia_of_stirrups

Image:
BentFactorVSRounding.png
BentFactorVSRounding.png (60.23 KiB) Viewed 352 times
hardeeprai wrote:
Sat May 11, 2019 1:19 pm

Dia of non-corner bars along X and Y may be different.

In example image:

Along X, number of bars are 2 of dia 8 mm (on each face) and along Y, number is 3.

It might be (to bring more flexibility):

Along X axis (on each face): 2@8mm
Along Y axis (on each face): 3@8mm

Other possibilities:

Along X axis (on each face): 12mm+16mm+12mm
Along Y axis (on each face): 2@20mm+1@16mm+2@20mm

The above are symmetric, but if used wish may put unsymmetric:

Along X axis (on each face): 8mm+1@10mm
Along Y axis (on each face): 8mm+10mm+12mm
So, we will take input for diameter and amount of rebars as:
Amount@Diameter: amount@diameter + amount@diameter + amount@diameter

hardeeprai wrote:
Sat May 11, 2019 1:19 pm
There is no parameter to specify spacing of ties, which should be similar to stirrups in beam. It will be normally as:

End1 + Central non end part + End2

10@75mm+10@125mm+8@80mm
I will add option for amount and spacing similar to implemented by @amrit3701 for current Rebar Addon.

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

Re: Automate Reinforcement GSoC proposal

Postby Suraj Dadral » Sat May 11, 2019 3:37 pm

Suraj Dadral wrote:
Sat May 11, 2019 3:18 pm

So, we will take input for diameter and amount of rebars as:
Amount@Diameter: amount@diameter + amount@diameter + amount@diameter
I have created UI and made changes as suggested by @hardeeprai above.
The .ui file of Qt Designer can be found in attachment.
And preview of UI:
ColumnReinforcement.png
ColumnReinforcement.png (57.31 KiB) Viewed 348 times


I have tried to load this .ui file in FreeCAD Task Panel using below code:

Code: Select all

class _ColumnReinforcement:
	def __init__(self):
		self.form = FreeCADGui.PySideUic.loadUi("/home/suraj/.FreeCAD/Mod/Reinforcement/ColumnReinforcement/ColumnReinforcement.ui")

FreeCADGui.Control.showDialog(_ColumnReinforcement())
It does't allow me to take input in the form of:
amount@diameter + amount@diameter + amount@diameter

So, should I change the way I am taking input OR display form in new window instead of FreeCAD's Task Panel?

Thanks,
Attachments
ColumnReinforcement.ui
(12.93 KiB) Downloaded 14 times
User avatar
hardeeprai
Posts: 167
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Automate Reinforcement GSoC proposal

Postby hardeeprai » Sat May 11, 2019 10:57 pm

Suraj Dadral wrote:
Sat May 11, 2019 3:18 pm
hardeeprai wrote:
Sat May 11, 2019 1:19 pm
123, then displayed value 123 instead of 123.00 mm

I will try to do this during implementation of UI.

hardeeprai wrote:
Sat May 11, 2019 1:19 pm

See if it can be done. It will not have any technical advantage, it is only from aesthetic point of view.
--
H.S.Rai
User avatar
hardeeprai
Posts: 167
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Automate Reinforcement GSoC proposal

Postby hardeeprai » Sat May 11, 2019 11:13 pm

Suraj Dadral wrote:
Sat May 11, 2019 3:18 pm
hardeeprai wrote:
Sat May 11, 2019 1:19 pm

What is difference between "Bent Factor" and "Rounding" of tie?

Bent Factor is used to find length of extended part of stirrup:
length of extended part of stirrup = (dia_of_stirrup) x (bentFactor)

Rounding value is used to find rounding of stirrups by multiplying it to dia_of_stirrups
With respect to image attached, for dia 20, extension should be 20*bentFactor = 20*4 = 80, but you showed 80.24 and 80.21. Like wise 39.86 and 40.38 should be 40, if whatever you wrote is correct. How you put dimensions on image? Exact or these are estimated?

As per you: length of extended part of stirrup = (dia_of_stirrup) x (bentFactor)

Don't call it bentFactor, call it "extensionFactor".

How you define "rounding of stirrups"?
--
H.S.Rai
User avatar
hardeeprai
Posts: 167
Joined: Sun May 23, 2010 2:41 pm
Location: Ludhiana, Punjab, India
Contact:

Re: Automate Reinforcement GSoC proposal

Postby hardeeprai » Sat May 11, 2019 11:33 pm

Suraj Dadral wrote:
Sat May 11, 2019 3:18 pm
I have created UI and made changes as suggested by @hardeeprai above.

It does't allow me to take input in the form of:
amount@diameter + amount@diameter + amount@diameter
Better replace "amount" with "Number".

Suraj Dadral wrote:
Sat May 11, 2019 3:18 pm

So, should I change the way I am taking input OR display form in new window instead of FreeCAD's Task Panel?
IMO, you need to change the way you take input. There may be a different type of Input Box (Text box), which take such input (4@20 +3@ 16) [which can ignore white spaces] and preserve this information [That mean, if later you open this item, it should able to display it as 4@20+3@16 and allow you to edit].
--
H.S.Rai
User avatar
yorik
Site Admin
Posts: 11547
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Automate Reinforcement GSoC proposal

Postby yorik » Sun May 12, 2019 12:48 am

IMHO the 4@20+3@16 notation is useful for you (easy to parse and store in a string), but not very easy to the user. I would change that edit field by a button, that opens a dialog that is specially made to create and edit such a string. Maybe a kind of grid where the use wouldn't have to care about entering special chars correctly...
User avatar
amrit3701
Posts: 234
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Sun May 12, 2019 7:17 am

hardeeprai wrote:
Sat May 11, 2019 11:13 pm

With respect to image attached, for dia 20, extension should be 20*bentFactor = 20*4 = 80, but you showed 80.24 and 80.21. Like wise 39.86 and 40.38 should be 40, if whatever you wrote is correct. How you put dimensions on image? Exact or these are estimated?
I think he used "Measure distance" tool (mark two endpoints using mouse) and that's why it's not correct.
User avatar
amrit3701
Posts: 234
Joined: Mon Jun 13, 2016 5:37 pm

Re: Automate Reinforcement GSoC proposal

Postby amrit3701 » Sun May 12, 2019 7:35 am

Suraj Dadral wrote:
Sat May 11, 2019 3:37 pm
I have created UI and made changes as suggested by @hardeeprai above.
The .ui file of Qt Designer can be found in attachment.
And preview of UI:
ColumnReinforcement.png
Instead of using QLineEdit fields, you should use our FreeCAD Gui::InputField, which supports units, expressions, etc. These should normally be in your QDesigner if you compiled the FreeCAD plugin for it.

See QDesigner plugin section: https://www.freecadweb.org/wiki/CompileOnUnix
https://github.com/FreeCAD/FreeCAD/tree ... ins/widget

After, compilation you can import these widgets into QtCreator and widgets looks like below in QtCreator.

widgets.png
widgets.png (121.94 KiB) Viewed 276 times