Inkscape.org
Beginners' Questions Is there a way to rotate a segment (two node path) to be parallel to the canvas?
  1. #1
    Sue Zakar Sue Zakar @Shoshanaz

    If I have a simple two-node line at a random angle, is there a way to rotate it with the selector tool so it is horizontal to the canvas?   

    I have not found anything in searches that would suggest that there is, but if there is a technique for doing that, I would like to know.

    My application is to take an arbitrary closed  path and break it down into a series of segments (node tool, break path at selected nodes;  Select tool, break apart)  then I want to have each of these segment horizontal, so they can be lined up without affecting the length.   The roadblock for me is figuring out how to get them horizontal. 

    An example of what I'm trying to accomplish is attached. 

    Bezier Rotation
  2. #2
    Polygon Polygon @Polygon🌶

    Interesting question - at least the Path effect->Measure Segments" will give you the exact segment length if that´s something what you want to know:

  3. #3
    Tyler Durden Tyler Durden @TylerDurden

    Not difficult to do manually, by breaking apart to objects and using the rotation center snap and horizontal guide.

     

  4. #4
    Polygon Polygon @Polygon🌶

    Yes - that is easy - but I guess it's just a simple example and the question goes more towards an automatic way. ;-)

  5. #5
    Sue Zakar Sue Zakar @Shoshanaz

    Thank you, Tyler. That is very helpful.  I agree with Pixelpest that an automated approach would be good for more complex examples.    [My husband actually considered trying to make an extension (he knows Python) but  wasn't able to find enough documentation to figure out how to do it.]

  6. #6
    Sue Zakar Sue Zakar @Shoshanaz
    🏆

    Turns out he figured it out.  If anyone wants an extension for doing this, you can D/L at https://github.com/obzerving/hlines

    It will take any object(s) selected that are composed of straight segments and create horizontal lines from them.

    A single segment object will make a single segment at the horizontal position.

    A path consisting of two or more straight segments will make a single horizontal  path composed of segments the length of each of the original path segments. 

     

     

    Hlines Example
Inkscape Inkscape.org Inkscape Forum Beginners' Questions Is there a way to rotate a segment (two node path) to be parallel to the canvas?