First, thanks to both of you for the prompt replies! You pointed me in the right direction. Here’s what happened:
Before I made that first forum posting, the Glowforge users (“we”) at our makerspace had tried uploading to GFUI a PDF that contained both engrave & cut, but it didn’t work right. I seem to remember that we had tried uploading the engrave steps in vector form, which probably made the PDF file too complex for GFUI.
So after your replies, we thought about it some more.
Our solution was to define a filter in Inkscape that does nothing.
In Inkscape, we apply this filter to the objects that we want to be engraved. These objects we want to be in raster form in the PDF. (As mentioned in my earlier post, we keep the engraving & the vector cut lines on separate layers in Inkscape, so we can keep straight which is which.)
Then we make sure that in Inkscape’s PDF export dialog, “Rasterize filter effects” is turned on. (We also specify the “Resolution for rasterization” field in that dialog to be 225 dpi to match the Glowforge’s default lines-per-inch setting. I suppose this is optional, but it prevents surprises.)
Then the PDF has the engrave steps in raster form, & the cut steps in vector form, so GFUI can process them right.
Now the print-&-cut works just like we want.
The overlapping paths you mention, and the fact that the clip art isn’t punched out of the background, were not at all issues for us once the areas to be engraved were rasterized.
I’ve attached the Inkscape filter file. This file was made by copying the Inkscape .SVG design file, opening the copy in a text editor, & deleting everything except the filter definition & the SVG header & footer. If you open this filter file the way you would an SVG drawing, you won’t see anything, because there are no graphics in the filter file.
Because the file has a .svg extension, this forum tries to display the file as part of my posting, but there’s nothing to display. So I had to attach the file in .zip form. The file needs to be unzipped before you can do any of the following with it.
You can put the filter file into your Inkscape install’s filters folder (by default on Linux, this folder is /usr/share/inkscape/filters/
) and the next time you launch Inkscape, there should be a 00-Custom submenu added to the Filters menu. In the filter file, the submenu name starts with 00 so it will sort to the top of the Filter menu. (If you were to edit the inkscape:menu
line in the filter file so the submenu name starts with ZZZ, it would sort to the bottom of the Filter menu.)
You will find mention on the Web that Linux users can put the filter file into their personal config folder ( ~/.config/inkscape/filters/
), but this ignores the multi-user nature of Linux, and assumes that nobody else on your computer will ever have a use for your custom filters.
The name of the filter file doesn’t matter as long as it ends in .svg
You can even put multiple filter files into the filters folder if you want.
Once you’ve installed the filter file, you can learn as follows how the filter is constructed. The filter will work just the same if you don’t look into this; these steps are only for your interest:
- Open Inkscape so a blank SVG document appears.
- Draw something in that document. (A rectangle is fine.) Maybe this step isn’t even needed, but it doesn’t hurt anything.
- In the Inkscape menu, choose Filters > Filter Editor…
- Make sure what you created in step 2 is still selected. (Typically, it will have a dashed rectangle around it.)
- In the same Filters menu, select the new filter (00-Custom > rasterize).
- In the Filter Editor, note the definition of the filter:
A. The only effect in the filter (diagram toward the upper right of the Filter Editor) is a Merge whose input comes from Source Graphic.
B. At the bottom of the Filter Editor, click the Filter General Settings tab. The Coordinates have been set to (0, 0) and the Dimensions have been set to (100%, 100%) [shown in the Filter Editor as (1.00, 1.00)] so the filter applies only exactly to the area occupied by the object(s) you select. Filters that do modify the appearance of things are usually designed with Dimensions like (120%, 120%), and we maybe could have left the “rasterize” filter that way, but (100%, 100%) made more sense. The difference has to do with how filters work (a little off-topic here).
Other details about the filter file:
- The underscore before the C in the
inkscape:menu
submenu-name turns the C into a keyboard shortcut, underlined in the Filter menu. - The
inkscape:label
line gives the name of the filter. We left this (“rasterize”) all lowercase as a hint that it’s a custom filter (for example, in the status bar at the bottom of the Inkscape window when a filtered object is selected); the filters that come with Inkscape have capitalized names like “Bloom.” - We could have put a keyboard shortcut in the
inkscape:label
as well (_rasterize), but we didn’t because the underscore will be visible outside the menu too, such as in the status bar or the Filter Editor. - The
inkscape:menu-tooltip
line contains an informative message that appears in the status bar (bottom of Inkscape window) when you mouse-over the submenu item (the “rasterize”). - Probably, some of the filters that come with Inkscape can be set to leave unchanged the appearance of the objects they’re filtering, just like this “rasterize” filter, but it might take a while to find out how to do this, and then the name of the filter would be different than what you’re using it for.
- If you make your own custom Inkscape filters & want them to be in the same Custom submenu, you can use a text editor to copy-and-paste their
<filter>...</filter>
sections, from the SVG file where you first made each filter, to the custom filter file discussed here. The structure of the custom filter file would then look like: (I’ve used X’s as placeholders, and I’ve omitted indentation at the beginnings of the lines; indentation in SVG is for readability, but not mandatory.)
(SVG header)
<defs id="XXXX">
<filter>
(the “rasterize” filter)
</filter>
<filter>
(a custom filter by you)
</filter>
(more <filter>...</filter>
sections if & when you add them)
</defs>
</svg>
If you edit an Inkscape filter file and make a mistake in the SVG syntax (such as unintentionally deleting the prior closing-angle-bracket), the Filters menu might not have your custom filters correctly. To troubleshoot this, you can type “inkscape” (without the quotes) at a command prompt, and Inkscape should show error messages (in the command-prompt window) that may help you find the syntax error.
custom_filters.zip (721 Bytes)
Edit: Those who intend to Like this post, please also notice my post of May 3 (in this same topic/thread) that has an updated version of the filter! Thanks.