0

I wish to create a watch index picture with Inkscape.

I know I can use LPE's Rotate copies function, but somehow I can't find the correct values.

I wish to rotate this little red rectangle at 30 degree:

enter image description here

Facts:

  • Image is in pixel unit everywhere.
  • This bar is roughly 4*10px
  • This bar's center point is exactly at x=225, y=4.
  • I wish to have 12 copies (technically 12 bars, so 11 copies)
  • I wish to have the 6th bar positioned at exactly x=225, y=221.
  • There is a guide at 225 on both horizontal and vertical axis

I tried creating 12 copies, but it's not getting rectangular shape:

enter image description here

Not to mention, that origin is pretty weird to reach this result:

enter image description here

How can I do this better?

3 Answers 3

2

Instead of using the path-effect, you can try the 'Object → Align and Distribute...' panel switched to the 'Circular' tab.

Just manually make duplicates of your object (or make one clone with Alt + D and duplicate that – exclude the original when arranging), then either add a circle-object to your selection or enter the parameters into the dialog and click 'Arrange'.

'Align and Distribute' panel example

The reason why the 'Rotate Copies' path-effect wasn't working correctly is probably because you resized your object in a way that added a transform-attribute.

When you use the scale-handles in select mode on an object that has a filter applied (or just move the object, which is why the origin was acting "weird" too), instead of manipulating the object directly, it sets the new scale as a transform, which influences path-effects as well:

Path-effect affected by the 'transform' attribute

If you scale the object before applying the blur, or use the tool corresponding to the object type (rectangle tool for rectangles, node tool for paths, etc.), you manipulate the object directly and avoid setting a transform.

enter image description here

8
  • What do you think, why path-effects are not working?
    – Daniel
    Dec 10, 2022 at 20:56
  • @Daniel You probably scaled the original object in a way that added a transform-attribute, meaning the path-effect was stretched as well.
    – Xrott
    Dec 10, 2022 at 21:08
  • @Daniel The Rotate Copies LPE is certainly working. see example. Not sure what is wrong with your example.
    – Billy Kerr
    Dec 10, 2022 at 22:20
  • @Xrott: if I do this with text, can I somehow control the starting angle? (I created a text "60" at 12, and copied it (05,10,15,20,25,30,35,40,45,50,55). Your recommended method can arrange these texts, however 60 is now at 3, i.e. 90 degrees rotated during arrange. Can I prevent that?
    – Daniel
    Dec 11, 2022 at 10:17
  • @Daniel You can't rotate the placement of numbers without rotating the characters. Just place them manually. It will be easier.
    – Billy Kerr
    Dec 11, 2022 at 13:52
0

Use the LPE Rotate Copies effect.

  1. Draw a short line using the pen tool, and apply a stroke to it

  2. In the Effects Panel, click the + button to add a new Path Effect

  3. In the LPE Selector, choose the Rotate Copies LPE

enter image description here

You will get something like this

enter image description here

  1. Switch to the Edit Paths by Nodes Tool N

  2. Click and drag the centre origin control, holding down Ctrl as you drag will constrain the move vertically

enter image description here

  1. In the Path Effects panel, set the number of copies to 12

enter image description here

  1. If you want to add a blur, add it in the Fill and Strokes panel

enter image description here

0

I tried the solution "Align and Distribute...", but Inkscape 1.2 crashed. A very powerful solution is the following way. Install the extension "Simple Inkscape Scripting", see https://inkscape.org/~pakin/%E2%98%85simple-inkscape-scripting

Write a simple program like the following one:

import math
canvas.true_width = 390
canvas.true_height = 390
canvas.viewbox = [0, 0, 390, 390]

x_c = 195
y_c = 195
r_max = 195 
circle((x_c, y_c), r_max, fill='#000000', stroke_width=0)

r = r_max - 14
r_minute = r - 4

for m in range(60):
    if m % 5 != 0:
        w = m * math.pi / 30
        x = x_c + int(cos(w) * r_minute)
        y = y_c + int(sin(w) * r_minute)
        circle((x, y), 2, fill='#ffffff', stroke_width=0)

r1 = r_max - 50
for m in range(12):
    w = m * math.pi / 6
    x1 = x_c + int(cos(w) * r1)
    y1 = y_c + int(sin(w) * r1)
    x2 = x_c + int(cos(w) * r)
    y2 = y_c + int(sin(w) * r)
    line((x1, y1), (x2, y2), stroke='#ffffff', stroke_width=4)

So you have full control. This simple example results in the following watch face:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.