Welcome, Guest. Please login or register.
Did you miss your activation email?
May 24, 2012, 08:01:46 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Laser Engraving Plugin Source Code
Pages: 1 2 »   Go Down
Print
Author Topic: Laser Engraving Plugin Source Code  (Read 4799 times)
0 Members and 1 Guest are viewing this topic.
bdring
Active Member

Offline Offline

Posts: 30


View Profile
« on: July 06, 2009, 06: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
Logged
bdock
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #1 on: July 29, 2009, 05: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!!!
Logged
bdring
Active Member

Offline Offline

Posts: 30


View Profile
« Reply #2 on: July 29, 2009, 07: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
Logged
bdring
Active Member

Offline Offline

Posts: 30


View Profile
« Reply #3 on: July 30, 2009, 09: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
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« Reply #4 on: July 30, 2009, 10: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
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
bdring
Active Member

Offline Offline

Posts: 30


View Profile
« Reply #5 on: July 30, 2009, 12: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.
Logged
bdock
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #6 on: July 30, 2009, 04: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.
 
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« Reply #7 on: July 30, 2009, 06:01:24 PM »

you link doesnt work, cna you post your source here please
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
bdock
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #8 on: July 30, 2009, 06:14:05 PM »

Ok,

 Smiley
Here is the source for both the Engraver plugin and I also include the zlib.lib source as I also required this.

* zlib.zip (369.09 KB - downloaded 281 times.)
* Engraving.zip (2142.36 KB - downloaded 341 times.)
Logged
bdring
Active Member

Offline Offline

Posts: 30


View Profile
« Reply #9 on: October 06, 2009, 06: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.
Logged
Pages: 1 2 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!