Tapered Profile

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Joneb
Posts: 66
Joined: Tue Aug 11, 2020 10:35 am

Tapered Profile

Post by Joneb »

Good Afternoon,
Im trying to machine the outside of a truncated cone I though using the path profile would do the job but it only seems to do verticle sides can it be done in path. The actual job is 250mm diameter disc with stock of the correct thickness so I dont want to machine the top.

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.24693 (Git)
Build type: Release
Branch: master
Hash: e01f0d25d5f3ef9ceb66aa087212121e9f2f2e8b
Python version: 3.8.8
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United Kingdom (en_GB)
test.FCStd
(25.84 KiB) Downloaded 37 times
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Tapered Profile

Post by Russ4262 »

Afternoon.
3D Surface with Offset cut pattern, 10% stepover, and 0.5mm sample interval.

File too large to attach and I don't have time to link at the moment.

Cheers,
Russell

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
Snip macro screenshot-8fdbe7.png
Snip macro screenshot-8fdbe7.png (176.56 KiB) Viewed 2072 times
Last edited by Russ4262 on Mon Apr 19, 2021 9:30 pm, edited 1 time in total.
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Tapered Profile

Post by RatonLaveur »

Hi Russ, one aspect of the offset method is it isn't always sequential. Depending on the stepover sometimes it will skip a pattern and get back to it later in the path. That is super bad for cutters.

Have you also been struggling with that?
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Tapered Profile

Post by Russ4262 »

RatonLaveur wrote: Mon Apr 19, 2021 7:16 pm Hi Russ, one aspect of the offset method is it isn't always sequential. Depending on the stepover sometimes it will skip a pattern and get back to it later in the path. That is super bad for cutters.

Have you also been struggling with that?
Afternoon sir.
Simply put, yes, but not with 3D Surface. The cut pattern generation in 3D Surface is an independent python class just for that op and perhaps the lesser used Waterline. I have had no issues with 3D Surface cut patterns that I recall :? - but there might be some that exist.

However, the cut pattern generation that most other ops in Path WB use are generated via Path.Area() and it has some long-standing bugs in the linking stages. For that reason I say yes, because a number of the cut patterns available in MillFace, PocketShape, and 3D Pocket have common inconsistencies. These ops use Path.Area() for path generation, which is much quicker because it is C++ source (I believe... :? ), among other superiorities. Unfortunately, that puts these path linking bugs out of reach of some of our code contributors, like myself, that have little or no C++ experience/knowledge.

Good news is that I have started yet another project and associated branch to incorporate an alternative path generation class - this one based off the same class used in 3D Surface. Initial results are positive, but it needs some linking improvements because of the different interpretation of the path geometry compared to 3D Surface's needs. I have not had time to start fixing the linking issues yet. Too many projects going. My wife says I am mildly ADHD. Did I mention she is rarely incorrect? God bless my wife! This alternative path generation class is currently activated by default in my branch, but the current Path.Area() is used if the requested cut pattern does not exist within the alternative version. So, the Triangle and Grid patterns are still provided to the user by the current method, but most others are being generated by the alternative class (with some linking errors at the moment). Being python based, it would make it a bit easier for more of our members to access and maintain. But, it is still a draft and not ready for public scrutiny yet - not until I correct some of the path linking issues. Otherwise I hope it will allow for more cut patterns to be added if a user so desires. For fun, I would like to make a wave pattern (sine or cosine based), or perhaps a smiley-face pattern. haha!

A benefit of this alternative on which I am working is that it will allow for layer-level access. So, you could rotate layers by a given angle. Also, this alternative might be useful for providing REST milling data. This alternative should also provide consistent cut direction performance. Another distant goal is to use this alternative to allow for tool paths other than endmills.

Anyhow, I am dreaming again.

Glad to have you on board. Thanks for the feedback. Have a great week.

Russell

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Last edited by Russ4262 on Mon Apr 19, 2021 9:29 pm, edited 1 time in total.
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Tapered Profile

Post by Russ4262 »

Joneb wrote: Mon Apr 19, 2021 3:51 pm Good Afternoon,
Im trying to machine the outside of a truncated cone I though using the path profile would do the job but it only seems to do verticle sides can it be done in path. The actual job is 250mm diameter disc with stock of the correct thickness so I dont want to machine the top. ...
Good afternoon.
You may also find 3D Pocket of use in your particular situation. In the second image is 3D Pocket with 100% stepover and a -4.5mm Pass Extension with 2.0mm step down - selection is only the sloped conical face without the top circle.

