Inkscape experiments: tesselate an SVG then crop to size

Preparing an SVG for laser cutting by tessellating it and then cropping it.

Inkscape experiments: tesselate an SVG then crop to size

Inkscape doesn't really have a crop function, it's intended to be non-destructive, but, if you're using it to laser cut then sometimes you really want to chop a section out of a bigger object or pattern, for example if you want to cover the whole side of an object with a pattern. Depending on which laser cutter software you're using this might not be a problem as some work from the rendered area only. Unfortunately if you use the usual method:

  • group the objects you want to clip
  • create a mask in the shape you want the final view to appear
  • Select both things and use object > clip > set

Then when you export your neatly clipped pattern to Visicut all of the vector outside the masked area will reappear. This is extremely frustrating. This evening one of Hackspace Manchester's members was getting frustrated trying to crop a tessellated svg of a Gosper curve downloaded from Wikipedia, so that they could laser etch the resulting pattern across the side of a box.

Wikipedia Gosper Curve image
Wikipedia Gosper Curve image

It turns out, after a bit of faffing that it's totally possible to do this but it does require some quite specific steps to be followed. First, tesselate your image:

tessellated Gosper Curve in Inkscape
tessellated Gosper Curve in Inkscape

Once you've done that:

  1. select everything (ctrl+a)

  2. use path > combine to make the mess into a single object

  3. use path > stroke to path to create a pattern that can have sections cut out of it. (This takes a while to complete.)

  4. create a shape that matches the area you want to map your pattern to and place it over the section of the pattern you want to use:

    Tesselated Gosper Curve with final shape overlayed

  5. select all again and use path > Intersection to crop the pattern to the shape you want.

    Cropped Gosper Curve

  6. send to your laser cutter :)

Laser cut pattern
Laser cut pattern

As you can see from the close up, pushing the tessellated pattern through stroke to path has resulted in the laser cutting both sides of the line rather than just the lines themselves. It's pretty, but wasn't quite what we meant!

Closeup of the lasercut pattern
Closeup of laser cut pattern

Comments powered by Talkyard.