gotcha

Author Topic: Moving the rotation point of a line  (Read 690 times)

February 18, 2019, 07:31:27 AM
Read 690 times

Chavadam

  • Jr. Member

  • Offline
  • ***

  • 16
  • Gender
    Male

    Male
Dear all,
My basic drawing is a circle :
*
(9.19 kB . 378x423)
(viewed 169 times)

I want to draw lines as radius (spokes of a wheel), not as diameters (because these radii are not perfectly symmetric in the circle), between two given spokes in the circle (see my picture). When a radius line is drawn, I had like to duplicate it, transform it and rotate it (forty or so).
Issue : I need to move the rotation center of the line object from the center of the bounding box to the middle of the small side of this bounding box (= end of the line) that corresponds to the center of the circle object. Then, duplicate and rotate it N times.
I losed one day, looking for it in Inkscape, Google ... but to no avail.
As you see, a very basic manoeuvre, probably widely needed.

Secundarily :
- How to duplicate and rotate automatically N times such a spoke (from one given start radius to the other one) ?
- When is it necessary to convert an object in a path ? F. i. when one wants to place a snapping node ?

Thanks for trying to help us.
Kind regard.
  • 0.92.3
  • Windows 7 Pro / 64 bis
"Oh yes, just one more thing, please" (Columbo)  :duh:

February 18, 2019, 02:40:30 PM
Reply #1

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

Rotating copies can be automated theoretically but you are limited by a few digits to type into the spinbox of the rotation angle thus with each copy the error adds together.

Other option would be based on the circumference -divide it into equal long parts.
There are a few oprions to do so. Theoretically the divide path segments could be used but if you want to generate like 39 copies it probably wouldn't work.

There are ways to use a pattern along path path effect, which may give you more satisfactory results.


However I'd much prefer using the *-tool to draw polygons. Spokes/nodes are as perfect positioned as they can be.

February 19, 2019, 09:20:06 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
There are a few ways to approach this.  It could be done with radially tiled clones, in Edit menu > Clones > Tiled Clones.  But that would require more time learning that technique.  So I'll tell you how I would do what you're asking.

1 -- Draw one radius line.
2 -- Move the rotation center and snap it to one end of the line.  (Let me know if you need info on Snapping?)
3 -- Snap the line to the center of the circle.  (The end of the line where the rotation center is, needs to snap to the center of the circle.)
4 -- Object menu > Transform > Rotate -- this is to set the angle for the first radius line

5 -- Duplicate
6 -- Object menu > Transform > Rotate -- change the angle, and set it for the angle in between radii

7 -- Repeat #5 and #6 until finished

For step #7, even though you need to do it 40 times, it should go very fast.  I don't know whether you prefer a key shortcut for Duplicate, or the button on the command bar.  I use the button, so for me, it's -- click Duplicate, click Apply button in Rotate dialog, duplicate, rotate, duplicate, rotate.  It really goes very fast.

However, if you wanted to do some math, you could probably do it something like 10 times.  Then group those 10 radii.  Then rotate the group of 10, 4 times.  I'm not sure what angles you're using, or I could probably do the math for you.  But personally, by the time I figure out the math to do this shortcut, I could have finished with the 40, going one at a time.

Honestly, if it were more than 40 or 50, I would take the time to learn the tiled clones technique.  Help menu > Tutorials > Tips and Tricks

Wow, really curious what Lazur is thinking with pattern along path  :)

Edit
There's another way, using one of the LPEs.....  Oh yeah, this tutorial uses the Ruler LPE:  http://goinkscape.com/how-to-create-a-tachometer-in-inkscape/
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 19, 2019, 09:20:56 AM
Reply #3

Chavadam

  • Jr. Member

  • Offline
  • ***

  • 16
  • Gender
    Male

    Male
Hello Lazur,
Thanks for your reply.

You wrote :
- "... limited by a few digits to type into the spinbox of the rotation angle, thus with each copy the error adds together." : I understand.
- " ... Theoretically the divide path segments could be used but if you want to generate like 39 copies it probably wouldn't work." : I can imagine.

- "... using a 48 sides polygon"
The issue is that I start from two spokes in the circle
- whose angles are symmetric with respect to a vertical line,
- but often of different value and in a wide range, circle by circle.
Drawing a polygon of each time 48 equal sides in the place of the large part of the circumference - starting at the intersection of one of the two spokes with the circle and ending at the intersection of the other spoke with the circle - is unfortunately mandatory, due to physical constraints.
In fact, in much cases, the number of equal sides (on the whole circumference > 48) shoud be an entire number only exceptionally.

Incidentaly :
To to remove a section of a circunference object [The little sector between the two intrsections of the spokes], which are the constraints ?
- Converting firstly the circle object into a path ? Then using the knob "Delete segment between two non-endpoint nodes" ?
- How to make sure that it will not be the large sector that will be removed ?

Many thanks for your help.
  • 0.92.3
  • Windows 7 Pro / 64 bis
