Snap to grid in Draw

How can cirular objects with different diameters be snapped
to the grid by their centre point?

You can draw from the center holding Alt.

Do you need to snap to the grid the shapes once created? Please, click edit below your question to add more information. Add Answer is reserved for solutions.

Yes. The question is about existing circular shapes.
How to snap them to the grid in order that their
centre coincides with the grid.

The main concern of the question seems not to be the snap feature, but the positioning of shapes regarding the center instead of the (default) top-left corner.
You may find a way to express this also in the subject (short form of the question) to help users searching solutions for similar tasks to find this thread.
My answer doesn’t mention the term “circular object” because I don’t think there’s a way to distinguish “circular” objects (shapes in Draw) reliably. Any shape’s size and position are described by rectangles, however, and rectangles always have center (of symmetry). To decide if a curve has a central symmetry by a routine would be rather complicated, and next to useless. The user will know what obejcts the routine to apply to.
Applied to a circel or an ellipse this will meet your expectations.

I can’t find an answer that implies moving with the mouse (or equivalent). So I share a workaround:

  • Select the shape
  • Open the Position and Size dialog: press F4 or choose menu Format - Position and Size…
  • Select Position and Size tab
  • Set Base point: position to center
  • Type Position X: and Position Y:
  • OK

image description

If there are many shapes that need to be aligned to the same point, you can select them all, choose menu Shape - Aling - Centered and menu Shape - Aling - Center, then change the position for them all at once.

Just finded a related question.


Add Answer is reserved for solutions. If you think the answer is not satisfactory, add a comment below, or click edit (below your question) to add more information. Thanks.

Check the mark (Answer markCorrect answer mark) to the left of the answer that solves your question.

If the answer helped you, you can mark the up arrow (Upvote mark) that is on the left (to vote, you need to have karma of at least 5).

Aligning by Position & Size is fine for singular shapes.
My question is related to using the snap mechanism to move circular shapes by means of the mouse so as to have them snap their centre point to the grid.
Thanks for the hint to a related question.
So I obviously will have to continue to attach an invisible circle of a suitable diameter around every original one and to form a group of both.

I added a comment in the related question that could help a bit.

I don’t know a way to get the snap feature to let shape centers snap in.
I can tell you what I did if I had to postion shape centers on a regular basis in Draw.

-1- Enable >Tools>Options>LibrOffice Draw>>Display>>>Helplines while moving.
-2- Move my shape with the top left corner of its FrameRect to the position where I finally want its center to be positioned.
-3- Call a little macro moving the center to that point.

The macro might read:

Sub moveCenterToTopLeft()
On Error Goto fail
doc = ThisComponent
shape = doc.CurrentSelection(0)
shFr = shape.FrameRect
shPos = shape.Position
shPos.X = shPos.X - shFr.Width / 2
shPos.Y = shPos.Y - shFr.Height / 2
shape.Position = shPos
fail:
End Sub  

I would connect it to a toolbar area and/or to a keyboard shortcut.
See this example: ask285199centerShape.odg

Thanks for your help including the macro.
The snap feature was very much the main concern of my question - in context with the centre point.
Thanks to all offered workarounds.

Draw does not allow to snap shapes to the grid by their centre point.
But there are workarounds.