Looks like a great start. Feel free to push a draft PR when ready so you can get early feedbacks.
Unexpected Chamfer behaviour when face selected
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Unexpected Chamfer behaviour when face selected
Draft Pull Request created, appreciate any feedback.
https://github.com/FreeCAD/FreeCAD/pull/5029
Tested the change against a number of different shapes, alphabet letters, selection orders etc.
So far it has performed as I expected or the issues that I did see seem to be related to the underlying chamfer function itself.
(similar issues happen using an unmodified 0.19.2)
https://github.com/FreeCAD/FreeCAD/pull/5029
Tested the change against a number of different shapes, alphabet letters, selection orders etc.
So far it has performed as I expected or the issues that I did see seem to be related to the underlying chamfer function itself.
(similar issues happen using an unmodified 0.19.2)
Re: Unexpected Chamfer behaviour when face selected
I had a quick look and this looks pretty fine to me. We'll try to have a deeper look at it later.troyp76 wrote: ↑Tue Sep 14, 2021 2:47 pm Draft Pull Request created, appreciate any feedback.
https://github.com/FreeCAD/FreeCAD/pull/5029
As we now have C++11 as a minimum requirement, could you use range-for loops in the code to make it easier to read ?
Re: Unexpected Chamfer behaviour when face selected
A new PR with clean commit history has been submitted.
https://github.com/FreeCAD/FreeCAD/pull/5039
The following picture shows further testing by selecting only the top faces of the letters/numbers and then applying a distance angle chamfer.
It demonstrates that the changes work as expected over a range of face geometries.
Test file can be found here:
https://github.com/troyp76/FreeCAD_test ... %20Chamfer
https://github.com/FreeCAD/FreeCAD/pull/5039
The following picture shows further testing by selecting only the top faces of the letters/numbers and then applying a distance angle chamfer.
It demonstrates that the changes work as expected over a range of face geometries.
Test file can be found here:
https://github.com/troyp76/FreeCAD_test ... %20Chamfer
Re: Inconsistent Chamfer behaviour when face selected
@GeneFC, do you have time to test this PR? I tried it on some strange U shapes with random holes in them and that sort of thing, but maybe you can come up with some more edge cases that it might break.
Re: Unexpected Chamfer behaviour when face selected
I compiled and tested the new chamfer stuff. Seems to work fine.
Ironically when I was comparing to the existing version I discovered an error I had not seen previously. When I made a simple block with a hole though a face, but with the hole not touching any edges, I saw an angle-flipping error. Three sides of the face chamfered one way and the fourth side chamfered the opposite. I expected and saw that sort of error for a u-shaped cutout.
I saw similar sorts of quirks with the Chamfertest.FCStd file, but I did not see any problems with the Alphabet file.
Again, I saw zero problems with the new version.
Gene
Ironically when I was comparing to the existing version I discovered an error I had not seen previously. When I made a simple block with a hole though a face, but with the hole not touching any edges, I saw an angle-flipping error. Three sides of the face chamfered one way and the fourth side chamfered the opposite. I expected and saw that sort of error for a u-shaped cutout.
I saw similar sorts of quirks with the Chamfertest.FCStd file, but I did not see any problems with the Alphabet file.
Again, I saw zero problems with the new version.
Gene