CAD CAM EDM DRO - Yahoo Group Archive

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

Posted by elwolv
on 2007-08-23 23:31:05 UTC
hello All

thank you for your response.

I am reading and listening quitely.

I am commited to do this project because i do have the time.

thank you Peter Rosenholm!
I will be using C#langauge.

the main question is do I have to re-invent the wheel, because the
commercial market is strong and there is no books in this area.
there is lot of books on cad/cam but not the actual programming
issues. and most books are old and speak of APT/CL as the basis of
all commercial products.

CAD science programming old books discuses only CAD as graphics
science and not the the current thinking of how it is done.

I see the problem of attempting to build a general piece of SW. it is
endless and they are correct in that. however, for specific machine
for specific limited work, we do not need to be capable of reading or
generating all formate in the world..... that is for life time
company work.

this is a simple straight application to do some surface milling in
micro fashion, good screw and a proper motor controller.

it is the concepts that are the community of programmers have
discovered over the time that i am interested in their discussion.

let us start with single specific question = one point
and the programming specialist knows the answers to these question,
however, commercial interest may shy the person from writing.

so if some have prior knowledge based on experience in programming we
like to hear and discuss, this is the purpose of an open forum
exchange of information and experience.

thank you all for your discussion and desire to know

I am sure there is a lot of people out there would like to learn of
how those packages proceed in their operation and what the subtle
issue they discovered. To authors of the famous packages that is sold
for low cost are not for my use, I am sorry, i wish i could do that
but i need to do the high speed machining control HSM. other issues
within the system has to work in a single control package.

so far your comments are very useful and enlightening and benefited me
and from those bits i should be able to put something on the internet
describing the process.


Q1: in simple terms does the current nurbs is the best method to draw
a surface for use in CAD and to be translated to CAM then actual CNC

if the answer is yes:

what is the data structure to use. nurbs is complex and also is
simple and lot of code books available to put something.

to do a single nurb curve is a ok
next how to make a surface out of that.
for a surface i am sure we can find a book showing how make a surface

Q1.1: now the input data for the surface patch is done by nurbs not by
other techniques?

now we have the data inputed to create surface

Q1.2: for a single graphics patch or surface we have the input data
and i have seen one article on code project,?? for WPF how to generate
(x,y)? data from curve on bezier after he constructed the curve. he
mentioned that he get the data not just the construction points??

how do we construct the x,y,z coordinate of the surface patch from the
nurbs input and equations? reference articles or the concept?

Q1.3: now this data set is a map/topology of the surface is that a big
array of 3 dimension or a different efficient data structure?

Q1.4: is that data structure can be used to generate the G-code.

if yes then it is the next question to the thread.

if not then what is to do next with the data

if the answer is NO to nurbs:
Q1.0 what is the recommended surface patch method to use.

thank you all

elwolv




--- In CAD_CAM_EDM_DRO@yahoogroups.com, "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
>

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]