growing shapes, script request

Flesh out your ideas for new or improved Inkscape features before submitting a request.
User avatar
Espermaschine
Posts: 893
Joined: Thu Jun 05, 2014 9:10 pm

growing shapes, script request

Postby Espermaschine » Sat May 14, 2016 12:40 am

Can somebody here write an extension/script that does the following thing:

-duplicate selected shape
-add stroke (with specific strokesize)
-convert stroke to paths
-Break apart
-Union
-send to back

repeat n-steps

Simple steps but very tedious to do manually for 10 times plus.
.
Attachments
requesssst.png
requesssst.png (40.89 KiB) Viewed 1274 times

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

Re: growing shapes, script request

Postby Lazur » Sat May 14, 2016 2:16 am

"Inkscape verbs cannot take arguments" so they say... or so Suv says in the #inkscape channel.

But she had added a "reverse" option to the arrange/restack extension, surely it can be useful for this kind of workflow.

By the look of that attached image to me it seems possible redrawing it by interpolate subpaths lpe but probably you already know that.
(Or if aliased edges wasn't a problem you could use a single gradient;
or pattern fills; or a parent and three clones etc.)

User avatar
Espermaschine
Posts: 893
Joined: Thu Jun 05, 2014 9:10 pm

Re: growing shapes, script request

Postby Espermaschine » Sat May 14, 2016 2:46 am

Lazur URH wrote:"Inkscape verbs cannot take arguments" so they say... or so Suv says in the #inkscape channel.

Are you saying this kind of action cant be scripted in Inskcape ? At all ?

But she had added a "reverse" option to the arrange/restack extension, surely it can be useful for this kind of workflow.

I tried using that extension but it didnt work, Dont know why.

By the look of that attached image to me it seems possible redrawing it by interpolate subpaths lpe but probably you already know that.
(Or if aliased edges wasn't a problem you could use a single gradient;
or pattern fills; or a parent and three clones etc.)

Interpolate subpaths ? No, i didnt.
Isnt an interpolation a better idea (i mean the extension), because you can get a gradient color result by using the interpolate style option ?
But this is not really the design i want to do. I want to get increasing circles (or whatever shape), and the increase has to be a specific pixel size.
Thats the whole point of designing. Thats how you would do it on paper.

Im not to keen on the gradient idea.
These suggestions all feel like workarounds.
I was thinking using tiled clones, but you have to do it in reverse (from largest to smallest) to get the right z-order, and that makes things, once again, too complicated.

No idea what you mean with a parent and three clones.

Note to self:
Lets not make this into another Function Plotter moment. Im feeling a tantrum coming up.... :mrgreen:

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

Re: growing shapes, script request

Postby Lazur » Sat May 14, 2016 3:54 am

Espermaschine wrote:Are you saying this kind of action cant be scripted in Inskcape ? At all ?


Yes, that is my understanding of it, you cannot script actions like to use a specific functions of inkscape as per se. But never got into coding so developers may correct me on it any time.


I tried using that extension but it didnt work, Dont know why.


My guess it is a resource heavy action, have to go through large parts of the file, temporarily copy and paste them one after another.
It does work here slowly too.
If run on a selected group of objects it works a bit faster though.


No idea what you mean with a parent and three clones.


The image repeats itself three times, each part rotated 120°. By cloning and clipping, you can set up a scenario where you edit the parent and the result is such "triangular" as a kaleidoscope would be.
(Not a real/regular kaleidoscope which would have a similar symmetry, but the idea is the same. Then you can add vectors/fill pattern/gradient fill to the parent group to draw triangles.)

Still I would try something else for drawing that. Converting strokes to paths is just not right by definition on curved Bézier path segments and join styles have some issues too.

User avatar
Espermaschine
Posts: 893
Joined: Thu Jun 05, 2014 9:10 pm

Re: growing shapes, script request

Postby Espermaschine » Sat May 14, 2016 4:12 am

Idea came up when it tried to recreate this record-label:

http://tinyurl.com/jqxxatf

I think i did a good job, but this could be easier.
And i think if i had to design this from scratch up, i would naturally go with increasing strokes, dont you think ?
I just cant see myself, designing this in some super-planned technique-fest, if you know what i mean.
.
Last edited by Espermaschine on Wed May 18, 2016 5:55 am, edited 1 time in total.

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

Re: growing shapes, script request

Postby Lazur » Sat May 14, 2016 4:59 am

Oh the memories.
Did use a similar method of converting strokes to paths on it, there went the miters.
Theoretically repeated radial gradients -to draw something like that label- could be used
if the radiuses and the gradient handles are chosen right. Hardly ever by accident.

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

Re: growing shapes, script request

Postby Moini » Sat May 14, 2016 5:08 am

It's possible to edit the outset radius of an outset in the XML editor, to get precise outset widths. Would that have helped?
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
Espermaschine
Posts: 893
Joined: Thu Jun 05, 2014 9:10 pm

Re: growing shapes, script request

Postby Espermaschine » Sat May 14, 2016 5:15 am

Lazur URH wrote:Oh the memories.

Yeah, thats a looooooooooooooooooooooooooooooooooooot of work...!

Moini wrote:It's possible to edit the outset radius of an outset in the XML editor, to get precise outset widths. Would that have helped?

Not really. I tried something similar with a dynamic offset and the XML editor, but it was tedious just the same.

After a while i forgot what the current multiple of the stroke size was.
I'd rather be a robot and do the same manual actions over and over again, without any need for math.

Image
Last edited by Espermaschine on Sat May 14, 2016 6:47 am, edited 2 times in total.

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

Re: growing shapes, script request

Postby Lazur » Sat May 14, 2016 5:38 am

Espermaschine wrote:Interpolate subpaths ? No, i didnt.
Isnt an interpolation a better idea (i mean the extension), because you can get a gradient color result by using the interpolate style option ?
But this is not really the design i want to do. I want to get increasing circles (or whatever shape), and the increase has to be a specific pixel size.
Thats the whole point of designing. Thats how you would do it on paper.


If you use the interpolate lpe, converting result to path, breaking it apart, grouping the objects, then interpolate attribute in a group with the extension for getting to different stroke widths works "just as" how the interpolate path extension with the interpolate style option.

User avatar
Espermaschine
Posts: 893
Joined: Thu Jun 05, 2014 9:10 pm

Re: growing shapes, script request

Postby Espermaschine » Sat May 14, 2016 5:52 am

Lazur URH wrote:then interpolate attribute in a group with the extension for getting to different stroke widths

Never used that one before. Will try !

EDIT: too complicated.


Return to “Inkscape Ideas”

Who is online

Users browsing this forum: No registered users and 1 guest