Spawning a clone of a path on click ?

Post questions on how to use or achieve an effect in Inkscape.
Red_Platypus
Posts: 4
Joined: Tue Oct 25, 2016 12:21 am

Spawning a clone of a path on click ?

Postby Red_Platypus » Tue Oct 25, 2016 12:38 am

Hello everyone.

I'm facing a situation where I need to clone a great number of times a small path (roughly similar to a dot). I need to keep a precise control on the position of each "dot", so I cannot just spray them randomly with the spray tool. What I'm doing right now is dumb ctrl+v, which lands a copy of the "dot" on the cursor position. This is neither very comfortable nor efficient. I learned about the clone function, but ctrl+d then dragging is just unpractical. I tried to do something with the spray tool :tool_spray : I thought that reducing "amount" to 1, "Scatter" to 1 and width to object width would allow to spawn a single cloned "dot" where I want on click, but no it produce nothing like that.

Is there a way to achieve this: spawning a clone of a path on click ?

Cheers !

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Spawning a clone of a path on click ?

Postby Moini » Tue Oct 25, 2016 1:08 am

How about the stamping? Grab the original, and everywhere where you hit the space bar, it will drop a copy (not a clone, though).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Spawning a clone of a path on click ?

Postby prkos » Tue Oct 25, 2016 1:16 am

To add to Moini's reply, you can clone the original the usual way, and then stamp the cloned object instead of the original to create a bunch of them, they will all be linked to the same original.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Spawning a clone of a path on click ?

Postby Moini » Tue Oct 25, 2016 1:24 am

Even better :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

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

Re: Spawning a clone of a path on click ?

Postby Lazur » Tue Oct 25, 2016 3:03 am

Wouldn't making a custom pattern fill from the shape work?
Because that is the most efficient way of generating a repeating pattern.

Red_Platypus
Posts: 4
Joined: Tue Oct 25, 2016 12:21 am

Re: Spawning a clone of a path on click ?

Postby Red_Platypus » Tue Oct 25, 2016 6:48 am

I will try the "space bar" stamp tomorrow, I did not knew about that. It seems somehow similar to ctr+c and then dropping duplicates with ctr+v.
I don't use a custom pattern because it is not a pattern, I'm reproducing an apparently randomized distribution of microscopic structures from the skin of an insect. The resulting distribution need to be identical from the original. So no repeating pattern, and no random spray on which I have no precise control ;-)

Thank you for the tips !

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Spawning a clone of a path on click ?

Postby prkos » Tue Oct 25, 2016 1:42 pm

Copying and pasting will position the object at the mouse pointer. But with stamping you can use Ctrl to constrain the position, or even without constraints it's just so convenient and super fast to get to the desired result - position, stamp, move to a new position, stamp, move to a new position, stamp...

You can also use grid and snapping to be very precise when positioning, so you don't have to adjust anything later, like you'd have to with copy-pasting.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Red_Platypus
Posts: 4
Joined: Tue Oct 25, 2016 12:21 am

Re: Spawning a clone of a path on click ?

Postby Red_Platypus » Tue Oct 25, 2016 5:54 pm

OKay, I will need some more explanations :D

Hitting space bar allow to pan the canvas and I did not found any tools named stamp or behaving like you described. Am I missing something ? Is it a special property of effect ?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Spawning a clone of a path on click ?

Postby prkos » Tue Oct 25, 2016 8:05 pm

Stamping is just a keyboard shortcut for duplicating, you grab an object with your mouse and while it's being held like that, whenever you press Space a duplicate of the object is created right in that location. You still keep holding on to the original object with your mouse, just continue pressing Space when you want to create another copy.

A short description is found on this page:
https://inkscape.org/en/doc/tips/tutorial-tips.html
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Red_Platypus
Posts: 4
Joined: Tue Oct 25, 2016 12:21 am

Re: Spawning a clone of a path on click ?

Postby Red_Platypus » Tue Oct 25, 2016 11:12 pm

Ok I see, I missed the "drag object" part. Thank you !

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Spawning a clone of a path on click ?

Postby hulf2012 » Tue Oct 25, 2016 11:28 pm

Hello
I have to say that for Inkscape 0.91 it's harder to do this trick, because now "spacebar" is used to pan the canvas. But "stamp" it's still possible as it's explained in the previous link posted by prkos. In my case, the trick i do is first drag the object and then the space bar, close to the point when I want the stamp appear.

I also think maybe using a pattern along path or the "scatter" extension could work. But I'm not sure. If possible I'd like to say some image samples or a svg file to see what is going on. But it's my personal opinion.

Greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.


Return to “Help with using Inkscape”