Can We Talk CAM Programs?

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Your comment about attempting to use a 3D printer slicer to generate your tool paths leads me to beleive you are not satisfied with your CAD program. I think you should look around and find a CAD program that you can bend to your will.

I think that's essence of this whole thread. To be a pain in the *** about it, it's the CAM program that's the issue. I'm fine with my CAD program.

It is good to edit your own Gcode as you become familiar with the post processor and the codes used, but doesn't your CAD program allow you to create a profile, or contour operation where you specify the stepdown and it generates the whole toolpath without the need for copy and paste Gcode? When ever you have to get in there and hand edit a tool path there is an opportunity to make mistakes.

Nope. It has two options that are similar, waterline and contour. Waterline allows me to set a step vertically and (I thought) a keep out horizontally. It turns out it uses the keep out distance vertically as well as horizontally. With this conn rod lying down like it is, I set the top of the part to Z=0 and cut everything going in more negative numbers. That part is configurable, I could have made the bottom Z=0, but I guess I'm used to this. What that keep out does is create a file where the machine spends time cutting in air above the part.

Contour only makes one pass around the part, with no settings to change that. That file was what I edited in the text editor to create seven identical paths at multiples of 0.031 deep.

I'm spending most of my time sitting here, not in the shop, trying to convince the CAM program (DeskProto) to do what I want it to do. I find I had to play with all sorts of things to get it to do what I wanted for the two files I ran on the rough cuts pictured in the last post. Same for the two files I just ran today.

Secondly, I have found it best to avoid plunging the cutter into the part. You are only stepping down .031" I think you said, so this would not be an issue. but you do have the opportunity to enter the cut from either the right or the left.

Somewhere in my reading, I had come across the idea that as long as we cut a slot with a depth less than the cutter width, it was more than likely to be OK. But snipping a bit...

... As the tool is cutting the slot it is making a conventional cut on one side of the slot and a climb mill on the other. The tool will be pulled to the side of the slot that the flute is advancing into (conventional milling) and pushed away from the other side (climb milling). The tool will have a tendency to bounce back and forth, the amount depending upon your system's rigidity.....

I think I observed a problem that this explains. On the second to last pass of the rough contour pass (supposed to leave 0.031 extra all around the part) I started to notice a strange sound like some sort of resonance and I could see and feel the mill shaking. About halfway into the pass, the motor on the spindle shut down. As in completely off, with the LED RPM indicators off. I shut down Mach3 and the controller and made sure nothing bad had happened, then went to look at the motor controller. A fuse holder had been vibrated loose enough for the circuit to open. The fuse was fine and screwing it back into the holder got the system working again.

With that said, the experiment here was "potting" the part in epoxy to get the second side done.

BothSidesCut.jpg


I used cutting oil instead of my Fogbuster for this contour path. A single cut around the part at 10 IPM, which took one minute. Next is to try to get the epoxy to break down in my toaster oven.

EDIT 7:33 PM (my time - Eastern US): I thought the epoxy worked but it's barely visible in this view that the epoxy pushed out of the top right corner. I haven't run the oven to break off the epoxy. That's something to do on the back porch tomorrow, rather than indoors in the shop which shares air with the house.

I used all the epoxy I had on hand for this - Gorilla Glue brand, 5-minute epoxy. I think this means I need to do the real part differently.
 
Last edited:
Sorry, I meant CAM, not CAD.

As long as the program cuts from top to bottom, it shouldn't matter where you set Z=0. For example, would it be easier to set Z=.25 at the top of the part given the part is .25" tall?

I have used the epoxy potting technique to good effect.

I feel for you. Learning a CAM program shouldn't be this difficult. Unfortunately if you switch to a new CAM program the learning curve starts over.
 
It looks like you are doing a slot cut, this is fine and when starting a machining operation and it can't be avoided, but be aware this is OK for a roughing pass only. As the tool is cutting the slot it is making a conventional cut on one side of the slot and a climb mill on the other. The tool will be pulled to the side of the slot that the flute is advancing into (conventional milling) and pushed away from the other side (climb milling). The tool will have a tendency to bounce back and forth, the amount depending upon your system's rigidity.

I believe this is much more of a problem if one uses a cutter with more than 2 flutes.

2-flute end-mills are sometimes (it seems more frequently, on the European side of the pond?) known as "slot drills", because they cut slots more accurately to size than cutters with more flutes. (I'm not sure if that's universally true - 2-flute cutters with high helix rates seem unlikely to be much better than cutters with more flutes).
 
Is the CAM able to do a waterline with a setting to leave some stock, If so set it to do that so you get the depth increments. After that do a full depth contour with no stock allowance which will clean up the edge.

Though whether it is worth carrying on with this limited CAM is the real question, better to load something like F360 where even with the Contour you can set depth increments if needed and it will also do all but the last pass set slightly off finished size.

You can see a multi depth contour in this one which I opted for due to the depth. it starts about 1.33 into the video after the adaptive clearing. I have it set to do a 0.2mm and then 0.1mm pass at each level (8 then 4 thou)

 
Last edited:
Is the CAM able to do a waterline with a setting to leave some stock, If so set it to do that so you get the depth increments. After that do a full depth contour with no stock allowance which will clean up the edge.

Yes, it will leave some margin on all sides. The way it cuts air over the part (leaves the same amount of stock above Z=0) would make sense if I was cutting something other than bar stock. Can't think of an example, but something lumpy so that there was something up above zero to cut. I have yet to find a way to make it leave margin around the sides of the part (X and Y) but not above it (Z).

Your second sentence is exactly what I did. A full depth contour, in seven layers, then a cut over the top never getting closer than .031 to the final dimensions. Then I did the same to final size. It takes four Gcode files. No big deal.

1by1_contour_rough.png

Followed by
1by1_rough_small.png


Interesting work in that video. There's a period from about 40 to 60 seconds (0:40 to 1:00) where the cutter goes to the area between the two cylinders and cuts several passes, each deeper but shorter end to end than the previous pass. I'm not aware of any way to get DP to do that.

Is that the adaptive clearing?
 
The problem with waterline is it is really a 3D path so will look at the whole area to be machined hence you get the facing cuts of the upper surface which are not needed if your stock is already finished thickness but not a problem if you were starting with say 1/2" stock as you could take a 1/32" cleanup cut off the top and all edges will be perfectly perpendicular to it. You may be able to get it to miss the top cut by setting the height of cut to start just a thou or two below the top of the work. On some types of cut F360 just gives you the option to click on any faces you want to avoid or highlight inner and outer boundaries that the tool will cut within, this one is cutting as I type, tool set to finish cut the slightly sloping surface within the green boundaries

boundary.JPG


Yes the way it works into internal corners is part of the adaptive as it will only use a certain amount of cutter engagement per pass.

The other way is to just set a number of roughing passes on a full depth cut and then a final finish one. Downside to this over adaptive is there is a lot of air cutting as you can se on this simple cam

 
The last time I machined a cam was for my Webster, and that one has a fairly simple design. I wrote the G-code from scratch by modeling the part in CAD so I could find the ends of different curves. Probably easier to show. The white is the solid tube I started with, gold is the imported cam design, and the blue circles are the five different positions of a 3/8" end mill:

ThirdCam.jpg


The tool path is straightforward: straight line from position 1 to 2, clockwise circle from 2 to 3, then straight lines from 3 to 4 and 4 to 1.

For some reason I don't understand (but that I had read could happen) the Mach3 interpreter didn't understand my code to go from 2 to 3 in an arc and almost went straight across. After troubleshooting for a while, I thought I'd add that unnumbered position at the middle bottom, cutting the arc motion into two movements; from 2 to that spot and then from that one to 3. After that mod, the test cuts (air cuts) looked perfect and I cut this. I cut this in .031" thick slices, from top to bottom, making the entire file six copies of this with one modification (the first line goes .031 deeper each pass):

G01 X0.220 Y0.828
G01 Z-0.031 F2
G01 X0.427 Y0.476 F5
G02 X0.000 Y-0.188 R0.470
G02 X-0.427 Y0.476 R0.470
G01 X-0.220 Y0.828
G01 X0.220 Y0.828

The file I wrote on my own is 42 lines long. The file DeskProto made, which is entirely G1 steps from one point it chose along the side of the cam the next point it chose instead of G02 statements, was over 10 times as long.
 
When using the G02 code don't you need an I and J term specifying the center of the arc?

If I remember correctly (ha!) that's turned into the Radius term, the R=0.470. You can see the radius dimension on the drawing as well as where I had both I and J called out.

The center of the circle is a X=0.000 Y=0.281. The radius is to the center of tool path, which is 3/16" farther away than the edge of the cam.

Take the line G02 X0.000 Y-0.188 R0.470 That's saying to cut a clockwise arc from where you are now to X0.000 Y-0.188 with a radius of 0.470. "Where you are now" is the coordinates of the center of the cutter which are where we told it to go to in the previous line of code.

Likewise the next line G02 X-0.427 Y0.476 R0.470 is to go to those XY coordinates with the same radius.
 
I think that's essence of this whole thread. To be a pain in the *** about it, it's the CAM program that's the issue. I'm fine with my CAD program.



Nope. It has two options that are similar, waterline and contour. Waterline allows me to set a step vertically and (I thought) a keep out horizontally. It turns out it uses the keep out distance vertically as well as horizontally. With this conn rod lying down like it is, I set the top of the part to Z=0 and cut everything going in more negative numbers. That part is configurable, I could have made the bottom Z=0, but I guess I'm used to this. What that keep out does is create a file where the machine spends time cutting in air above the part.

Contour only makes one pass around the part, with no settings to change that. That file was what I edited in the text editor to create seven identical paths at multiples of 0.031 deep.

I'm spending most of my time sitting here, not in the shop, trying to convince the CAM program (DeskProto) to do what I want it to do. I find I had to play with all sorts of things to get it to do what I wanted for the two files I ran on the rough cuts pictured in the last post. Same for the two files I just ran today.



Somewhere in my reading, I had come across the idea that as long as we cut a slot with a depth less than the cutter width, it was more than likely to be OK. But snipping a bit...



I think I observed a problem that this explains. On the second to last pass of the rough contour pass (supposed to leave 0.031 extra all around the part) I started to notice a strange sound like some sort of resonance and I could see and feel the mill shaking. About halfway into the pass, the motor on the spindle shut down. As in completely off, with the LED RPM indicators off. I shut down Mach3 and the controller and made sure nothing bad had happened, then went to look at the motor controller. A fuse holder had been vibrated loose enough for the circuit to open. The fuse was fine and screwing it back into the holder got the system working again.

With that said, the experiment here was "potting" the part in epoxy to get the second side done.

View attachment 135906

I used cutting oil instead of my Fogbuster for this contour path. A single cut around the part at 10 IPM, which took one minute. Next is to try to get the epoxy to break down in my toaster oven.

EDIT 7:33 PM (my time - Eastern US): I thought the epoxy worked but it's barely visible in this view that the epoxy pushed out of the top right corner. I haven't run the oven to break off the epoxy. That's something to do on the back porch tomorrow, rather than indoors in the shop which shares air with the house.

I used all the epoxy I had on hand for this - Gorilla Glue brand, 5-minute epoxy. I think this means I need to do the real part differently.

Many years ago I had a graduate student do this as a means of easy fixturing for rapid (minimal knowledge) CNC machining. We used DeskProto as well. We used plaster of paris, instead of epoxy, and it worked well for machining on aluminum or plastic. We didn't try it on steel.

Carl
 
Can't thank you enough, Jason.

I had experimented with the function last night after my last post/comment. There's a big difference between the F360 and the DeskProto codes. For comparison, I want to post the code for one pass around the part that DP created. I tried to leave a .004 margin around the part. Yours is 44 lines long. Mine is 152. The difference is obvious.

1. G17 G20 G40 G49 G64 G90 G94
2. G0 X0.152 Y0.946 Z0.054
3. G1 Y0.946 Z-0.220 F2.0 S2000
4. G1 X0.167 Y0.892 F6.0
5. G1 X0.181 Y0.853
6. G1 X0.196 Y0.824
7. G1 X0.210 Y0.800
8. G1 X0.225 Y0.780
9. G1 X0.240 Y0.765
10. G1 X0.254 Y0.751
11. G1 X0.269 Y0.736
12. G1 X0.283 Y0.722
13. G1 X0.308 Y0.707
14. G1 X0.332 Y0.692
15. G1 X0.361 Y0.678
16. G1 X0.400 Y0.663
17. G1 X0.420 Y0.658
18. G1 X0.454 Y0.653
19. G1 X0.488 Y0.649
20. G1 X0.512
21. G1 X0.546 Y0.653
22. G1 X0.580 Y0.658
23. G1 X0.629 Y0.673
24. G1 X0.658 Y0.688
25. G1 X0.687 Y0.702
26. G1 X0.707 Y0.717
27. G1 X0.726 Y0.731
28. G1 X0.765 Y0.736
29. G1 X0.838 Y0.731
30. G1 X0.916 Y0.726
31. G1 X0.989 Y0.722
32. G1 X1.062 Y0.717
33. G1 X1.140 Y0.712
34. G1 X1.213 Y0.707
35. G1 X1.286 Y0.702
36. G1 X1.364 Y0.697
37. G1 X1.437 Y0.692
38. G1 X1.510 Y0.688
39. G1 X1.588 Y0.683
40. G1 X1.661 Y0.678
41. G1 X1.734 Y0.673
42. G1 X1.807 Y0.668
43. G1 X1.885 Y0.663
44. G1 X1.958 Y0.658
45. G1 X2.031 Y0.653
46. G1 X2.109 Y0.649
47. G1 X2.182 Y0.644
48. G1 X2.255 Y0.639
49. G1 X2.328 Y0.634
50. G1 X2.406 Y0.629
51. G1 X2.479 Y0.624
52. G1 X2.532 Y0.619
53. G1 X2.567 Y0.605
54. G1 X2.581 Y0.585
55. G1 X2.586 Y0.571
56. G1 X2.591 Y0.434
57. G1 X2.605 Y0.395
58. G1 X2.620 Y0.376
59. G1 X2.635 Y0.361
60. G1 X2.659 Y0.347
61. G1 X2.703 Y0.332
62. G1 X3.224
63. G1 X3.267 Y0.347
64. G1 X3.292 Y0.361
65. G1 X3.306 Y0.376
66. G1 X3.321 Y0.395
67. G1 X3.336 Y0.434
68. G1 X3.341 Y0.542
69. G1 X3.355 Y0.571
70. G1 X3.375 Y0.585
71. G1 X3.389 Y0.590
72. G1 X3.448 Y0.595
73. G1 X3.487 Y0.610
74. G1 X3.506 Y0.624
75. G1 X3.521 Y0.639
76. G1 X3.535 Y0.663
77. G1 X3.547 Y0.707
78. G1 Y1.296
79. G1 X3.535 Y1.340
80. G1 X3.521 Y1.364
81. G1 X3.506 Y1.379
82. G1 X3.487 Y1.393
83. G1 X3.448 Y1.408
84. G1 X3.379 Y1.413
85. G1 X3.355 Y1.427
86. G1 X3.341 Y1.457
87. G1 X3.336 Y1.569
88. G1 X3.321 Y1.608
89. G1 X3.306 Y1.627
90. G1 X3.292 Y1.642
91. G1 X3.267 Y1.656
92. G1 X3.224 Y1.666
93. G1 X2.907 Y1.666
94. G1 X2.688 Y1.661
95. G1 X2.649 Y1.647
96. G1 X2.630 Y1.632
97. G1 X2.615 Y1.617
98. G1 X2.601 Y1.593
99. G1 X2.591 Y1.564
100. G1 X2.586 Y1.427
101. G1 X2.571 Y1.398
102. G1 X2.552 Y1.384
103. G1 X2.542 Y1.379
104. G1 X2.498 Y1.374
105. G1 X2.420 Y1.369
106. G1 X2.347 Y1.364
107. G1 X2.274 Y1.359
108. G1 X2.201 Y1.354
109. G1 X2.124 Y1.350
110. G1 X2.051 Y1.345
111. G1 X1.977 Y1.340
112. G1 X1.904 Y1.335
113. G1 X1.827 Y1.330
114. G1 X1.754 Y1.325
115. G1 X1.681 Y1.320
116. G1 X1.608 Y1.316
117. G1 X1.530 Y1.311
118. G1 X1.457 Y1.306
119. G1 X1.384 Y1.301
120. G1 X1.306 Y1.296
121. G1 X1.233 Y1.291
122. G1 X1.160 Y1.286
123. G1 X1.082 Y1.281
124. G1 X1.009 Y1.277
125. G1 X0.931 Y1.272
126. G1 X0.858 Y1.267
127. G1 X0.785 Y1.262
128. G1 X0.736
129. G1 X0.717 Y1.277
130. G1 X0.697 Y1.291
131. G1 X0.673 Y1.306
132. G1 X0.644 Y1.320
133. G1 X0.600 Y1.335
134. G1 X0.537 Y1.350
135. G1 X0.464
136. G1 X0.400 Y1.335
137. G1 X0.356 Y1.320
138. G1 X0.327 Y1.306
139. G1 X0.303 Y1.291
140. G1 X0.283 Y1.277
141. G1 X0.264 Y1.262
142. G1 X0.249 Y1.247
143. G1 X0.235 Y1.233
144. G1 X0.220 Y1.213
145. G1 X0.206 Y1.194
146. G1 X0.191 Y1.169
147. G1 X0.176 Y1.135
148. G1 X0.162 Y1.092
149. G1 X0.152 Y1.053
150. G1 Y0.946
151. G0 Y0.946 Z0.054
152. M30

