Trigonometry In G-Code?

I am interested in creating cone-shaped pockets which match the BT30 taper. I would be performing this in aluminum, but this would also apply to wood and plastic (I’m sticking to materials which are softer than the BT30 material). I do not have expensive programs for the CAM part, but I have a long history of programming things like SVG, PostScript drivers and controllers, so on (things which are typically more advanced than g-code, but often only 2D).

My actual CAD program is FreeCAD. My g-code knowledge is very limited, but I’m trying to learn. I don’t want to waste months though on something not supported, so I’m asking the people here (in the context of a 770MX) what are my options for:

  • Trigonometry like sine, cosine, and tangent in a g-code macro.
  • Any kind of free CAM tool which FreeCAD can work with.

Any advice?

Thanks!

How are you planning to cut the cone itself in terms of cutters and cutting strategies?

Rough cut could be a square end mill, but a ball nose would be used for any final cut. I really don’t know of any other possibility (it looks like the 4th axis won’t be useful; one would need 5-axis to really “do this right”). But that is part of the question: How would it be possible with 3-axis? My thought was a loop with a macro cutting a circular pattern using trigonometry to name the diameter over successive small Z-axis plunges.

I am new at this.

You could always try modeling it and then letting the software output the code. The people who wrote the equations that translate the design to the path the cutter runs are akin to a hundred Einsteins. These are people that have advanced physics degrees combined with decades if not generational machining experience. I don’t understand why you want to reinvent how to make a wheel when there are a hundred known and documented ways to make a wheel of every conceivable material.
If you want to understand the ma to there are volumes of information available. If you want to cut a bt30 taper model it and run the output. Then hone it with a bt30 taper cutter or bore it out on a lathe.
Don’t waste your time on a problem that has multiple solutions when there are a thousand other problems waiting to be solved.

You could use some G03’s to step down and taper, but it’s going to be an approximation-- fine for static tool holders or something (FWIW I made my BT30 trays with straight holes just over the max taper OD and the tool rests on the flange-- that also keeps gunk from collecting on the important bit of the taper).

I don’t think G-code has trig functions per-se, but “X taper per Y distance” is very common for tapers and the circular/helical functions can do the rest.

A tilting or off-square 4th would do well, but not so much otherwise I think.

Here’s a PM thread that might help. CNC Machining | Circular milling a tapered hole | Practical Machinist - Largest Manufacturing Technology Forum on the Web

Referencing one of the comments above, gcode definitely has trig functions available. Just an FYI.

As far as the problem at hand, this sounds like a great project for mill-turning. Your material is mounted in the spindle.

This can be designed and programmed in the free version of Fusion

While the basics of GCode are universal, there are a great many functions and features that are machine specific. In the case of PathPilot, trig functions are available. Check out this page for more details direct from Tormach on how to use them. Bear in mind that the code should work fine on any Tormach mill but could very well not work on other machines (i realize that is beyond the scope of your question but it bears mentioning)

1 Like