PR #3456 - Adding chamfer angle field to PartDesign

Post here if you have re-based and finalised code to integrate into master, which was discussed, agreed to and tested in other forums. You can also submit your PR directly on github.
armandas
Posts: 25
Joined: Thu Dec 12, 2013 9:08 pm

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby armandas » Sun May 24, 2020 9:28 am

wmayer wrote:
Sun May 24, 2020 8:16 am
The angle doesn't seem to work. I cannot set a value different from 45 degree in the task panel. In the property editor I can change it.
That's strange. I can enter the values just fine, but the up/down arrows don't do anything...

Edit: Removing the singleStep property from XML fixes the arrow buttons...
wmayer
Site Admin
Posts: 15966
Joined: Thu Feb 19, 2009 10:32 am

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby wmayer » Sun May 24, 2020 10:23 am

Found it: git commit 262841bb3c8a7

When setting the value of the type double then the "double" tags instead of "number" tags must be used. The latter is used for integers.

Code: Select all

       <widget class="Gui::QuantitySpinBox" name="chamferAngle" native="true">
         <property name="singleStep">
          <number>1.000000000000000</number>
         </property>
must become

Code: Select all

       <widget class="Gui::QuantitySpinBox" name="chamferAngle" native="true">
         <property name="singleStep">
          <double>1.000000000000000</double>
         </property>
See git commit 8ac6b12e
armandas
Posts: 25
Joined: Thu Dec 12, 2013 9:08 pm

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby armandas » Sun May 24, 2020 10:29 am

wmayer wrote:
Sun May 24, 2020 10:23 am
Found it: git commit 262841bb3c8a7
Thanks for the fix! :oops:
abdullah
Posts: 3504
Joined: Sun May 04, 2014 3:16 pm

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby abdullah » Sun May 24, 2020 2:03 pm

armandas wrote:
Sun May 24, 2020 10:29 am
Thanks for the fix!
Double shame on me as integrator in practice :oops: :oops: :oops:

The best part of a merge is usually to look after for Werner's critical eye:

Unable to align spin boxes? This is how:
git commit 53dbc5fc2df5cea4fad95be8aed4fc6206e10db6

Integrator not attentive enough to good UI practices? solved:
git commit 00be985c9712a3d12779956debdfc0abc8d61706

Integrator does not know the difference between <double> and <number> and only tests with integers? He's got you covered:
git commit 8ac6b12ee56bbe3087358706a725101c493c0706

What I am not really sure why is needed is this:
git commit 5bdb40d50eafbc3febb46347e948da254fe54fcf

The reasons is that, the icon was renamed here:
https://github.com/FreeCAD/FreeCAD/comm ... 8ebffe2321

Personally I do not like this alias-es, because the updateResource script removes them. I probably have the record of inadvertently removing the one alias existing in the sketcher by using this script.
abdullah
Posts: 3504
Joined: Sun May 04, 2014 3:16 pm

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby abdullah » Sun May 24, 2020 2:08 pm

And the reason for the alias is this:
https://forum.freecadweb.org/viewtopic. ... 29#p401748
User avatar
Kunda1
Posts: 7511
Joined: Thu Jan 05, 2017 9:03 pm

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby Kunda1 » Sun May 24, 2020 2:09 pm

An aside:
@abdullah I enjoy how you humorously self-deprecate when you point out your own shortcomings and simultaneously give respect to the veterans 'elders' for their patience with you. Thanks for modeling that :D

And thanks to @wmayer for being a Jedi.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
uwestoehr
Posts: 1542
Joined: Sun Jan 27, 2019 3:21 am

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby uwestoehr » Sun May 31, 2020 12:27 am

uwestoehr wrote:
Fri May 15, 2020 3:22 pm
However, there are some issues: -> I'll try to provide a patch
Sorry for being lazy the last weeks.

The feature works now perfectly. Many thanks for all who contributed! I just constructed my first real-life part using this feature and it is a great addition to FC.
User avatar
uwestoehr
Posts: 1542
Joined: Sun Jan 27, 2019 3:21 am

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby uwestoehr » Mon Jun 08, 2020 12:15 am

uwestoehr wrote:
Sun May 31, 2020 12:27 am
The feature works now perfectly.
I was too rash, since there is an issue:
FreeCAD_hoqDoePB7m.png
FreeCAD_hoqDoePB7m.png (27.45 KiB) Viewed 210 times

Here I selected 2 edges of the cube and want to get the same chamfer shape for both edges (otherwise I would create a second chamfer afterwards).
So the issue is that the directions of the chamfer is different despite it is the same chamfer layout applied to the edges.
chrisb
Posts: 25204
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby chrisb » Mon Jun 08, 2020 12:50 am

Although it seems obvious what should be done here, I'm afraid that a general solution is no easy task. Consider a prism where the corners should be chamfered:
Snip macro screenshot-994d35.png
Snip macro screenshot-994d35.png (2.43 KiB) Viewed 202 times
It is not possible to chamfer it in a way where all faces have either only long or only short sides of the fillets at their ends. So we need a clear and universal algorithm defining how this should be handled.
chrisb
Posts: 25204
Joined: Tue Mar 17, 2015 9:14 am

Re: PR #3456 - Adding chamfer angle field to PartDesign

Postby chrisb » Mon Jun 08, 2020 1:06 am

This example is possibly better, because it is closer to yours. It is made with Part workbench, where this two length chamfer is available since long time. Consider these three edges to be chamfered with 1mm/2mm:
Snip macro screenshot-73c404.png
Snip macro screenshot-73c404.png (2.86 KiB) Viewed 198 times
These two possibilities are chamfered as you would expect it:
Snip macro screenshot-f1d2c1.png
Snip macro screenshot-f1d2c1.png (3.42 KiB) Viewed 198 times
Snip macro screenshot-a01d49.png
Snip macro screenshot-a01d49.png (3.38 KiB) Viewed 198 times
But this one isn't:
Snip macro screenshot-bb8389.png
Snip macro screenshot-bb8389.png (3.07 KiB) Viewed 198 times
If we agree that the same edge should always be chamfered in the same way, so we always have one possibility where long and short ends don't match.