As seen in the first image, adding the top circle to the selection causes bad patterns to be generated with the same exact settings. Not sure what is happening here, but it is not usable.

I did not run either of these 3D Pocket ops through the simulator to check for inconsistencies in cut order or direction.

Have a great day.
Russell

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
Attachments
Snip macro screenshot-0b3640.png
Snip macro screenshot-0b3640.png (132.88 KiB) Viewed 2013 times
Snip macro screenshot-49ac02.png
Snip macro screenshot-49ac02.png (169.69 KiB) Viewed 2013 times
Joneb
Posts: 66
Joined: Tue Aug 11, 2020 10:35 am

Re: Tapered Profile

Post by Joneb »

Thankyou Russell for your help your solutions worked on the model I provided which I thought illustrated the problem but I cant make it work on what I am trying to do although I select the side face 3d surface and pocket just provide paths on the top surface. I'm trying to make a mould for a cowl for a model aircraft and because of machine restrictions I'm cutting discs from 18.3 mm ply the holes are for location and the centre hole for fixing down to machine.
CowlCutBottomPaths2.FCStd
(120.31 KiB) Downloaded 37 times
Path produced using 3d surface
Path produced using 3d surface
3d Surface.PNG (182.35 KiB) Viewed 1966 times
CowlCutBottom.FCStd
Cowl bottom Half split
(79.71 KiB) Downloaded 38 times
CowlCutBottomPaths2.FCStd
(120.31 KiB) Downloaded 37 times
Attachments
CowlMaster.FCStd
Complete Cowl
(33.86 KiB) Downloaded 37 times
Joneb
Posts: 66
Joined: Tue Aug 11, 2020 10:35 am

Re: Tapered Profile

Post by Joneb »

Good Afternoon Russell. I've got the 3d surface to cut the edge but it just cuts straight the same as when I used profile, what am I doing wrong.
Test.PNG
Test.PNG (115.7 KiB) Viewed 1912 times
CowlCutBottomPaths2.FCStd
(120.31 KiB) Downloaded 56 times
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: Tapered Profile

Post by Russ4262 »

Joneb wrote: Wed Apr 21, 2021 2:08 pm Good Afternoon Russell. I've got the 3d surface to cut the edge but it just cuts straight the same as when I used profile, what am I doing wrong.

Test.PNG

CowlCutBottomPaths2.FCStd
Afternoon sir.
Hmm. I understand the frustration. FreeCAD is not as consistent as we users would like it to be. Devs are working on that, one release cycle at a time with great feedback from users like you. :)

In the mean while, let´s take a look at this situation and note a couple of things.

1. 3D Surface, while looking like just another op in Path WB is really quite different on the backend from say PocketShape or Profile. It generates paths in a unique manner comparatively.

2. The 3D Surface op meshes the solid (converting all the faces of the solid to a set of (potentially) thousands upon thousands of triangles in order to simplify the geometrical calculations for generating the paths. This conversion is based upon some settings available to the user and collectively affect the resolution, and to a great degree, the smoothness of curves of the mesh, and furthermore, the paths based thereupon. This op has two such settings exposed to the user: Angular Deflection and Linear Deflection. The two directly affect the creation of the mesh.

3. Once we have a mesh in place, we can begin extracting path data. Resolution is the name of the game here. Achieving an acceptable resolution depends on a few settings: Sample Interval, Step Over, Step Down, Cut Pattern, and toolbit shape. The Sample Interval is the distance(spacing) interval at which the mesh is probed for a contact point (a Z value returned at the (X, Y) sample input point) along the specified Cut Pattern. The Step Down and Step Over values work collaboratively for clearing 3D surfaces. For example, on your near vertical face, we need both a very small Step Over value and very small Step Down value in order to have a high clearing resolution and smoother final product (knowing even with a ball end cutter we will have some small waves or ripples on the final surface).

4. The operation needs geometrical boundaries as viewed from above - projections of the selected faces to be surfaced. In your case here, the vertical projection is a very thin donut shape. We need to allow the cutter access to regions beyond the physical thin "donut" projection so the cutter can physically access the face with full cutter engagement. Let's tell 3D Surface how to allow this... The 3D Surface op has some settings to allow the user to refine/modify this geometrical selection that is based upon physical geometry identified in the Base Geometry tab of the Task Panel. These refinement settings are not in the Task Panel, but found in the Data tab of the Properties view once you have created the operation and it exists in the object tree. We need to modify the raw Base Geometry input by using these refinement settings. To access them, select the 3D Surface operation in the object tree, then look for the Properties section labeled, "Selected Geometry Settings."
* The Boundary Adjusment modifies the exterior boundary.
* The Boundary Enforcement forces the cutter to stay within the geometrical boundaries, behaving like a pocket operation. Not what we want here.
* The Internal Features Adjustment modifies the internal boundary(s).
In your case here, we need to allow the cutter to move beyond both the external and internal boundaries of the thin "donut" provided by the raw Base Geometry. To allow the cutter access beyond the external boundary, change the Boundary Enforcement to False, OR you can make the Boundary Adjustment a postive 5.0mm (cutter radius) - either will do the trick. Also change the Internal Feature Adjustment to positive 5.0mm (cutter radius) to make the clearing region larger (push inward), to allow the cutter access on the inside of the boundary.

5. As you have/will learn, Cut Pattern matters. Since you are dealing with a circular/conical shaped cut region, I recommend the Circular or Offset based cut patterns. The Profile Edges feature is for generating a 3D profile/contour path only (a single width cut around the perimeter) - not what we want here. For the circular and spiral-based cut patterns, you can specify the center of the pattern. I suggest doing a Circular Cut Pattern and changing the Pattern Center At property to CenterOfBoundBox, or Custom and providing the center point of your conical face manually.

6. Your interaction here in the forum has raised attention to the need for a bug fix here in 3D Surface. Unfortunately the GUI Task Panel input for the Step Over is limited to integers, but internally is defined as a float. The GUI input needs to be fixed such that it will allow floats and values less than 1.0 because with your 10 mm cutter, we need the ability to require say a 0.5 or 0.1 % step over to compensate for the larger diameter cutter that is perfectly capable of being used here. So, I will see if I can get this minor feature improvement converted to a PR in the near future.

7. Full disclosure: I did modify the 3D Surface code on my machine, specifically the Step Over value by a factor 0.1 to allow for a smaller step over than allowable in the current 0.19 release. This is because, as stated in #6 above, the user is not able to enter floats OR values below 1 in the current 0.19 release. This modification allowed for a 0.5 % Step Over rather than the 5 % seen in the screen shot. Also, the processing time on the machine (4 core modern i5 Intel, 8GB RAM and SSD) I used for this demonstration is about nine minutes. The first image below is with the Step Over restored to a true 5 % with all other settings the same and only took 43 seconds to compute - this is a nice visualization. The second and third are with a 0.5% Step Over using the modified code.

8. Because 3D Surface compute times are often long, I recommend creating a simple 3D Surface op with the desired Base Geometry and leaving Sample Interval, Step Down, and Step Over as large values to minimize compute time, but allow for a rough visualization. Once you like the general path shape and boundaries, select the op in the object tree, toggle it Inactive, then change all these resolution parameters to the small desirable values, toggle the op to Active and let'r rip(compute...)!


Indeed, 3D Surface is capable of cutting your part.
Have a great day, sir.

Russell
Attachments
True 5% step over
True 5% step over
Snip macro screenshot-388025.png (134.7 KiB) Viewed 1864 times
Effective step over is 0.5% due to code modification
Effective step over is 0.5% due to code modification
Snip macro screenshot-f784d8.png (123.67 KiB) Viewed 1864 times
Effective step over is 0.5% due to code modification
Effective step over is 0.5% due to code modification
Snip macro screenshot-8e2889.png (141.57 KiB) Viewed 1864 times
Joneb
Posts: 66
Joined: Tue Aug 11, 2020 10:35 am

Re: Tapered Profile

Post by Joneb »

Thankyou so much for the effort you have put into my problem. I know that Freecad 3d surface will generate the code for the top part of the job easily and acurately and as I'm having to use 18mm slices I will use 3d surface to do as many slices as posible and then write my own Gcode for the remainder being circular is fairly easy. When I have the job completed it I will go back and try to get it all done in Freecad for my own satisfaction.
Thankyou again Russell for all your help and have a great weekend
Joneb
Posts: 66
Joined: Tue Aug 11, 2020 10:35 am

Re: Tapered Profile

Post by Joneb »

Good Afternoon I'm still having problems with this 3d surface for the top of this job, I thought this would be the easy part of machineing this cowl but I am trying to avoid cutting the boss in the middle, this is because that is how I have it fixed to the table with a bolt through the center. I have only face 1 and 8 selected but freecad insists on machining face 10, the boss, even though the boss is higher than the start depth.
CowlTopSlice.PNG
CowlTopSlice.PNG (120.33 KiB) Viewed 1727 times
CowlTop Slice.FCStd
(70.93 KiB) Downloaded 38 times
Post Reply