CAD CAM EDM DRO - Yahoo Group Archive

RE: [CAD_CAM_EDM_DRO] G-Code Arc drawing question

on 2001-11-15 12:51:19 UTC
Dan,
It sounds like fundamentally what is happening here is that you are applying
anisotropic scaling to the G-code, although it is not clear from your message
how you are doing this.
In any case, at some stage (generally in the driver for the mill, e.g. CNCPro or
TurboCNC) the G02 and G03 arc commands are converted into coordinated axis
motion that result in the tracing of a circular arc.
If you apply scaling before this conversion occurs, and the scaling factor is
different for the two axes in the plane of the circle, you are effectively
asking for the drawing of an ellipse, not a circle, and most G-code interpreters
will get upset that the start (current) location, the final location, and the
centre point do not define a circular arc.

The method you are looking for to solve the problem is to replace the circular
arcs with a series of straight lines which scale anisotropically just fine. I
couldn't tell you if any CAD programs can do this; all I can say is that if I
were writing a CAD program, and wanted this feature, I would feel the best place
to put it would be in the G-code generation as an option ("Don't use G02/G03"),
not as a method in the drawing portion of the program. That would keep the
drawing "exact" and put off any approximations until absolutely necessary. I'm
just mentioning this in case you forgot to look there in the programs you
tested.

Another solution you might consider it to arrange for TurboCNC to scale *after*
generating the coordinated motion. Generally you would do this by giving scaled
values to the program setup, so that, say instead of needing 400 stepper pulses
per unit (inch) on X and 80 pulses per unit (degree) on "Y" (which, being rotary
would normally be called "B"), you use 400 pulses per unit (linear inch) on X
and 4584 pulses per unit (inch of circumference--this is the value for 1"
diameter ring and 80pulses/degree) on Y.

You mention wanting to make different diameter rings with the "same" pattern,
and I can interpret "same" in two ways...
One interpretation would be, for instance, that you have a zigzag line all the
way around the ring, joining itself, with 8 zigs and 8 zags, and no matter what
ring size you have, you still want 8 zigs and 8 zags. In this case, you don't
have to alter the scaling from one to another, just offset Z by the radius
difference.
The other interpretation is that you have a pattern over just a portion of the
circumference, and you want it to act as if applied with a decal: On larger
rings, all the shapes in the pattern are identical, they just cover a smaller
fraction of the circumference. In this case you design the G-code as if you were
cutting the decal, then set up TurboCNC so that one "inch of Y motion" means one
inch of circumference on the particular ring size you are using.

Doing it this way has the problem of getting out a calculator and fiddling with
the machine setup for each ring size, although you may be able to develop a
library of setup files, one for each diameter you work with.
On the other hand it has the advantage, if your design contains many circular
arcs, of giving a smaller G-code file with no sacrifice in precision. Even
non-circular curves can be approximated more compactly using arcs than using
just straight lines (e.g. using Vector's Arc Spline functionality).

It also isn't clear to me, if your spreadsheet is already generating the G-code,
why you need a CAD program at all. Are you looking into using the CAD program
instead of your spreadsheet to generate your G-code?
-Kevin

Dan Statman wrote:
>... I am
> currently running a 3-axis Sherline converted mill. I have connected the
> Y-axis stepper motors to a vertically mounted ratoary table, and I do not
> have a stepper motor connected to the linear (normal) Y-axis.
>
> ... I create my G-Code files in
> Microsoft Excel since I am only created engraving patterns utilizing
> functional realtionships between X and Y coordinates.
>
> Since I am doing it this was all of my curved cuts are preformed as a series
> of finally divided straight line segments, which is really convenient. I
> then rescale my Y-axis data points to place them on a 360 degree rotation
> path (since my Y-axis is the rotary table). I am controlling the mill with
> TurboCNC configured for a rotary axis as the Y-axis.
>
> Here is my problem (finally!):
>
> When I try out all of the demo versions of the CAD programs and I draw
> circles and curves, it always converts them to the G-Code for cutting arcs
> (makes sense). Is there a way to tell the Cad program to break the arcs up
> into tiny line segments so that I get the G01 output (many lines) instead of
> G03 (or whatever the arc code is)? The arc cutting does not work when the
> Y-axis is scaled from 0 to 360 degrees and the x-axis of the part is scaled
> from 0 to 0.100"
>...

Discussion Thread

Dan Statman 2001-11-15 09:01:08 UTC G-Code Arc drawing question dlantz@a... 2001-11-15 09:04:59 UTC RE: [CAD_CAM_EDM_DRO] G-Code Arc drawing question Dan Statman 2001-11-15 09:10:12 UTC Re: [CAD_CAM_EDM_DRO] G-Code Arc drawing question dlantz@a... 2001-11-15 09:13:14 UTC RE: [CAD_CAM_EDM_DRO] G-Code Arc drawing question Alan Marconett KM6VV 2001-11-15 11:50:31 UTC Re: [CAD_CAM_EDM_DRO] G-Code Arc drawing question Kevin P. Martin 2001-11-15 12:51:19 UTC RE: [CAD_CAM_EDM_DRO] G-Code Arc drawing question Michael Milligan 2001-11-15 12:59:02 UTC RE: [CAD_CAM_EDM_DRO] G-Code Arc drawing question Dan Statman 2001-11-15 14:08:46 UTC Re: [CAD_CAM_EDM_DRO] G-Code Arc drawing question Fred Smith 2001-11-15 15:22:44 UTC Re: G-Code Arc drawing question Dave Engvall 2001-11-15 15:59:40 UTC Re: [CAD_CAM_EDM_DRO] Re: G-Code Arc drawing question Dan Statman 2001-11-15 17:28:19 UTC Re: [CAD_CAM_EDM_DRO] Re: G-Code Arc drawing question Marcus & Eva 2001-11-15 19:05:34 UTC Re: [CAD_CAM_EDM_DRO] G-Code Arc drawing question shymu@b... 2001-11-15 19:39:12 UTC Re: G-Code Arc drawing question ballendo@y... 2001-11-15 19:58:15 UTC Re: G-Code Arc drawing question Dave Engvall 2001-11-15 21:16:11 UTC Re: [CAD_CAM_EDM_DRO] Re: G-Code Arc drawing question