The difference is DP only steps in short G1 steps, while the F360 code does the G2, G3, I was saying I wanted it to do plus codes I've never heard of (G17, 18, 43, 54). If I was trying to write this code by hand, my knowledge isn't up to the task.

Still, these G1 steps might leave the part looking smoother because they step in both X and Y, which will invoke Mach3's Interpreter and those lines are going to be smoother than the ones where it suddenly stepped 0.0147 in Y. GWizard Editor shows it as smoother in the circles, too, but that won't affect the boss on the big end but I bet the F360 curves are smoother because of the G2 or G3 versus G1 steps.

I should try this.

I haven't used DeskProto for a while, but when I did use it, it didn't work off the actual geometry, it worked off an STL file. STL files are made of triangular facets, so every curve you can make on the part is a series of short line segments.

If DeskProto still works like it used to, it doesn't have to understand any CAD system's native geometry, so it can easily work with solids produced from any modeling system. But the price you pay is an inability to use the CAD geometry features for machining; you only get the STL features.

Carl
 
I'm getting to really hate my CAM program, DeskProto. I bought version 5.0 years ago and have been using it ever since. Earlier this year, I saw they had a free version of the SW available for hobbyists; currently version 7. The thing is, either the one I bought or the reduced feature free version 7 keep using the same old algorithms.

I could fill pages, but my annoyances come down to its general approach to creating tool paths. In every case I've tried I end up with smoother looking edges and better looking parts writing G-code by hand. Unfortunately, I need to take up a lot of space to explain the questions.

Let me start with the pretty simple part I've been working on, a piston connecting rod. Since it's from copyrighted plans, I'll present a picture with some dimensions stripped just to show what I'm talking about. View attachment 135731

It’s just circles, portions of circles, and straight lines. None of those "organic shapes" that modern designers seem to like, just geometry that Euclid would be at home with.

Every single dimension and the coordinates of every single point you need to know are in the file we supply the CAM program. The long tapered portion? Find the coordinates of the center of the pieces of arc at both ends, then one line of code to tell the G-code interpreter the start and end points gets you smooth lines. The way my CAM program does it is to approximate that line with short segments in pure X or pure Y movements. I can control the step over between tool paths but they never seem to be smooth enough. Instead of one line of code I get tons of lines (hundreds of lines? I never counted).

