Function like Fillet/Chamfer for Undercuts

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
eajmarceau
Posts: 73
Joined: Tue Feb 22, 2022 9:16 pm

Function like Fillet/Chamfer for Undercuts

Post by eajmarceau »

I'm trying to find a function to perform an edge feature, similar to fillet or chamfer, but which does an undercut instead. Undercuts are a common design feature when a turned surface is intended to be a positioning surface for assemblies, to ensure faces are flush and no interference from leftover material from tool tip radius on cutting inserts.

Attached is the part model, where the feature "Chamfer" was created (somewhat white in this image),
Shaft with chamfer instead of undercut
Shaft with chamfer instead of undercut
BliskRotor__ShaftFront_3D.png (74.28 KiB) Viewed 531 times
but which should be replaced by the undercut (indicated in black on this blowup of the sketch).
Intended location for the undercut
Intended location for the undercut
BliskRotor__ShaftFront_Sketch_MarkedUp.png (5.65 KiB) Viewed 531 times
I noticed that the chamfer function allows the possibility of specifying 2 values. I would be looking for the "Undercut" function to allow specifying (1) the depth from the face to the bottom of the arc, and (2) the angle of the tangential undercut from the central axis (standard options of 60 degrees or 45 degrees).

I didn't think it would be necessary to specify that as part of the sketch for the revolved section.

Can anyone point me to where I could find that undercut function?
Attachments
TestPart_Blisk_01.FCStd
(73.21 KiB) Downloaded 7 times
chrisb
Veteran
Posts: 43125
Joined: Tue Mar 17, 2015 9:14 am

Re: Function like Fillet/Chamfer for Undercuts

Post by chrisb »

There is no dedicated undercut feature or dressup. In this case you have to make a Groove or include it in the sketch - similar to what would be done when creating it on a lathe.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
papyblaise
Veteran
Posts: 4685
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Function like Fillet/Chamfer for Undercuts

Post by papyblaise »

In the sketch of the profile you include the negative angle
Attachments
congé.FCStd
(18.36 KiB) Downloaded 6 times
cougé.JPG
cougé.JPG (14.04 KiB) Viewed 484 times
eajmarceau
Posts: 73
Joined: Tue Feb 22, 2022 9:16 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by eajmarceau »

Trying to take a stab at "retrofitting" the PartDesign Chamfer code to offer the additional option for Undercuts.

I located "TaskChamferParameters.cpp".

That led me to "FeatureChamfer.cpp".

This last identified the need for "mkChamfer.AddDA" ... which I cannot find.

I searched all FreeCAD projects on GitHub repository, but I am unable to locate the reference to that class/function's source code.

I even checked using https://dev.opencascade.org/search to see if that was an OCCT class/function but it did not identify any relevant files.

Changes that I planned to make are high-lighted in the attached with the string "##EAJM".

Can you please indicate where I could find that?
[Edit] ...
After further digging, I found reference to "BRepFilletAPI_MakeChamfer.hxx" in "PreCompiled.h".

But that is pointing to another reference "OpenCascadeAll.h", which presumably implies "OpenCascadeAll.cpp", but I cannot locate the actual code for either those, under the FreeCAD repositories on GitHub.

If that is OCCT code, I would have expected that FreeCAD would have its own image of that code (at least as a failsafe if OCCT disappeared), although with restricted access, so that the community would have visibility of, and be working from, the same non-FreeCAD reference base code, while allowing community members to offer ideas/suggestions on coding tweaks, while allowing the gurus to control the sanity and implementation of those tweaks on a FreeCAD-custom extension to OCCT, which could then be fed upstream to OCCT for consideration in their core code (a bit like Ubuntu managing its image relative to the Debian distro). That might allow FreeCAD to move ahead on things even when OCCT is refusing to incorporate those but, at the same time, keeping those changes distinct from the base FreeCAD code to hightlight that they belong elsewhere. Just a thought.
eajmarceau
Posts: 73
Joined: Tue Feb 22, 2022 9:16 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by eajmarceau »

Thank you for responding, chrisb.
chrisb wrote: Fri May 20, 2022 5:41 am ... In this case you have to make a Groove ... (snip)
I acknowledge the power and flexibility of Groove, since it uses a task-specific sketch. I also looked at trying to identify the sketch constraints that I have to "suspend", in order to modify the existing sketch.

Incorporating a tweak in the Chamfer function seems more logical, because that would have removed the tedium and complexity of creating a sketch, replacing that with a selection of a profile "cases" with associated parameters. That would have been more in line with what I was expecting from a standpoint of intuitive GUI and ease of functionality.

Code: Select all

