How to transform a rectangle into a segment?

Post questions on how to use or achieve an effect in Inkscape.
Nike987
Posts: 9
Joined: Sat Jan 23, 2016 4:34 am

How to transform a rectangle into a segment?

Postby Nike987 » Mon Jul 23, 2018 6:29 pm

Hello all!

I have a rectangle. I need to transform this rectangle into a segment.
Is it possible with a built-in function of the Inskape software?

An example of a rectangle and a segment is attached.
Attachments
reg_seg.svg
(2.54 KiB) Downloaded 163 times

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

Re: How to transform a rectangle into a segment?

Postby Polygon » Mon Jul 23, 2018 6:55 pm

Hi.
There are a few possibilities. The easiest and fastest seems LivePathEffect (LPE) Bend to me:
Bend.gif
Bend.gif (183.34 KiB) Viewed 1578 times

Or just manually adjustment via node tool:
ManualBend.gif
ManualBend.gif (110.29 KiB) Viewed 1577 times



Cheers

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

Re: How to transform a rectangle into a segment?

Postby Moini » Mon Jul 23, 2018 9:51 pm

To get a more correct segment (if you need it), you could create a circle with a very wide stroke, then use the round handles to make the circle into an arc of the necessary size, then do Path > Object to path.

This will not transform the rectangle, though, but create a new one - not sure if that will help, as I don't know what you need it for.
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)

Nike987
Posts: 9
Joined: Sat Jan 23, 2016 4:34 am

Re: How to transform a rectangle into a segment?

Postby Nike987 » Tue Jul 24, 2018 1:19 pm

Polygon, thank you, the second tip for me.

Moini,
Could you please give an idea of how to be in a common case when a rectangle includes some additional elements?

I have tried to create the sector of a circle,
I need to inscribe (with a stretch in the bottom part and a compression of the top part) the rectangle into the sector.
Attachments
reg_seg.svg
(60.92 KiB) Downloaded 150 times

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: How to transform a rectangle into a segment?

Postby druban » Tue Jul 24, 2018 4:58 pm

I should think the quickest and most accurate and flexible method is pattern along path, note the settings in the box, follow instructions for the path effect by copying the rectangle to clipboard first, then select the circle then choose path effect please note the circle will vanish the circle you re seeing here is a copy made for explanatory purposes
Not to be pedantic but manually or using the bend does not assure that the two sides are on radii of the circle or that the inner and outer curves have a common center
pop1.png
pop1.png (31.26 KiB) Viewed 1505 times
Your mind is what you think it is.

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

Re: How to transform a rectangle into a segment?

Postby Moini » Wed Jul 25, 2018 1:15 am

^ Didn't think of that, but it's true. Only it won't work if the path is actually a group (only works with single paths) - one would need to combine, and later break apart again, to be able to fix colors etc of the contained objects. Or one would need to have multiple paths, and put each object on a separate path.

For your example, Nike, druban's suggestion is the best way to do it. It's really easy:

https://youtu.be/7O4j0tGa3QI

(only when I used undo at some point Inkscape crashed. Save often!)
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)


Return to “Help with using Inkscape”