I need to programmatically offset and expand a path P for a laser cutter. I first add a stroke to path P (adding stroke:"5px"; in the text), then use "stroke to path" to make S (command-line: inkscape --verb StrokeToPath), concatenate the resulting text with the original path P, select P and S and unite them (inkscape --verb EditSelectAll --verb SelectionUnion).

Does anyone know of a faster and simpler way?

  • Can I ask why you need a faster way or are you asking if this is a viable way to do what you want? – Pinback Jul 4 '18 at 11:51
  • @Pinback I am writing a script to manipulate these paths. Aside from callouts to Inkscape, the script would take a few seconds to run. But callouts to Inkscape take a few seconds each. The question has three callouts to Inkscape: generating path P, generating path S, and uniting them. I can do it in two callouts with a "dynamic offset": callout once to generate P, change the property "inkscape:radius" in the text, and callout again to run "Object to Path". I am looking for a way to expand with a single callout, which would cut my script time in 3. – mmorin Jul 13 '18 at 14:43
  • As I understand it - you are using a text object, then duplicating it and converting the duplicate into a stroke outline with no fill at of a given size? – Pinback Jul 13 '18 at 16:10
  • Yes, I start with a text object and duplicate it. I expand the first copy with "Object to path" and the second with "Stroke to path", then I unite them both. The total is three callouts: object to path, stroke to path, and union. – mmorin Jul 13 '18 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.