Mobile app version of vmapp.org
Login or Join
Michele215

: Inkscape: Position a circle by its center and not the bounding box Is it possible to position a circle in inkscape using the center? I'm designing a shape for a laser cutter and the circles

@Michele215

Posted in: #Inkscape

Is it possible to position a circle in inkscape using the center? I'm designing a shape for a laser cutter and the circles are to outline mounting holes. Each hole is around 3.2mm.

I know one way is to just subtract the radius whenever positioning them. But I've got a large number of holes and it will increase the chances of error greatly (Instead of positioning at (14,14), I'll be positioning it at (12.4,12.4).

This is the only thread I could find on this topic and sadly doesn't have an answer. Does anyone know if there's any way to do this?

EDIT: Just to clarify, I want to be able to position the holes exactly using the x and y values using the lower left hand corner of the sheet as the origin.

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Michele215

5 Comments

Sorted by latest first Latest Oldest Best

 

@Frith110

As of Inkscape 0.92.2, a control point is placed at the center of circles, allowing the center to be snapped to a grid intersection point or other features. See this video for a brief demonstration.

10% popularity Vote Up Vote Down


 

@Turnbaugh909

Others have covered your origin point problem quite well.

To position objects by their centre, you should


draw horizontal and vertical construction lines that intersect at the circle centres. Initially, just draw them as constrained lines (ctrl + draw), then set the coordinates in the box at the top of the screen
Draw your circles at the right size, again using the coordinates at the top. It might be quicker to create one, then duplicate it.
Enable Snapping, particularly to path intersections () and object rotation centres ().
Drag your circle to the intersecting construction lines, and its centre will snap to the precise intersection.


Don't forget to set Tools / Geometric Bounding Box in Preferences to get the objects the ‘right’ size; if you use the default Visual Bounding Box, your object size takes line width into account. You might not want this, though even laser cutters have a kerf width …

10% popularity Vote Up Vote Down


 

@Alves566

If you have lots of circles and like to position them by value, counting distances from bottom up, you should probably use a scripting language or a spreadsheet program like LibreOffice-Calc or Excel, a classical text editor with extendet search-replace engine or a combination of those.

Probably you have the values already in an easy machine parsable form like a plain list of values (x, y, radius).

Then you can subtract the y-value with a formula from the pagesize. Or you create them and flip your drawing in the end vertically.

In an editor, you may use very basic SVG-code to define a circle:

<circle cx="50" cy="50" r="40" stroke="none" fill="red" />


After opening it with inkscape and saving it, it will be transformed to a much more complicated format, with relative coordinates. But from a table of values in a CSV file you can easily produce hundrets of circles (I did so).

So you can save an empty SVG file, insert your circles with an editor before the closing tag, reopen it with inkscape and edit it further as needed.

10% popularity Vote Up Vote Down


 

@Heady304

Create

To draw a circle centering a starting point rather than within a box we can press Shift while drawing. For square ration (cicrle rather than ellipse) we can press Ctrl in addition.

To help starting at a specific node we may enable snapping to cusp nodes or to a grid.

Move

To move a circle by its center we need to temporarily transfrom it to an arc (in path mode drag the round arc handle). We can then snap the circle's center to e.g. cusp nodes, or to a grid by dragging the circle from its center.



The arc can then be transformed to a circle again by clicking "make whole" () when in path mode.

Manually edit x/y-position

To manually edit the precice circle center position we have to select an object to then open the XML-editor (ShiftCtrlX) where we can freely edit the center values cx and cy by giving any value and then press set.

10% popularity Vote Up Vote Down


 

@Turnbaugh909

This is sort of a makeshift solution but it may work for you.


Create a bunch of equally identical circles (e.g., all with a diameter of 3.2 mm).
Position them without offset wherever you want a hole.
Select all circles and move them so they are correctly positioned (e.g., by 1.6 mm in each direction), using object → transform → move. To ease selecting the circles and avoid missing one, you can create the circles in their own layer.
If you want some circles to have a different size, either use object → transform → scale (which preserves the centre) or create a correctly sized circle and use the existing one to position it using the align and distribute tab.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme