For those who have InDesign

Post Reply
WillAdams
Posts: 8489
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

For those who have InDesign

Post by WillAdams » Mon Jan 28, 2013 4:15 pm

Found a tool which hadn't been mentioned before:

http://www.siliconpublishing.com/resources/

includes a JavaScript:

IterativePathCuts: Converts InDesign paths to g-code for driving CNC machines. Comes in handy if you ever need to carve a sign from your InDesign layout.

Posted an example of the code which it generates in this thread:

http://www.shapeoko.com/forum/viewtopic ... 9477#p9477

Anyone able to evaluate how efficient it is?

Here's the code for a 152.4mm (3 inch) circle:

Code: Select all

;File: Untitled
;Mon Jan 28 2013 11:10:45 GMT-0500
;Speed
f 300

;Move to starting position.
g0 z 20
g0 x 0 y 0
;Pass: 0
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 12
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
;Pass: 1
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 10
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
;Pass: 2
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 8
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
;Pass: 3
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 6
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
;Pass: 4
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 4
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
;Pass: 5
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 2
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
;Pass: 6
;Page Item: 0
;New path
g0 x 21 y -39
;
;Lower router
g1 z 0
g1 x 39 y -21
g1 x 21 y -3
g1 x 3 y -21
;Close path
g1 x 21 y -39
;End of path
g0 z 15
;m00
;
g0 z 20
g0 x 0 y 0
William
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

calica
Posts: 107
Joined: Wed Apr 11, 2012 8:13 am

Re: For those who have InDesign

Post by calica » Tue Jan 29, 2013 12:09 am

That's cutting a square diamond.

WillAdams
Posts: 8489
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: For those who have InDesign

Post by WillAdams » Tue Jan 29, 2013 1:38 am

That's what I was thinking --- weird.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

WillAdams
Posts: 8489
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: For those who have InDesign

Post by WillAdams » Tue Jan 29, 2013 1:10 pm

Turns out it only does straight paths.

from: https://groups.google.com/d/msg/indesig ... kRSWztgI4J
Here are a few quick notes on how to use the IterativePathCuts.jsx script.

* Draw a path in InDesign.

* Set the measurement units of your document to mm.

* If the path contains curves, select the path and run the AddPoints.jsx script (which comes with InDesign and is installed by default) a few times. The idea here is to "flatten" the path--the script will create straight-line segments between the points of the path, ignoring any curves.

* Position the zero point where you want X 0, Y 0 on your CNC machine to be. I tend to use the lower-left corner of the page, and I tend to move my paths so that they start around 3 mm x 3 mm.

* With the path selected, run the IterativePathCuts.jsx script. The script will display a dialog box.

Here's a quick listing of the options:

Start Z: The height, measured from Z 0, to which you want to lower the router for its initial pass. I generally place this just above the surface of the material--it can help to do a "dry run" pass before you actually start cutting anything. Typically, when I'm cutting 1/4 inch acrylic, I'll start at 6mm, just above the surface.

Start X and Start Y: Best to leave these at zero, for now.

End Z: The vertical ending point for the cut. Set this to 0 to cut all of the way through the material, or some other value to create an indent.

Interim Z: The point to which to raise the rounter between passes. Usually, this should be some point above the surface of the material you're cutting.

Step: The vertical distance between passes. The point of this setting is to avoid (expensive!) broken router bits. The smaller (in diameter) the bit, the more passes it will take to cut the piece. In addition, the smaller you make the vertical step, the smoother the edges will typically be. I usually cut 1/4 inch acrylic in 1 mm passes with a 1.588 mm (i.e., 1/16th inch) bit.

* Once you've got the settings the way you want them, click the OK button. The script will display a standard file dialog box.

* Select a location and enter a name for the g-code file, giving it the file extension ".nc", then click the OK button to save the file.

At this point, you have a g-code file you can send to your CNC machine.

I typically have a first pass that cuts the outline of the shape to around 1 mm. Then I have another file that cuts *most of* the last 1 mm, but leaves a few "bridges" to keep the shape from moving. Then I have a third g-code file that cuts just those bridges away. Before I run the last file, I put duct tape over the shape to keep it from moving as the last bits of material are cut away. I'm mostly making pretty small pieces, and having them sucked up by my homemade ShopVac dust extractor is no fun.

The script does not compensate for the diameter of the router bit, so the cutting path you want should be offset from the original path by half of the diameter of the bit. I do this by making circles that are the same diameter as the router bit, then positioning the circles around the original path. I then run another script that connects the centers of the circles to create the cutting path.
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

Post Reply