"Oh yes, just one more thing, please" (Columbo)  :duh:

February 19, 2019, 09:25:07 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Looks like we posted almost at the same time.  You probably didn't see my message before you posted yours.  Just to make sure you see it  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 19, 2019, 09:42:25 AM
Reply #5

Chavadam

  • Jr. Member

  • Offline
  • ***

  • 16
  • Gender
    Male

    Male
Hello Brynn,
Indeed, we posted almost at the same time.

Transform, rotate and apply ... manually a 40th time, is what I made when I followed your advises regarding 'A wind compass in a circular rule' https://forum.inkscapecommunity.com/index.php?topic=1496.new#new
I understand this manual and repetitive technique. But it was applied to diameter lines, whose center fitted to the center of the circle. As you see, I played already with different aspects of 'snapping'.

My main issue here is the point 2 of your explanation : I did not succeed to move the rotation point of a line object from the center of the bounding box to the exact middle of a little side.

Thanks again.
  • 0.92.3
  • Windows 7 Pro / 64 bis
"Oh yes, just one more thing, please" (Columbo)  :duh:

February 19, 2019, 09:49:47 AM
Reply #6

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
I'm not sure what you mean about "exact middle of the little side".  I'm not sure what the "little side" is.

I can make you a quick video, just a little later....within the next half hour.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 19, 2019, 10:08:26 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Here's how I would make the radius, and snap it to the center of the circle.

First, be sure to set the snap control bar properly, like in the video.

Also notice that it's almost impossible -- well, at least it is for me, to grab the rotation center when the line is perfectly horizontal (or vertical).  So I have to rotate it, to be able to grab the rotation center.  Then just drag it to the end, and it will snap (if the control bar is set correctly).

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 19, 2019, 03:28:46 PM
Reply #8

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Ok so if I can understand you want to divide the arc into equal lengths and draw a radii in each of them.

That's what I'd do exactly.
Select the arc, run the extension/modify path/add nodes extension, then
duplicate the path (Ctrl+D).
Select both, and run the extensions/generate from paths/extrude extension, drawing lines.
Select these lines, and with the node tool (F2) select the end nodes which are placed at the duplicant path's nodes,
and use the align and distribute panel (Shift+Ctrl+A) to align the nodes on a horizontall and then on a vertical axis -this will snap them to the same coordinate.

Then all you have to do is move these selected nodes and snap them to the desired position in the origo.

February 20, 2019, 02:55:03 AM
Reply #9

Chavadam

  • Jr. Member

  • Offline
  • ***

  • 16
  • Gender
    Male

    Male
Hello Brynn.
You wrote "I'm not sure what you mean about "exact middle of the little side".  I'm not sure what the "little side" is."
I took a non vertical nor horizontal spoke. This time, I succeeded easily to catch the rotation center and to drag it at one end of the spoke line.  You are right, there is no question of "little side". Just forget my mistake.
Sorry and thanks for your time to make a little video.

Hello Lazur,
I made a test with a rotate angle with 3 decimals. The precision is satisfactory. So I don't have to apply a polygon technique.

I got the desired drawing of cône development :
*
(20.5 kB . 378x406)
(viewed 133 times)


It remais my secundary question about breaking a circle into a small + a large arc, to discard the small one.

Many thanks to both of you.
  • 0.92.3
  • Windows 7 Pro / 64 bis
"Oh yes, just one more thing, please" (Columbo)  :duh:

February 21, 2019, 02:47:06 AM
Reply #10

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
With the Ellipse tool, you can draw arcs.  After you drag out the circle, notice that there are 2 tiny square handles and one tiny circle handle.  If you grab the tiny circle and drag, you can see that it creates anything less than a complete circle.

As you drag, if you keep your mouse outside of the circle, it makes something more like wedges.  If you keep your mouse inside the original circle, it makes arcs.  Or, on the control bar are buttons where you can switch from wedge to arc.  And you can also set the precise angle for those items on the control bar.

But, if it's too late for that, and you already have a path, here's how you can cut the circle.  Draw another path on top, where the new path crosses the circle where you want it to be cut.  Or you can use another Ellipse or Rectangle shape.  If you draw the path, be sure to close the path (no open ends, a closed shape).  (Yeah, this is one of those things that takes 10 times longer to explain than it does to actually do it!)

Then select the original circle and the new path or shape.  Then Path menu > Cut Path.

It might not look like anything happened, but it has.  Now you should be able to select the part you don't want, and delete it. 

I could make a quick video, if you like.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

February 23, 2019, 11:47:33 PM
Reply #11

Chavadam

  • Jr. Member

  • Offline
  • ***

  • 16
  • Gender
    Male

    Male
Good day, Brynn.
Do'nt spend time to make a quick video because your explanation is very understandable. I think that the topic is closed. Thank you for everything.
  • 0.92.3
  • Windows 7 Pro / 64 bis
"Oh yes, just one more thing, please" (Columbo)  :duh: