Grasshopper

algorithmic modeling for Rhino

Hi,

I guess this is specifically aimed at Arthur as the author.

I'm working with the University of Manchester laser research lab on cutting some of my jewellery designs in silver sheet using their picosecond laser.  In their wisdom the manufacturers of the laser have paired a cutting edge laser with an ancient CNC.  The machine requires straight cut lines only (it doesn't handle curves) so these have to be converted from the original design, for which I'm using Grasshopper.  Also, it requires multiple passes at a slight offset each time in order to ablate the silver successfully, generated again using Grasshopper.

So far so good.  The machine controller is very picky about the format of Gcode it accepts, and it will only accept Gcode.  So I am currently exporting the Grasshopper processed design as a dxf and running it through a dxf2gcode converter.  This must then be manually processed (I use vi!) to change x references to c, y references to d and remove any references to z.  Precision must be to 3 decimal places.

Silkworm is of course ideal for creating Gcode but is pretty specifically written for 3D printing I think?  How configurable would it be with the config file to produce what I've described above, even if it's raw gcode which could then be wrapped manually with a header and footer?   I'm thinking you'd have to rewrite portions of the module which is of course a bit pointless for such a specific task.  Thought I'd ask anyway!

Cheers,

Simon

Views: 1200

Replies to This Discussion

Hi Simon,

Thank you for your question, we are three authors on this project Adam Holloway, Karl Kjelstrup-Johnson and myself (about page) :)

Silkworm converts Grasshopper geometries into Gcode for 3 axis machines. We haven't looked at CNC specific Gcode but I suppose it is very similar to 3D printers? It would be interesting to compare both type of code in this discussion to see if we can add a feature to switch between CNC and 3D printers. Do you have a short Gcode example for a CNC machine?  Do you use a settings file like the ones generated by GCode software like Slic3r?

Also, I will ask Adam as he has been involved in making an open-source CNC machine so he might know more.

Hi Arthur,

Apologies, I didn't mean that to sound the way it did.  I realise there are 3 people involved in the project!

I'll get back to you with some snippets in a few days.

Thanks,

Simon

Hi Simon,

Sorry, been on holiday otherwise I would have responded sooner.

I whipped together a new .gha with the G Code format that you need:

  • x => c
  • y => d
  • no z references
  • no e references (do you need a command to activate the laser? i am unfamiliar with lasercutting G Code)
  • precision to 3 decimal places
  • header and footer can be specified in the config file.

This is a pretty simple aspect of silkworm to modify as the G Code is compiled using the String.Format method.  In theory, if this is a feature that is useful for other people, it could be added to the config file as something like:

gcodeformat  = F{0} X{1} Y{2} Z{3} E{4}

Then you can change the letter references and order of command specifics.  It could become more complicated if different commands need to be added, but there is probably a way this could be done too.  I think though, like you said, this need for formatting probably something very specific and is likely not to come up very much.  

Hope this helps,

Adam

Attachments:

Hi Adam,

Apologies for the delay, I posted the original question then was off on holiday myself.

Extremely grateful for this, will have a play when I next get chance, but from what I can see it looks perfect!

Many thanks,

Simon

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service