Is it possible to get (or set) the object origin for objects and object groups?
My intented use is I have some rectangles where I want to set their origin to exactly the rectangles most left or most right edge. Then I want to place the rectangles left or right edge on the center of a circle object, such that the rectangles origin is exactly on top of the circles origin. This way I can then use transformation to turn the rectangles in an exact manner just like clock displays on a watch. The circles center of origin also needs to snap to a grid.
How to get object center coordinates?
Re: How to get object center coordinates?
You can use the 'Polar coordinates' tab of the arrange dialog to place objects along circles, if that is your goal. There you can select which part of the object should be the point that is 'fixed' in relation to the circle. (Usage isn't so easy, you might need to play around with it a bit)
To make things snap to a certain point, you can use the object's or the group's rotational center, which you can move freely and snap to.
To make things snap to a certain point, you can use the object's or the group's rotational center, which you can move freely and snap to.
Last edited by Moini on Sat Feb 06, 2016 1:15 am, edited 1 time in total.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to get object center coordinates?
You can set the rotational centre of the bounding box that can work as an origin in some cases.
Like you can snap to that point too.
(Personally I use spacer objects, grouped temporarily with the object to be transformed instead mostly.)
Like you can snap to that point too.
(Personally I use spacer objects, grouped temporarily with the object to be transformed instead mostly.)
Re: How to get object center coordinates?
Hello
Yes it is possible to change the rotation center of an object
http://tavmjong.free.fr/INKSCAPE/MANUAL ... tionCenter
Hope it Helps
Greetings
Yes it is possible to change the rotation center of an object
http://tavmjong.free.fr/INKSCAPE/MANUAL ... tionCenter
Hope it Helps
Greetings
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
- Espermaschine
- Posts: 892
- Joined: Thu Jun 05, 2014 9:10 pm
Re: How to get object center coordinates?
If OP wants to arrange rectangles like a clock, tiled clones i also a good option, imo.
Re: How to get object center coordinates?
Moini wrote:You can use the 'Polar coordinates' tab of the arrange dialog to place objects along circles, if that is your goal. There you can select which part of the object should be the point that is 'fixed' in relation to the circle. (Usage isn't so easy, you might need to play around with it a bit)
To make things snap to a certain point, you can use the object's or the group's rotational center, which you can move freely and snap to.
Thank you. Arranging an object on a selected circle does work but unfortunately it does not include moving the object along the circle circumference; so no "angle movement" so to speak. Using the "parameterized" option (which include some angle manipulation) unfortunately makes Inkscape crash everytime with this error:
Code: Select all
(inkscape.exe:5820): glibmm-ERROR **:
unhandled exception (type std::exception) in signal handler:
what: lib2geom exception: Non-contiguous path
(src/2geom/path.cpp:386)
** WARNING (recursed) **: SPObject::updateDisplay(SPCtx *ctx,
unsigned int flags) : throw in ((SPObjectClass *)
G_OBJECT_GET_CLASS(this))->update(this, ctx, flags);
Re: How to get object center coordinates?
hulf2012 wrote:Hello
Yes it is possible to change the rotation center of an object
http://tavmjong.free.fr/INKSCAPE/MANUAL ... tionCenter
Hope it Helps
Greetings
Thank you. I know how move the origin and how to snap it but unfortunately it's not possible to move the object at the same time that you snap the origin to grid. I need it so that when I move the origin and snaps it to a grid the object should move with it (such that the local origin coord relative to the object is preserved, only the global origin coord is changed the same as the object itself). I guess what I want is basically moving and snapping the object using the origin.
EDIT: ok, figured out resetting origin to center is easily done according to the manual like this: Holding the Shift key down while clicking on the Rotation center handle will restore the handle to the center of the bounding box.
Re: How to get object center coordinates?
Using the "parameterized" option (which include some angle manipulation) unfortunately makes Inkscape crash everytime with this error:
Looks very similar to this error: https://bugs.launchpad.net/inkscape/+bug/1460448
Have you maybe been trying to arrange a single object? That is what causes the crash for me. The dialog currently needs at least two selected objects to work properly.
Arranging an object on a selected circle does work but unfortunately it does not include moving the object along the circle circumference; so no "angle movement" so to speak.
Can you make a drawing about what you mean by this? The 'polar coordinates' dialog allows you to align all selected objects, with regular distances between them, along a circle or arc circumference, with or without rotating them. I'm not sure what you mean by 'moving'.
The start point of the circle, its direction and the selection order of the items you want to arrange determine where each object will end up in the process.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to get object center coordinates?
In this video I show what I want to do. As you can see it's inefficient. I try to place two objects origins on top of each other, but I can only get so close doing it visually.
https://www.youtube.com/watch?v=854hKvA ... e=youtu.be
https://www.youtube.com/watch?v=854hKvA ... e=youtu.be
Re: How to get object center coordinates?
Turn on snapping to objects' rotational center, toxi, 5th button from bottom in snapping toolbar. Then you can also snap the rotational center to the middle of the bounding box border.
Tiled clones appear to be the best solution for this case, though, after you have snapped the rotational center to the middle of the bounding box border. See the starburst example from Espermaschine: viewtopic.php?f=6&t=21708&hilit=recipe#p79143
Edit: added image
Tiled clones appear to be the best solution for this case, though, after you have snapped the rotational center to the middle of the bounding box border. See the starburst example from Espermaschine: viewtopic.php?f=6&t=21708&hilit=recipe#p79143
Edit: added image
- Attachments
-
- Bildschirmfoto_2016-02-07_01-16-54.png (15.93 KiB) Viewed 5233 times
Last edited by Moini on Sun Feb 07, 2016 10:17 am, edited 1 time in total.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Re: How to get object center coordinates?
Hello again.
I think what you are trying to do has many ways to achieve. I also think you already have the Inkscape's skill to do it. As Moini pointed, you can use the snapping icons and the align dialog. Sooner or later, you will find the method that fits you needs.
You can use auxiliary objects or guides that help you to align the objects in the position you want.
Some time ago, (If memory doesn't fail me, it was Lazur) it was noted that the circles represented by Inkscape, since they are drawn with bezier curves, are not perfect.
I said this because perhaps you want to have perfect measures for your artwork. Instead of a circle use a polygon.
Are you trying to draw the wheel of a boat
I think what you are trying to do has many ways to achieve. I also think you already have the Inkscape's skill to do it. As Moini pointed, you can use the snapping icons and the align dialog. Sooner or later, you will find the method that fits you needs.
You can use auxiliary objects or guides that help you to align the objects in the position you want.
Some time ago, (If memory doesn't fail me, it was Lazur) it was noted that the circles represented by Inkscape, since they are drawn with bezier curves, are not perfect.
I said this because perhaps you want to have perfect measures for your artwork. Instead of a circle use a polygon.
Are you trying to draw the wheel of a boat

If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: How to get object center coordinates?
Moini wrote:.
Tiled clones appear to be the best solution for this case, though, after you have snapped the rotational center to the middle of the bounding box border. See the starburst example from Espermaschine: viewtopic.php" onclick="readonly();return false;"smilies" src="images/smilies/icon_question.gif" alt=":?:" title="Question" />
Actually I want to create a circular labyrinth

Re: How to get object center coordinates?
Good!
If it helps, there is an extension that makes polar grids:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... -PolarGrid
Also, googling it I've found a Maze Generator:
http://www.mazegenerator.net/
which exports to pdf, but It can be edited on Inkscape
correction: it also exports to SVG. It has some kind of "free for non-commercial" license of use
If it helps, there is an extension that makes polar grids:
http://tavmjong.free.fr/INKSCAPE/MANUAL ... -PolarGrid
Also, googling it I've found a Maze Generator:
http://www.mazegenerator.net/
which exports to pdf, but It can be edited on Inkscape
correction: it also exports to SVG. It has some kind of "free for non-commercial" license of use
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.
Re: How to get object center coordinates?
toxigames wrote:Actually I want to create a circular labyrinth
Oh the memories.

But are you saying that the circles are not perfect circles?
Not a programmer myself but if you convert a circle object to a path it used to generate 4 noded paths in 0.48
-where the circle object wasn't implemented, and ellipse objects were in use instead-.
Now if you convert a circle to a path it will be represented by 8 nodes?
Probably the circle object is "perfect", though the converting to path is confusing.
However if you want to use boolean operations, you will end up with paths.
Where you may be using a different node placement than what the simple circle "object to path" generates.
Saying this because you can have only the nodes placed accurately, the segments of the Bézier path representing a circle
ALWAYS has an error.
May be small, but if you want your design based on constructing with intersecting circles it can add up.
1024 sides sounds alot, with that you probably wouldn't even need curved segments.