Drawing challenge!

Post questions on how to use or achieve an effect in Inkscape.
tginsandiego
Posts: 8
Joined: Sun May 11, 2014 8:14 am

Drawing challenge!

Postby tginsandiego » Wed Apr 20, 2016 1:32 am

Hey everyone,
I am trying to find the most efficient way to achieve a specific result, so I challenge all you smarter folks to achieve the same result in fewer steps.

I use Inkscape to generate designs for a laser cutter, and very often I want to have a shape in the design outlined. However, whenever the outline also matches any line that is being cut, it is a waste of time to first etch the line, then cut it, so I only want to etch line segments that won't be cut. The attached image should make the result clearer: The left most image is two shapes: a star superimposed on a ring. The middle image shows the desired set of paths: lines to be etched are black, and lines to be cut are blue. The two right-most images show the components split apart for illustration purposes. The cutting shape in blue is absurdly easy to generate: simply union the two shapes, so we won't worry about that at all. Producing the set of black lines to be etched is what I am challenging you to produce.

If you count each operation, such as selection (a mouse click), keyboard, or menu operation as a single step, it takes me 29 steps to create the black lines. Can you show me a process that uses fewer steps? Twenty of my steps are manually selecting and deleting specific segments, so if you can figure out a series of path operations that produces the result without manually having to remove segments, you are bound to be more efficient than I am. You can use the "Undo History" to show your operations, although selections don't seem to be shown in the history, in which case my best step count is 14.

Creating the initial objects does not count towards the step count, so if having a specific fill, stroke setting, or z-ordering makes a difference, more power to you.

Good luck! I will be happy to send an actual laser cut star-in-circle necklace to the winner.

inkscape challenge.png
inkscape challenge.png (88.11 KiB) Viewed 2233 times
Last edited by tginsandiego on Wed Apr 20, 2016 1:50 am, edited 1 time in total.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Drawing challenge!

Postby Lazur » Wed Apr 20, 2016 1:45 am

Hi.

With a little cloning presetting you can get there by drawing a two noded path manually in this specific case -snapping to path intersections enabled, that's two clicks.

tginsandiego
Posts: 8
Joined: Sun May 11, 2014 8:14 am

Re: Drawing challenge!

Postby tginsandiego » Wed Apr 20, 2016 1:53 am

Lazur, You may be correct that it is a fewer step solution to this specific instance. But since the shapes used here only happen to be regular, which is not true of my other artwork, I can't accept that as a solution to the general problem: removing path segments that are in common with the shape produced by union-ing the shapes.
Last edited by tginsandiego on Wed Apr 20, 2016 2:02 am, edited 1 time in total.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Drawing challenge!

Postby Lazur » Wed Apr 20, 2016 1:58 am

Just as I thought. Guess that power was not lost entirely.

Will look into it.

tginsandiego
Posts: 8
Joined: Sun May 11, 2014 8:14 am

Re: Drawing challenge!

Postby tginsandiego » Wed Apr 20, 2016 2:06 am

If the forum alloowed it, I would post a smiley or thumbs-up for your creative solution :-)

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Drawing challenge!

Postby Polygon » Wed Apr 20, 2016 2:40 am

If that´s what you want?
LeftOvers.png
LeftOvers.png (106.44 KiB) Viewed 2197 times


Cheers
P.
Last edited by Polygon on Wed Apr 20, 2016 2:44 am, edited 2 times in total.

dimumurray
Posts: 28
Joined: Sat Feb 27, 2016 2:55 am

Re: Drawing challenge!

Postby dimumurray » Wed Apr 20, 2016 2:41 am

Hmm...let's see

Starting from the shapes on the far left.

- [1 action] duplicate the star shape (ctrl-d)
- [2 actions]break the duplicate shape into line segments (select the shape's nodes and hit the "break path at nodes" tool
- [1 action] enable snap to path
- [20 actions] drag segment end-points (with ctrl+alt to retain line orientation) snapping to circle edges

About 24 steps with that one.

Maybe you can use some of the other boolean path operations like divide to speed things up.

Edit: Polygon hit the nail on the head with using the cut tool

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Drawing challenge!

Postby Lazur » Wed Apr 20, 2016 4:05 am

If you not count deleting the unnecessary segments tedious.
This case it's not a big deal, but what if that could be avoided?


Cheap hack:

  • add a white fill&white stroke&100% opacity to a duplicant of the "circle" -or whatever object may come-
  • set it as a mask to the "star object", and set the star to have 100% opacity, black stroke, white fill
  • export the object over an opaque white background to a raster image
  • use a single line tracer vectorising the raster image
  • import that generated svg

Might need adjustment on the white stroke for the mask, exporting resolution and vectorising settings,
might not be the most accurate but at a decent resolution it can work.

tginsandiego
Posts: 8
Joined: Sun May 11, 2014 8:14 am

Re: Drawing challenge!

Postby tginsandiego » Wed Apr 20, 2016 4:16 am

Lazur -- your suggestion of masking the shape seems to have nailed it! It produces the desired shape in (basically) one step.

I am a little concerned about how the laser cutter driver interprets a masked object - I will run a test to see what happens. Although the clip operation visually produces the line segments desired, the underlying set of nodes (visible if you choose the path editor tool) is actually the entire original shape. If the entire shape is sent to the laser, instead of just the visible segment path, the laser may cut or etch the entire path.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Drawing challenge!

Postby Lazur » Wed Apr 20, 2016 4:53 am

I suppose it needs to be cut, thus the exporting and tracing is necessary.
Because of that I suggested the masking with a stroke added instead of cutting.
That results in slightly longer pieces, and probably results in the tracing more accurate/resulting paths won't stop before reaching the "circle"'s edge. Needs testing with different stroke widths and resolutions.


It is also a suggested solution when you try to "flatten" objects one above another, tracing a raster copy
-like if you wanted to engrave the whole drawing.


Return to “Help with using Inkscape”