Help me!: Cleanly snap 3D objects to each other

Post questions on how to use or achieve an effect in Inkscape.
Catthou

Help me!: Cleanly snap 3D objects to each other

Postby Catthou » Fri Oct 08, 2010 9:36 am

I just started working with Inkscape in helping me design cube-oriented 3D structures. So I created a cute, then duplicated it. Moving it using shift and ctrl I thought would help me perfectly align my duplicated cubes.

Image

The cubes appear to be slightly offset.

I'm looking to the snapping feature to see if they can align better than my imperfect manual aim. I tried to snap to grid, but I can't figure out how to make an axonometric grid that has the same angle as my perfect cube, so snapping to it doesn't help.

Then I thought it'd be easiest to just snap each cube boundary to other cube boundaries, but fiddling each of the snapping options on an off in varying orders doesn't achieve any results. The only snapping features that work while moving a cube around another cube is the "Snap nodes or handles" to "cusp nodes" and "midpoints of line segments." However, those only snap objects to each other in even greater offsets and not the military-precision rows I had planned.

I am using Inkscape 0.48 on Mac OS 10.5.8.

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Help me!: Cleanly snap 3D objects to each other

Postby druban » Fri Oct 08, 2010 11:18 am

Possibly bug #170356 https://bugs.launchpad.net/inkscape/+bug/170356
There might be another bug that has a similar effect.
A rendering problem for some - maybe all? - SVG renderers for areas that are adjacent having the background show through.
Your mind is what you think it is.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Help me!: Cleanly snap 3D objects to each other

Postby prkos » Fri Oct 08, 2010 2:25 pm

After you bring them near you can use Ctrl and move one of the corner handles and snap it to the corner of the other box. Does that help?
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Catthou

Re: Help me!: Cleanly snap 3D objects to each other

Postby Catthou » Sat Oct 09, 2010 1:03 pm

Possibly bug #170356


Interesting bug. Thank you for bringing it to my attention! My hand isn't as unsteady as I thought, though snapping would still save me so much time and effort, as aligning a handful of objects manually is just asking for a hand cramp.

...use Ctrl and move one of the corner handles and snap it to the corner of the other box

Grabbing the corner handles stretches the cube instead of moving the whole object. If that's what it's supposed to do then it's not quite what I was looking for. I want the bricks to remain uniform.

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: Help me!: Cleanly snap 3D objects to each other

Postby dvlierop » Sat Oct 09, 2010 10:35 pm

This is not a snapping issue as far as I can tell. If it was, then there would be a gap between the boxes that changed in witdh when zooming in or out. In this case the gray lines do not become wider when zooming is, which makes me believe that this is a rendering issue.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Help me!: Cleanly snap 3D objects to each other

Postby prkos » Sun Oct 10, 2010 4:15 am

Oh hai Diederik :)

Is there a way to snap boxes when moving them along axes?
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: Help me!: Cleanly snap 3D objects to each other

Postby dvlierop » Sun Oct 10, 2010 4:24 am

If there isn't one then I can make one for you ;-)

But what are you looking for exactly? Moving the handles of the 3D box along a constraint? Or moving the 3D box purely vertical or horizontal? Or the bounding box of any object?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Help me!: Cleanly snap 3D objects to each other

Postby prkos » Sun Oct 10, 2010 11:11 am

yay!

Moving the box corners along axes already snaps, but when you move the entire box using the x at the box center then I don't see any snapping. It would be nice when we could duplicate a box, move it along any axes but when it's moving past the original edges snap it to the original, or any other box it encounters along the way if the corners can be aligned.

I can imagine it can be quite complex because of the additional dimension. I guess it should behave in a way that when moving a box using the 3D box tool the box corners should snap to corners of another box if they come close to one another in 3D space.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Help me!: Cleanly snap 3D objects to each other

Postby druban » Sun Oct 10, 2010 3:45 pm

Unrelated question about the very nice 3Dbox tool - is there any way to scale the box proportionally in all three axes and still keep the same vanishing points?
Your mind is what you think it is.

dvlierop
Posts: 139
Joined: Sat Sep 08, 2007 4:25 am

Re: Help me!: Cleanly snap 3D objects to each other

Postby dvlierop » Sun Oct 10, 2010 7:04 pm

@prkos: now I see what you mean. That's indeed quite complex, because of the different transformation for these points. Inkscape can currently only handle translations, rotations, scaling, stretching, and skews, but not this perspective transformation. We would need to apply the forward transformation, snap a corner and calculate the inverse transformation to update the other corners. I'll put this on my to-do list, though don't expect this to be implemented overnight ;-)

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Help me!: Cleanly snap 3D objects to each other

Postby prkos » Sun Oct 10, 2010 7:08 pm

Thank you!

It will be a nice addition whenever you do it, snapping is already super advanced so no worries :)

Thanks again for all the hard work!
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

Catthou

Re: Help me!: Cleanly snap 3D objects to each other

Postby Catthou » Mon Oct 11, 2010 10:13 am

It would be nice when we could duplicate a box, move it along any axes but when it's moving past the original edges snap it to the original, or any other box it encounters along the way if the corners can be aligned.


And this was what I was looking for in the first place. Seeing the discussion that ensued, problem solved, I guess. Now I just wait patiently for this feature.

Thank you dvlierop!


Return to “Help with using Inkscape”