Closed GoogleCodeExporter closed 8 years ago
What I did was to take an existing machine operation class and duplicate it.
You can
use the Drilling class as an example. Duplicate the cpp and h files and rename
the
files to something new. Open each file and replace the word 'Drilling' with
the new
operation name. The operations classes all inherit from the COp class which, in
turn, inherits from the HeeksObj class.
The next trick is to insert your new operation class into the project. Add it
to the
Makefile (again duplicate the Drilling references). In order to get it added
to the
main menus so that your new code can be invoked from HeeksCAD, add it to the
HeeksCNC.cpp file. Again, search for Drilling and duplicate/modify what you
find.
It's much easier to use an existing module as a template and modify it from
there
than to create a new class from scratch. Once you have a starting point, you
can
begin removing/renaming parameters and methods incrementally so that you know
what
you've done if something stops working.
Good luck.
Original comment by David.Ni...@gmail.com
on 27 Jun 2009 at 10:35
thanks David. I am proceeding cautiously -I made a new directory to play in. As
I
edit, I build again and check for errors.
Original comment by ddfalck2...@yahoo.com
on 27 Jun 2009 at 10:39
I should also have mentioned the additions to HeeksCNCTypes.h to define a data
type
for your new operation.
Similarly, adding a reference into Program.cpp allows this new machining
operation to
generate the Python code that, in turn, generates GCode. The Python generation
stuff
starts in Program.cpp within a RewritePythonProgram() method. This method, in
turn,
calls the various AppendTextToProgram() methods that can be found within the
various
machine operations classes.
Original comment by David.Ni...@gmail.com
on 27 Jun 2009 at 10:51
I think this question has been answered ok now.
Original comment by danhe...@gmail.com
on 17 Jul 2009 at 11:21
Original issue reported on code.google.com by
ddfalck2...@yahoo.com
on 27 Jun 2009 at 4:17