OS: Ubuntu 20.04.4 LTS (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.28611 (Git) AppImage
Build type: Release
Branch: (HEAD detached at a3b804e)
Hash: a3b804e7806c2b3b5e1228c41bca4569a743b400
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/Canada (en_CA)
Installed mods: 
  * workfeature
  * Curves 0.3.0
  * offline-documentation 1.0.0-alpha
  * workfeature-macro
  * Pyramids-and-Polyhedrons
Last edited by eajmarceau on Sat May 21, 2022 11:46 pm, edited 1 time in total.
drmacro
Veteran
Posts: 5769
Joined: Sun Mar 02, 2014 4:35 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by drmacro »

eajmarceau wrote: Sat May 21, 2022 9:57 pm
chrisb wrote: Fri May 20, 2022 5:41 am ... In this case you have to make a Groove ... (snip)
I acknowledge the power and flexibility of Groove, since it uses a task-specific sketch. I also looked at trying to identify the sketch constraints that I have to "suspend", in order to modify the existing sketch.

Incorporating a tweak in the Chamfer function seems more logical, because that would have removed the tedium and complexity of creating a sketch, replacing that with a selection of a profile "cases" with associated parameters. That would have been more in line with what I was expecting from a standpoint of intuitive GUI and ease of functionality.

Code: Select all

OS: Ubuntu 20.04.4 LTS (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.28611 (Git) AppImage
Build type: Release
Branch: (HEAD detached at a3b804e)
Hash: a3b804e7806c2b3b5e1228c41bca4569a743b400
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/Canada (en_CA)
Installed mods: 
  * workfeature
  * Curves 0.3.0
  * offline-documentation 1.0.0-alpha
  * workfeature-macro
  * Pyramids-and-Polyhedrons
Actually adding the dressup things like the under cut is best done in the sketch.

So, until OCCT fixes fillets and chamfers doing it in the sketch is a better option...
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."

My beginners, written treatise: Learning FreeCAD
eajmarceau
Posts: 73
Joined: Tue Feb 22, 2022 9:16 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by eajmarceau »

Thank you for responding, drmacro.
drmacro wrote: Sat May 21, 2022 10:34 pm Actually adding the dressup things like the under cut is best done in the sketch.
I will partly acknowledge that undercuts should be included in a sketch of the cross-section of a part. If a particular undercut/chamfer/fillet is standard practice on a given section of a family of parts, including those on the sketch is admittedly the thing to do, when doing the initial sketch, when incorporating those features without issues of removing/adding constraints don't interfere with the "sketching" process.

However, attempting to modify a sketch that has been deemed good for doing revolve/extrude, after the solid has been generated, the task is not so simple. A simpler approach is desirable. A tweak on the Chamber tool would be the ideal approach in the post-solid scenario.
drmacro wrote: Sat May 21, 2022 10:34 pm So, until OCCT fixes fillets and chamfers doing it in the sketch is a better option...
I don't think that "better" is the word that applies. Instead, "forced" option is a better characterization, because it is the only way to achieve the goal, without modifying the OCCT code. Hence my suggestion of a FreeCAD-captive image of the OCCT for tackling such things which OCCT deems "undeserving" or "inappropriate" in their eyes.
drmacro
Veteran
Posts: 5769
Joined: Sun Mar 02, 2014 4:35 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by drmacro »

eajmarceau wrote: Sat May 21, 2022 11:00 pm ...
If it is problematic to modify the sketch, the sketch is likely over complicated. Simple, minimalist sketches are easier to read, maintain, and modify (and constrain properly) . In fact, I'd put the undercut in a separate sketch.

FreeCAD barely has enough devs to handle FreeCAD, so doing a fork of OCCT is unlikel, I'd guess.

As I understand, OCCT doesn't consider it underserved or inappropriate. They see it as a major refactor of nontrivial code that is not currently on their radar.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."

My beginners, written treatise: Learning FreeCAD
eajmarceau
Posts: 73
Joined: Tue Feb 22, 2022 9:16 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by eajmarceau »

Thank you for responding, drmacro.
drmacro wrote: Sat May 21, 2022 11:34 pm They see it as a major refactor of nontrivial code that is not currently on their radar.
Your response suggest you have much awareness with the OCCT development activities. Would you not say that their prioritizing of such a request is skewed because they are focusing efforts on the development of for-profit products built on top of the Open-Source OCCT? Does that activity not suggest a possible motivation to keep any tweaks of the code such as I have suggested within their own "offline-image" used for those for-profit products ... and to use that as a way to pursuade others to migrate to their $$$ tools because they have "the fix" that is not being shared?
adrianinsaval
Veteran
Posts: 2680
Joined: Thu Apr 05, 2018 5:15 pm

Re: Function like Fillet/Chamfer for Undercuts

Post by adrianinsaval »

they are definitively prioritizing monetization as any corporation has to do, but they don't provide anything that would fix this issue so I don't see how that would be the case, besides I don't see how they would provide filleting capabilities without doing it in the kernel, which is open source...
Then about suggesting that freecad makes it's own version of occt, well who0s going to do that? geometric kernel development is not a trivial task, we hardly have enough people to develop freecad were are we going to get people to fork occ and these type of things? that being said, there is one repo with a version of occt that has some patches that fixes some issues for freecad and it's used for some of the official freecad packages, that repo is at gitlab.com/blobfish/occt but note that it only contains small patches, nobody is currently planning to do any serious work on refactoring fillets.
Also note that in the past there was an "community edition" fork of opencascade that had some code contributed by the community but that they didn't want to sign occ's CLA but this project was eventually abandoned (AFAIK) since they didn't have enough manpower to keep up with the official version.

From what I heard around here, their customers aren't pressing that much for fillet fixes, and us non-customers requests won't matter much to directives.
Post Reply