Array printing from .csv file

For anyone that is going to be producing a product line, this type of thing will be incredibly important

2 Likes

I know some of the “free” software have APIs to program them. I looked at the one for Fusion 360 and it looked pretty straight forward (disclaimer: I’m a programmer, so it may look easy to me).

I think you could probably write something that creates sketches based on input from a text file, and then export that sketch as a DXF or something else you could use. If that’s the way you want to go, I could dig a little deeper and figure out more how it works.

1 Like

I found this one for Inkscape: text from csv it looks promising. But unfortunately it doesn’t work :confused: Do you think you could have quick look at it? Maybe your skiled eyes catch something…? :blush:

If you have programming experience, it would be fairly easy using Processing. It’s based on Java, and comes with libraries to write in either PDF or DXF format.

processing.org

I vaguely recall reading somewhere on this forum that engraving can be done with vector artwork.

I did get it working, but I had to “hard-code” the height of the canvas. On line 47 of textfromcsv.py, change:

height = inkex.unittouu(svg.attrib[‘height’])

to

height = 100;

Then it works fine. I’d have to dig some more to figure out then new way to get the canvas height in python. But for now, you can just hard-code the height of your canvas.

My input file looks like this:

10,10,Hello
20,29,World

And it gave me this in InkScape:

2 Likes

soooo cool - your are my herro of the day :+1: :+1:

1 Like

Yes, you can engrave vectors. Some fonts will work fine as vectors, some will not work as well. Some fonts will work better as vectors if you convert them to outlines (in illustrator that is found under the text menu> outline text, i assume inkscape has a similar function). Do a google search for “single line fonts” or “hershey text” to get a better idea of why you might want to use one over the other.

1 Like

Also, be careful when using fonts in Inkscape and moving to another computer. If the font is not installed on the new computer, then Inkscape will pick a different font.

Once you have the text in place where you want it, then you can convert the font to a path, by using the “Path -> Object to Path”. You will not be able to edit the text anymore, but it is no longer dependent on the installed font.

Working with a maker-space, I’ve run into this a couple of times.

2 Likes

Mail merge applications were brought up in a discussion before. I talked through an ideal workflow.

Seems @dan didn’t add it to the feature hopper then. But quite a few other people with ideas on how to use mass-personalization.

Continuing the discussion from Registration of pre-printed sheets:

Doing an alignment jig and self-assembling each print run is perfectly possible with any laser cutter. I would hope to leverage the camera system fully in the glowforge and make it more awesome.

3 Likes

Agreed, dumping the box of pencils and have the software automatically recognize, and print on on them regardless of orientation in would be the ultimate goal. I was thinking the cameras would be used to verify and maybe tweak alignment. Each cell of the array could be free floating, and aligned/rotated as required during the preview stage.

Okay. You can use OpenOffice to do the mail merge and export as a PDF, convert the PDF to JPG and engrave!

If you are on a Mac you could use Automate to make a “droplet” to drop the CSV into a folder and have it auto create the JPG for you. I am sure other operating systems could create a similar workflow.

I did this once before for iPhones. I had a batch and pulled the data from a csv with an illustrator plugin. I can’t seen to find it right now but will look around and post it when I do!

1 Like

This isn’t the script I originally used, but it looks similar:

What about using a script to generate an OpenSCAD build file and then exporting to DXF?

I’ve done the very same thing with Excel and Word to etch and cut equipment tags with changing data. No need for custom programming or scripts. Excel will auto number an array of cells, like consecutive numbers, dates, and equation results. You enter your data in a spreadsheet, format a table in Word with spacing that matches your blank holder, and mail merge the data from the Excel file to fill in the table. From v 2013 up you can even have Word generate bar codes, including CR, right in the merge. Word recognizes all of the preformatted blank label sheets from Avery and others. Your M&M idea should be pretty straightforward, and should look great.

1 Like

I assume we can save the Word document as a PDF which the Glowforge will recognize. How do you distinguish in the PDF what is vector cut and what is raster etched? I can imagine setting up a little jig with little dimples to hold the m&ms. Format the Word Template using a table to match the jig’s grid. Then export the Word document as a PDF. Then position the PDF and go to it.

Easily done with CorelDraw…mail merge.
Ive done pens, pencils, invites on wood, dog tags etc. Have a field with positioning, font size etc… load up the database and merge…
Another reason @dan to have a CorelDraw Plugin…
:grinning:

2 Likes

For discrete etched items with no cutting like M&Ms you format the text the way you want it to look. When you are going to etch an item and then cut it out, you format the text or graphic in the Word table cell like an etch only. Word lets you format the border of each cell individually or all at once, so you apply a line border and format the line to tell the laser to cut not etch. In most lasers you make the line 0.001" wide and red. Sometimes you have to tell the laser to do the etching first so things don’t move, then cut. This is usually done either by setting certain colors and setting a color cut order in the driver.

1 Like