Hello Guest it is March 28, 2024, 12:23:21 PM

Author Topic: Laser Engraving Plugin Source Code  (Read 45017 times)

0 Members and 1 Guest are viewing this topic.

Laser Engraving Plugin Source Code
« on: July 06, 2009, 07:27:17 PM »
Is the laser engraving plugin source code available?  I would like to tweak it a little.  I will post anything I complete.

Thanks
Re: Laser Engraving Plugin Source Code
« Reply #1 on: July 29, 2009, 06:22:37 AM »
The engraver plugin source code is now available for download, I was the one who requested the code be make available. As good support people they asked Art, the code owner, if it could be released and he said YES!.
I have found the most significant bug relating to the image requiring to be square to work correctly.
There are three variables in the code, length height & width, and they have been mixed up in some of the code.
I now have sone source code which works WITHOUT the image needing to be square.
I have also added a "Maintain Aspect Ratio" checkbox to keep the image the correct shape.
My only major problem is I am attempting to add an "Inverse Image" checkbox and I cannot get it to work.
I am NOT a VC++ programmer and I have had to feel my way through this code so far, normally I code in ANSI C or Codegear (borland) Pascal.

The sourcecode of my version is available at  www.dockerty.co.nz\Engraving.zip (15Mb).

This source is for Microsoft Visual Studio 2003 and includes the source for zlib.lib which I spent a few hours sorting.

I need to work out the remaining bugs and things will be sweet!!!
Re: Laser Engraving Plugin Source Code
« Reply #2 on: July 29, 2009, 08:52:08 AM »
That's great!

I was patient with this thread because my laser is not on-line yet.  I was going to persue it further when I needed it.

My home built laser cutter/engraver should be ready to go in about 2-3 weeks.

My build log is here...http://www.buildlog.net/cnc_laser/index.html
Re: Laser Engraving Plugin Source Code
« Reply #3 on: July 30, 2009, 10:37:02 AM »
I think I understand the way the code works. 

It appears that it determines the image resolution, figures out the steps per pixel and related info, sets up a zig zag pattern, moving up the Y stepover at each end.  Based on grayscale info, it determines what to do with the beam and feeds some timing info into MachView->Info.Time[].

It would help to understand Mach a little more at this point.  How does Mach use this information?  It appears that Mach can use this as it it is running a line of G-Code to control an output on a per step basis.  Is this documented somewhere?  Is the output pin selectable?

Any help would be appreciated.

Thanks

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Laser Engraving Plugin Source Code
« Reply #4 on: July 30, 2009, 11:10:18 AM »
bdock,

    If you would send me your source code to:  poppabear@hughes.net
and put in details of what it is your trying to do with the reversal stuff, I can try and help you out.  No promises.... but, perhaps we can make it do the revers image you want?

scott
fun times
Re: Laser Engraving Plugin Source Code
« Reply #5 on: July 30, 2009, 01:46:35 PM »
Thanks for the generous offer poppabear, but that is more than I need.

The reversal idea seems pretty straight forward....just invert the beam value at the right time  You could probably do it in advance anyway with Photoshop, etc. 

I was just hoping to get an overview of how Mach deals with changing the beam while the axis is moving.  What are the hooks exposed to the plugin author that lets you do this.  A quick overview would be helpful.  I think having the source code and bdock's changes address most of what I immediately desire.
Re: Laser Engraving Plugin Source Code
« Reply #6 on: July 30, 2009, 05:20:24 PM »
poppabear.

The sourcecode of MY VERSION is available at www.dockerty.co.nz\Engraving.zip
and the ORIGINAL SOURCECODE is now avaliable from the MACH3 PLUGIN webpage.

Simply drop the new DLL overtop of the old one!

Hopefully you can locate the stupid errors I have made and get the additional features fully functional with there settings correctly storing to XML.
 

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Laser Engraving Plugin Source Code
« Reply #7 on: July 30, 2009, 07:01:24 PM »
you link doesnt work, cna you post your source here please
fun times
Re: Laser Engraving Plugin Source Code
« Reply #8 on: July 30, 2009, 07:14:05 PM »
Ok,

 :)
Here is the source for both the Engraver plugin and I also include the zlib.lib source as I also required this.
Re: Laser Engraving Plugin Source Code
« Reply #9 on: October 06, 2009, 07:06:13 PM »
What do you need to setup in Mach for this to work?  What output/pins need to be setup?  It is driving the X and Y axis correctly, but I need to hook into the power supply.