CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code?

Posted by Michael Fagan
on 2007-08-23 14:43:04 UTC
One thing that might get you started is a basic understanding of G-Code.
G-code is basically machine code, it specifies motions in terms of the
Cartesian system more or less as the machine would process it. A G-Code
interpreter such as Mach, EMC2, or a proprietary interpreter built into a
large machine turns those commands into signals for the motor drives. I
have heard of several GUI to G-code utilities, including one in which I am
currently involved in the development process. It takes a list of
operations and parameters (such as cut a hole with center at x,y, radius r,
tool diameter, feeds, etc) and turns it into the correct g-code, including
calculations for cutter comp, multiple passes, etc. You then input the
G-code directly into the G-code interpreter which drives the machine.

On 8/22/07, elwolv <elwolv@...> wrote:
>
> hello;
>
> thanks to Dan Hudgins for referencing this forum for my project.
> I building a micro CNC machine
> I want to write SW for simple CAD front /to G-code / to Machine commands
>
> the information regarding the programming is very limited to some
> g-code description.
>
> I think those steps are needed to complete a sw for a cnc?
>
> 1- data structure in the CAD part, I can build a simple CAD GUI, but
> what is the concept for the data structure.
> do we make all the input from the mouse as line and arc as was
> suggested to me. then use these in a data list to create G-code
> listing that can be reviewed by the use?
>
> 2- how does the milling of a surface is translated from a CAD data
> structure to a G-code.
>
> what is the data structure for a cad surface suitable for translation
> to g-code? line and arc will not represent surface shape milling.
> Extrusion will allow a line or arc to be shaped and we can define that
> structure as a way to be translated into many lines and arcs to match
> the shape.
>
> what is the data structure for extrusion to can be translated to
> G-code easily?
>
> 3- usually it is the format of the cad output that translated to
> g-code. the only reason to have a cad data structure (or format
> output to file) is to allow the automatic translation to G-code.
> the reason of g-code translation step is to allow the user to review
> and correct the automatic translation. or to allow the use of direct
> g-code if needed for simpler shapes
>
> 4- examples of how to translate g-code to machines codes?
>
> I have seen some old very elementary pascal simple incomplete sample
> for the parallel port. the translation is for a simple single line or
> arc motion. which was is straight forward with some thought to it for
> efficiency.
>
> since G-code is a line and arc operation then we can connect between
> cad structures and g-code translation as each is a name for subroutine
> that contains the machine code to perform the motion according to the
> motor controller specifics needs as step and direction for parallel
> port as specific rs232 serial port commands for a commercial
> controllers needs.
>
> 5- how to work out the surface data structure into motion into tens of
> lines or arcs motion to create a surface from a g-code?
>
> g-code will give only line and arc. so we need to create tens of
> g-code lines and arcs. is there is efficient way to do that or that
> simple brute force with a very long list of lines showing the g-codes
>
> do we put the g codes in a loop which represent the structure some how
> to change the x,y,z as needed for each line.
>
> or we use a straight line operations where the z change for every step
> (within the line) to make a curved surface. how do we automate such
> a loop = how do we have a formula to give the surface height for a line?
>
> as I see now brute force is not suitable for surface. do we use Nurbs
> operation to represent a line analytically then we use that equation
> to give the z for the curve shape?
>
> is that why Nurbs is used in surface application.
>
> 6- but simple engraving SW does not use Nurbs, what is the concept
> they use in the SW? for engraving.
>
> 7- what available free codes are available in the community to use or
> review?
>
> those are lot of question, but your help is welcomed
>
> elwolv
>
>
>


[Non-text portions of this message have been removed]

Discussion Thread

elwolv 2007-08-22 21:59:56 UTC How to Program a CAD / G-code/Machine commands freesource code? Peter Rosenholm 2007-08-23 06:53:40 UTC Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code? Mihaly Kis 2007-08-23 07:15:31 UTC Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code? caudlet 2007-08-23 07:50:53 UTC Re: How to Program a CAD / G-code/Machine commands freesource code? Dennis Cranston 2007-08-23 08:28:37 UTC RE: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? Alan KM6VV 2007-08-23 08:52:31 UTC RE: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code? Michael Fagan 2007-08-23 14:43:04 UTC Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code? art 2007-08-23 19:51:42 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? art 2007-08-23 20:02:25 UTC Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code? Peter Rosenholm 2007-08-23 20:36:44 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? Alan Marconett 2007-08-23 21:31:23 UTC Re: [CAD_CAM_EDM_DRO] How to Program a CAD / G-code/Machine commands freesource code? elwolv 2007-08-23 23:31:05 UTC Re: How to Program a CAD / G-code/Machine commands freesource code? Anders Wallin 2007-08-24 00:42:59 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? Jim Peck 2007-08-24 02:57:13 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? art 2007-08-24 07:09:03 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? vrsculptor 2007-08-24 07:22:53 UTC Re: How to Program a CAD / G-code/Machine commands freesource code? Jon Elson 2007-08-24 09:21:41 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? Peter Rosenholm 2007-08-24 12:32:03 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? art 2007-08-24 13:05:53 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? caudlet 2007-08-24 16:33:23 UTC Re: How to Program a CAD / G-code/Machine commands freesource code? [OFF TOPIC] art 2007-08-24 19:02:14 UTC Re: [CAD_CAM_EDM_DRO] Re: How to Program a CAD / G-code/Machine commands freesource code? [OFF TOPIC] elwolv 2007-08-25 04:16:49 UTC Re: How to Program a CAD / G-code/Machine commands freesource code? caudlet 2007-08-25 08:52:55 UTC [OT OT] How to Program a CAD / G-code/........ elwolv 2007-08-25 10:00:26 UTC OFF %$# TOPIC! Re: How to Program a CAD [moderated]