Important note regarding illustrator exports

Hey everyone! I’ve spent the last 12 hours pulling my hair out so that you don’t have to! (Side note: This definitely feels like it should go in “Tips & Tricks”, but I can’t create a new topic there?)

I’ll make it short and sweet—your STROKE SETTINGS for a single path, DO affect the final placement of your SVG elements, by some amount. For me, it was about 0.3mm, which—sure isn’t very significant. However, I had a jig I was using and it was really bothering me that suddenly something had changed and it was off and there was seemingly nothing I could do to get it running again!

So, now that I’ve figured all of this out, I’ve codified it into a script which can be run anytime I need to spin up a new document for creating jigs!

EDIT: I don’t actually recommend using this script due to some gotchas. Watch the video below!

Script: Create new Glowforge Jig Template · GitHub
Template: GF Template.ai (340.4 KB)
Important Note: I uploaded this template with a .ai ending, because .ait is not allowed. But illustrator wants a template in .ait file format. Just change the file ending when you download it, and you’ll be good to go.

Demo Video hosted on CleanShot Cloud

3 Likes

Wow, this was a lot of difficulty! Thanks for sharing the code!

2 Likes

Before you use the script, I’m updating my post—it appears to reset your Illustrator unit preferences, which is very strange to me.

2 Likes

Okay, thanks for the info!

2 Likes

Could you use a preset or a template? I don’t currently have access to Illustrator, but I remember using the libraries as well.

2 Likes

Yep—you’re absolutely right, and that ended up being a better path! I posted an updated demo video which explains more about this.

3 Likes

Updated demo video posted which explains why you may not want to use the script. But I also updated the original post to include the template as well!

2 Likes

i don’t understand the issue you’[re having that you are using this script to fix. i’ve been using AI on my GF for six years without any positioning issues. and stroke thickness means nothing to the GF. it’s just essentially a path that the laser is following. it follows the center of the stroke. the only issue i’ve seen with strokes is if you set it to anything other than center (i.e., if you set it to align to inside or outside) that can cause problems.

can you share some images of the issue you’re having? there may be a simpler solution.

6 Likes

I posted a simpler solution (I think).

This might be right up your alley Adam, you seem really comfortable with scripting and automation.

6 Likes

what’s the actual issue, tho? I’m not really understanding what the script is resolving.

5 Likes

You are correct that the actual scoring will just be the center of the stroke. However, if you’re using a path to mark the boundaries of your Glowforge bed, which is what I’m doing here, then changing the stroke of the path does actually affect the starting position.

Now I’m emphasizing “starting” position because IMO that’s the most important part of the process—I want to upload the SVG template and have it start in the exact same position every time, regardless of the actual jig templates used within the boundary rectangle. Does that make sense?

Here’s a video show-casing what I mean about the position being depending upon the outer stroke width.

3 Likes

I think our intent behind the jigs is just slightly different, although I like your template!

I want to be able to take this jig out, and a week later load it back up and get pixel-perfect positioning for the 4-inch slate coasters I’m making. The way I do this is by ensuring my jig is always absolutely positioned in the exact same spot. Then the only other variable is ensuring that the GFUI loads my jig template into the exact same spot.

I included a video in my response to @shop which probably more clearly describes my intent here.

1 Like

You are correct.

My use was a one off, but you could export the outer board area and cut on draftboard and use it over and over for a reusable jig.

1 Like

that’s interesting. i hadn’t seen that behavior. and it’s a really weird behavior, since the stroke width itself means absolutely nothing to the laser cutter. it really shouldn’t affect positioning, but it obviously does.

3 Likes

My guess is that it’s not actually a GFUI bug. I think it’s due to the way Illustrator exports SVGs, and actually, it’s not technically wrong because if you were to use that SVG on the web, you would want the stroke of the line to be taken into account for the overall SVG width.

But for our purposes (which admittedly is bastardizing SVG to cut things :stuck_out_tongue:) we actually want the stroke to be a very specific width to keep our entire SVG the same size.

It’s weird. It’s not intuitive at all. But… Now that I type this out, I’m not sure it’s wrong.

2 Likes

This topic was automatically closed 32 days after the last reply. New replies are no longer allowed.