I wanted to emulate the approach I saw @Mayhugh1 use to make his tiny, two-sided parts in his Ford 300 build. I have ordinarily used one pass to machine something like this, but decided to do a rough and a fine pass. The rough pass was going to be .025 above the final geometry, and using a technique they call waterline cutting which is largely cutting away the excess material around the part. It's hard to see much in this view from DP, but this is the way it shows the tool paths.

View attachment 135732

There are hidden problems in this file, but I don't need to get too deeply into everything it does. The part that's genuinely stupid is that it cuts the paths top down in layers I control the thickness of, but it only does that within one cutter diameter of the part. It clears out the rest of the rough part by plunging the cutter to the full depth of cut (in this case, one half the part thickness or 0.219") all in one cut, and then goes sideways cutting 0.200 inches deep instead of 0.025. That totally negates any planned feed rate. Except that since the desired 0.219 isn't a multiple of 0.025, it stopped at the highest multiple, 0.200", eventually making the part the wrong size.

Let me add the fine pass.

View attachment 135733

Look along the center of the part, where in order to create the taper, it broke the nice, smooth taper into stair steps. Not just vertical lines; it won’t just drop the cutter straight down without moving X or Y while it moves Z. The same is true around the circles. It always moves the cutter in X while it’s lowering or raising it in Z. The step over between passes was .0147" so a little under 1/64”. The cutter diameter is 0.250, so that’s D/17. That seemed like a relatively fine step over to me. Running this cut took 1-1/2 hours. If I decreased the step over, that would increased the number of passes needed and that time would have to go up.

And the part is even uglier than the software shows.

View attachment 135734

Ignore the cutoff area closest to the camera – Mach3 barfed in some way I’ve not seen before. Maybe a power glitch. Yeah, the part would have been ruined, but not by the CAM software and this is a test/experimental part anyway.

I guess the question is does anybody's software recognize something like this as lines and circles and do a better job of generating smooth edges? I've written small pieces of G-code before, like to cut the circular cutouts in the side plates for the same engine. Likewise, I've done tapered sides by doing what I described before: find where to put the start and end points of the edge I want (including the effect of the radius of the cutter) and I know they come out smoother.

I'm still using Rhino3D rather than Fusion 360, or anything with CAM built in, so any software that would accept .STL or other common formats is a candidate to me, but I'd like to find a CAM package that doesn't make things so hideously ugly.
Bob:
I am by no means an expert in G-Code. The G code should progress from one point to another point. Looking at pictures it appears you have like a 100 defined points that should not be there. I would extract the G-code file command and inspect the points. On a straight line you should have only two points a start an endpoint. If extra points are there then you might have a corrupted G code generating file. If they are not there and the code is correct you most likely have a corrupted machine command issue. There are also simulators some of them free on the internet which can trace tool paths. The drawing software should only extract the points where things start and end. You put the code into the simulator and see what you get. If it replicates the pattern you will know its the software. If it gives you a good pattern look at the machine command level.

I would do this first before I went down a rabbit hole looking for better software.

The web sites are out there but I do not have an address for a free simulator. Maybe some of this forum knows the web site to use.

Take care
HMEL
 
I think we have already established that Deskproto used STL file so you will get many facets rather than a smooth curve depending on how you set the export of the STL file. This is Bobs Conrod as an STL and you can see the curves are made up of lots of short lines so that is one line of Gcode for each as a straight line cut, I have mine set finer than Bob used so the facets will be smaller but there will be a lot more lines of Gcode.

facets.JPG


The steps on the tapered part of the shaft were simply due to choosing a parallel finishing path and other programs will give the same stepped effect as I showed, this is fusion giving similar steps and nothing wrong with fusion. Only reason for slight differences between the two is the lead in and lead out.

1651127243357.png


So it's not a corrupt program just one that is a bit dated and limited in the way it works
 
For some reason I don't understand (but that I had read could happen) the Mach3 interpreter didn't understand my code to go from 2 to 3 in an arc and almost went straight across.
...
G02 X0.000 Y-0.188 R0.470


When using the G02 code don't you need an I and J term specifying the center of the arc?


If I remember correctly (ha!) that's turned into the Radius term, the R=0.470. You can see the radius dimension on the drawing as well as where I had both I and J called out.

The use of R instead of a specific center is why it went "almost straight across". R leaves the actual center ambiguous, and your interpreter chose the wrong one. It went on an R 0.470 curve around the center that's closer to the midpoint between 4 and 1.


By the way - I used Deskproto for a bit many, many years ago, and I don't recall having all of the issues that you're having with it. I didn't love it, but I don't recall it being petulantly unable to do basic contour milling/etc. I feel like there may be a post-processor, or milling strategy tweak somewhere in your configuration that is limiting it to G1 moves.

Your stairstepped X/Y moves were because of the selection of the parallel milling strategy. Have you tried (what's shown as) the "circular" strategy?
 
I think my big, dumb mistake was to use the straight line approach, especially in the long direction of the rod. Strictly my choice of the wrong approach and not DeskProto's fault. As it turns out, though, it's an OK approach for a rough cut followed by a contour cut.

There are things that DeskProto simply doesn't do, like the adaptive machining. They offer a hobbyist/educational price for their biggest program with the most features, but Fusion360 still looks better for CAM.

The key to using it for contour and waterline cuts is to trick it into doing things the way I want and not the way it wants. With waterline cuts, if I want it to clear out the area between the circular bosses, I have to check a box labelled, "Fill Horizontal Planes." When I click that, it wants to clear out a large area around the bottom of the part with a width that seems to be set by the size of the big end, and it wants to do it in one pass at full depth. But if I changed the Z depth it will turn that off. I don't always understand why.

For example, the second tool path in this post for the second side, where it cuts the circles on the end and clears out the stock in the middle. To keep the Waterline routine from clearing out the entire flat area at the bottom of like it did on the first side (last picture in the first post), I moved the bottom of the Z direction segment I was going to cut from 0.220" up to three .031" passes deep. I originally tried setting the depth to .075", between two and three passes, but it still wouldn't cut the flat area that's .062 deep. That makes no sense to me. I had to set the bottom to three passes (.093) to get it to cut the .062 deep area. Then it added one contour pass around the part, but didn't cut the large flat area around the part. Going back to DP to verify I'm getting this right, if I set the depth back 0.220 it still doesn't cut the large area around the part.
 
I think we have already established that Deskproto used STL file so you will get many facets rather than a smooth curve depending on how you set the export of the STL file. This is Bobs Conrod as an STL and you can see the curves are made up of lots of short lines so that is one line of Gcode for each as a straight line cut, I have mine set finer than Bob used so the facets will be smaller but there will be a lot more lines of Gcode.

View attachment 135939

The steps on the tapered part of the shaft were simply due to choosing a parallel finishing path and other programs will give the same stepped effect as I showed, this is fusion giving similar steps and nothing wrong with fusion. Only reason for slight differences between the two is the lead in and lead out.

View attachment 135940

So it's not a corrupt program just one that is a bit dated and limited in the way it works
Thanks for the feedback. I would not have thought it would begin at the drawing pallet. I would be tempted to write the G- code manually just get out the extraneous commands. However am a bit curious what program would correctly give a good code?
 
Can't thank you enough, Jason.

I had experimented with the function last night after my last post/comment. There's a big difference between the F360 and the DeskProto codes. For comparison, I want to post the code for one pass around the part that DP created. I tried to leave a .004 margin around the part. Yours is 44 lines long. Mine is 152. The difference is obvious.

1. G17 G20 G40 G49 G64 G90 G94
2. G0 X0.152 Y0.946 Z0.054
3. G1 Y0.946 Z-0.220 F2.0 S2000

150. G1 Y0.946
151. G0 Y0.946 Z0.054
152. M30

The difference is DP only steps in short G1 steps, while the F360 code does the G2, G3, I was saying I wanted it to do plus codes I've never heard of (G17, 18, 43, 54). If I was trying to write this code by hand, my knowledge isn't up to the task.

Still, these G1 steps might leave the part looking smoother because they step in both X and Y, which will invoke Mach3's Interpreter and those lines are going to be smoother than the ones where it suddenly stepped 0.0147 in Y. GWizard Editor shows it as smoother in the circles, too, but that won't affect the boss on the big end but I bet the F360 curves are smoother because of the G2 or G3 versus G1 steps.

I should try this.

I have not read through every post in this thread, so perhaps someone has already mentioned that using subroutines and variables can save you lots time and many, many lines of code. Also, If you didn't already know that G-code can use subroutines and variables, and you're like me in that you enjoy writing your own G-code, then read on.

Let me show you what I'm currently working on, as an example of using subs and variables: I'm milling out 5 reed valves in a circular pattern. The stock is 0.012" thick sheet steel. Because the stock is so thin, the metal sheet will be pulled up by the milling bit, so I'm keeping the cutting depth very shallow, at only 0.004". This pic shows the tool path generated by Mach3:

Reed valves.PNG


Below is the G-code. I like to comment most every line of code, so hopefully this program is fairly self explanatory, but basically the main program calls sub O42 which then calls sub O52 three times, at three successively deeper cuts resulting in one completely milled reed valve. Next, sub O42 calls sub O32 which makes 3 successively deeper cuts to mill out one circular hole. After the hole is completed, sub O42 rotates the XY plane 72 degrees in preparation to mill the next reed valve and hole. The main program calls sub O42 five times, resulting in all 5 reed valves being milled out.

BTW, don't try actually running this code as I'm still in the process of de-bugging it and I'm pretty sure I forgot to lift the mill bit out of the hole before I moved to the next reed valve.

% Title: Reed Valve Inlets
% Purpose: Mill 5 Reed Valves in a circular pattern
% End Mill = 0.039" diameter (0.0197" Radius)
% X0, Y0 = center of circle
% Z0 = top surface of stock
% Stock: 0.012" thick steel or aluminum sheet
%
G20 (set inches/minute mode)
G94 (set feed rate to inches/minute mode)
G01 (set linear mode)

#1 = 0 (declare & set variable #1; initial Z position)
#3 = 72.0 (set & increment degrees of rotation for next hole)
#4 = 4 (milling speed)
#5 = 0.004 (Milling Depth of each cut)
#6 = #3 (Incremental constant for rotation)

F44 Z[0.03 + #1] (move Z 0.030 above surface)
X-0.472 Y0.907 (move to starting reed at 12:00)
Z[0.005 + #1] (rapid drop to near surface)
F1 Z0 (slow drop to surface)

G68 A0 B0 R[0] (Reset Rotation of X Y Coordinate System)
M98 P42 Q5 (call sub O42 Q times)
G68 A0 B0 R[0] (Reset Rotation of X Y Coordinate System)
X-0.24 Y-0.863 (move to first hole near 6:00)

F64 Z0.2 (move Z up)

M30

% <<<<<<<<<<<<<<< milling operation is complete! >>>>>>>>>>>>>>>>

% <<<< Begin Subroutine >>>>

O42 (this sub rotates through 5 reeds & 5 outlet holes)
#1 = [#1 - #5] (calculate first pass cutting depth)
M98 P52 Q3 (call sub O52 Q times)
F22 G1 Z0.2 (move Z up before moving to next hole)
#1 = [0 - #5] (reset incremented variable to first pass cutting depth)
F33 X0 Y0.77 (move quickly to hole start)
Z[0.005 + #1] (rapid drop to near surface)
F1 G1 Z0 (slow drop to surface)
M98 P32 Q3 (call sub O32 Q times)
G1 F22 Z0.2 (move Z up)
G68 A0 B0 R[#3] (Rotate X Y Coordinate System #3 degrees)
#3 = [#3 + #6] (calculate rotation for next reed)

M99 (end of subroutine O42)

% <<<< Begin Subroutine >>>>

O52 (this sub mills one reed)
Z[0.005 + #1] (rapid drop to near surface)
F#4 (set feed rate)
X-0.237 Y1.074 Z#1 (mill to next hole while dropping to #1 depth)
G3 X-0.115 Y1.255 R0.3113 (mill arc)
G2 X0.362 Y1.348 R0.2677 (mill 1st half of hole cover section of reed)
G2 X0.119 Y0.926 R0.2677 (mill 2nd half of hole cover section of reed)
G3 X-0.093 Y0.871 R0.3113 (mill lower neck of reed)
G1 X-0.329 Y0.704 (mill lower neck of reed)
G1 X-0.314 Y0.683
G1 X-0.208 Y0.757
G2 X0.054 Y0.877 R0.2347 (mill clearance curve near pressure out hole)
G3 X0.411 Y1.383 R0.3273 (mill 1st half of large clearance curve)
G3 X-0.172 Y1.275 R0.3273 (mill 2nd half of large clearance curve)
G2 X-0.335 Y1.039 R0.4197 (mill top clearance neck)
G1 X-0.489 Y0.930 (mill top of clearance neck)
X-0.472 Y0.907 (mill to starting point)
#1 = [#1 - #5] (calculate next milling depth)
M99 (end of subroutine O42)

% <<<< Begin Subroutine >>>>

O32 (this sub mills one outlet hole)
F#4 (set feed rate)

G2 X0 Y0.528 R0.1213 Z#1 (mill right side of hole)
G2 X0 Y0.770 R0.1213 (mill left side of hole)
#1 = [#1 - #5] (calculate next milling depth)

M99 (end of subroutine O42)
 
Yikes !!! The forums software removed all the spaces in my code. Here's what the G-code should look like,...it's much easier to read with spaces between the code and the comments.

1651215655093.png
 
I teach, in part, a beginning CAD course at a local university. I have found a program called CAMotics very useful to simulate students code. It is a open sourse program and is totally free. You may like it to simulate your CAD code. Just Google "CAMotics".
 
I have not read through every post in this thread, so perhaps someone has already mentioned that using subroutines and variables can save you lots time and many, many lines of code. Also, If you didn't already know that G-code can use subroutines and variables, and you're like me in that you enjoy writing your own G-code, then read on.

Let me show you what I'm currently working on, as an example of using subs and variables: I'm milling out 5 reed valves in a circular pattern. The stock is 0.012" thick sheet steel. Because the stock is so thin, the metal sheet will be pulled up by the milling bit, so I'm keeping the cutting depth very shallow, at only 0.004". This pic shows the tool path generated by Mach3:

View attachment 135945

Below is the G-code. I like to comment most every line of code, so hopefully this program is fairly self explanatory, but basically the main program calls sub O42 which then calls sub O52 three times, at three successively deeper cuts resulting in one completely milled reed valve. Next, sub O42 calls sub O32 which makes 3 successively deeper cuts to mill out one circular hole. After the hole is completed, sub O42 rotates the XY plane 72 degrees in preparation to mill the next reed valve and hole. The main program calls sub O42 five times, resulting in all 5 reed valves being milled out.

BTW, don't try actually running this code as I'm still in the process of de-bugging it and I'm pretty sure I forgot to lift the mill bit out of the hole before I moved to the next reed valve.

% Title: Reed Valve Inlets
% Purpose: Mill 5 Reed Valves in a circular pattern
% End Mill = 0.039" diameter (0.0197" Radius)
% X0, Y0 = center of circle
% Z0 = top surface of stock
% Stock: 0.012" thick steel or aluminum sheet
%
G20 (set inches/minute mode)
G94 (set feed rate to inches/minute mode)
G01 (set linear mode)

#1 = 0 (declare & set variable #1; initial Z position)
#3 = 72.0 (set & increment degrees of rotation for next hole)
#4 = 4 (milling speed)
#5 = 0.004 (Milling Depth of each cut)
#6 = #3 (Incremental constant for rotation)

F44 Z[0.03 + #1] (move Z 0.030 above surface)
X-0.472 Y0.907 (move to starting reed at 12:00)
Z[0.005 + #1] (rapid drop to near surface)
F1 Z0 (slow drop to surface)

G68 A0 B0 R[0] (Reset Rotation of X Y Coordinate System)
M98 P42 Q5 (call sub O42 Q times)
G68 A0 B0 R[0] (Reset Rotation of X Y Coordinate System)
X-0.24 Y-0.863 (move to first hole near 6:00)

F64 Z0.2 (move Z up)

M30

% <<<<<<<<<<<<<<< milling operation is complete! >>>>>>>>>>>>>>>>

% <<<< Begin Subroutine >>>>

O42 (this sub rotates through 5 reeds & 5 outlet holes)
#1 = [#1 - #5] (calculate first pass cutting depth)
M98 P52 Q3 (call sub O52 Q times)
F22 G1 Z0.2 (move Z up before moving to next hole)
#1 = [0 - #5] (reset incremented variable to first pass cutting depth)
F33 X0 Y0.77 (move quickly to hole start)
Z[0.005 + #1] (rapid drop to near surface)
F1 G1 Z0 (slow drop to surface)
M98 P32 Q3 (call sub O32 Q times)
G1 F22 Z0.2 (move Z up)
G68 A0 B0 R[#3] (Rotate X Y Coordinate System #3 degrees)
#3 = [#3 + #6] (calculate rotation for next reed)

M99 (end of subroutine O42)

% <<<< Begin Subroutine >>>>

O52 (this sub mills one reed)
Z[0.005 + #1] (rapid drop to near surface)
F#4 (set feed rate)
X-0.237 Y1.074 Z#1 (mill to next hole while dropping to #1 depth)
G3 X-0.115 Y1.255 R0.3113 (mill arc)
G2 X0.362 Y1.348 R0.2677 (mill 1st half of hole cover section of reed)
G2 X0.119 Y0.926 R0.2677 (mill 2nd half of hole cover section of reed)
G3 X-0.093 Y0.871 R0.3113 (mill lower neck of reed)
G1 X-0.329 Y0.704 (mill lower neck of reed)
G1 X-0.314 Y0.683
G1 X-0.208 Y0.757
G2 X0.054 Y0.877 R0.2347 (mill clearance curve near pressure out hole)
G3 X0.411 Y1.383 R0.3273 (mill 1st half of large clearance curve)
G3 X-0.172 Y1.275 R0.3273 (mill 2nd half of large clearance curve)
G2 X-0.335 Y1.039 R0.4197 (mill top clearance neck)
G1 X-0.489 Y0.930 (mill top of clearance neck)
X-0.472 Y0.907 (mill to starting point)
#1 = [#1 - #5] (calculate next milling depth)
M99 (end of subroutine O42)

% <<<< Begin Subroutine >>>>

O32 (this sub mills one outlet hole)
F#4 (set feed rate)

G2 X0 Y0.528 R0.1213 Z#1 (mill right side of hole)
G2 X0 Y0.770 R0.1213 (mill left side of hole)
#1 = [#1 - #5] (calculate next milling depth)

M99 (end of subroutine O42)

Thanks for this. Looking back, it seems I've manually written G-code quite a lot. Doing subroutines and those more "advanced" concepts you have would help me out. When I made my Webster, I hand wrote the code to cut the rod to its final depth between the two bosses. The two rods are rather different, but also have a lot in common. I was thinking about doing the same for this one but there's a couple of differences to complicate things. Still, it might be useful to do it.

BothConnRods.jpg


The 1 by 1 conn rod at the top and Webster. Brian's is more "conventional" looking, at the price of that raised area on the right not actually being circular. It's spread out to allow the slitting saw to cut off the cap on the end, so two semicircles with a .050 flat area between them that the saw cuts away. With the Webster, I moved the cutter to a tool radius on the right side of the left boss on the mid line, cut a circle, then moved the cutter to one radius on the left side of the boss. Doing so cut the entire area to the final depth. Like this:

CircleMystery.png


To do this on the 1 by 1 rod, I'll need to cut two semicircles offset from each other.

I need to refresh myself on how to cut semicircles. I think I've done it once.
 

Latest posts

Back
Top