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.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
armandas
Posts: 25
Joined: Thu Dec 12, 2013 9:08 pm

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

Post by armandas »

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
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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

Post by armandas »

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

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

Post by abdullah »

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
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

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

Post by abdullah »

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

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

Post by Kunda1 »

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.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

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

Post by uwestoehr »

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
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

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

Post by uwestoehr »

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 2013 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
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

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 2005 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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

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 2001 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 2001 times
Snip macro screenshot-a01d49.png
Snip macro screenshot-a01d49.png (3.38 KiB) Viewed 2001 times
But this one isn't:
Snip macro screenshot-bb8389.png
Snip macro screenshot-bb8389.png (3.07 KiB) Viewed 2001 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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply