Snap Alignment
-
@august said:
The question often comes up, especially from new users who are excited by hou MUCH SketchUp can do, about making parts that will fit together in proscribed ways like pipe fittings, Tinker Toys, model railroad sectional track, or Lego.
Reminds me of the "glue points" in OpenDraw or MS Visio. I like this idea very much!@august said:
Are there any kind of rotation snapping tools already built?
Yes, "Snap Angle" is built-in. Open Model Info dialog and chose the Units page. (Can be changed thru Ruby, using the Units Options Provider.) -
A quick look thru the API makes me think this would best be implemented as an extension to the Sketchup::Behavior class.
http://code.google.com/apis/sketchup/docs/ourdoc/behavior.html#snapto -
@dan rathbun said:
... "Snap Angle" is built-in. Open Model Info dialog and chose the Units page. (Can be changed thru Ruby, using the Units Options Provider.)
Thanks Dan,
The default on that is every 15 degress. What I'm after, in keeping with the overall question concept, it snap to align with part of the target object.
The current angle snap is the equivalent of the default precision. You can set that so that drawing and moving will snap to a 1" or 1 meter grid or whatever. But when you snap to a point on an existing object, it will be exact, not to the nearest gridpoint.
What I'm talkng about is to have the same kind of thing with angles. Right now, to do that kind of alignment, you do the move to get the points aligned, then you switch tools and select that point as the rotation center, select an alignment line on the moving object, and select an alignment line on the target object. That's a whole lot more steps than the move, which is just pickup by a point, drop on a point.
From talking about this, maybe you don't have to have hidden parts.
Maybe you could just have a Move-and-Align tool where you pick the moving object up by a line near a point. The point and line highlight, then you drag to where another point and line on the target highlight and drop it.
The default would be to orient so the moving line extends the target line from the target point so the parts are next to each other, not overlapping. Maybe Shift or Alt would modify that so the alignment lines overlap.
There might have to be a special case for moving Arcs. With the algorithm outlined above, you could not break a circle apart and put it back together because the end Arc segments would align straight through and that would not correctly reconstruct the circle.
Hmm. If the object is an Arc, if the end segment is the same length as the next segment, presume the Arc was broken at a vertex, so modify the alignment by the angle between the end segment and the next segment. If the end segment is shorter, presume the Ark was broken by an intersection with that segment, and align straight through. If the end Arc is longer than the next segment, if there are only the two segments, presume that the other segment was broken. (If there are more than two Arc segments and this end is longer, something's off.)
That would work to put a broken circle back together, but would it be the desired operation in other cases? Maybe this is another case for a tool modifier like Shift or Alt.
This is still, of course, in the concept stages and I'm not the programmer to write the tool. But I think there's two different directions here, one of special parts that have magic in them, like Sketchy Physics, and one where a magic tool does a credible job of figuring out what you mean if you tell it enough in the first place. I've been thinking about the first for a while, but now I'm leaning strongly toward the second.
And I think it could be a really useful tool.
I hope this helps,
August -
I think that the 3dskeng pipe plugin does this snapping stuff for pipes and fittings like that. It would not be entirely impossible to make this plugin and have it be applicable to any component.
My take on it would be that user specificies snapping points, the plane that other objects align to, and then perhaps rotation possibilities around that snap point - infinite rotation posibilities, or maybe force it to rotate only on 90 or 45 degree increments.
The tool would also have its own move tool, so when you select a snapable component, the snap point(s) highlight and then as you move it near or over another snapable component, that one's snap points light up also, making it easy to match up snap-point to snap-point and the plugin would of course force it to snap exactly onto the snap points. Upon letting go of the move action, the component would whip itself around and align to the other components glueing plane (very similar to SU's native glueing plane actually).
So anyhow, those are some ideas and I think they are all very do-able. My brain can mostly only think of things like pipe fittings. I guess this would be useful in countless other places though?
Chris
-
@chris fullmer said:
... only think of things like pipe fittings. I guess this would be useful in countless other places though?
I think it would be useful in any modular, building block situation.
Having it set up for PVC pipe would support designing book shelves, bike racks, tables, easy chairs, and carports in PVC.
Tinker Toys, Legos, etc. would be fun, but not a serious need. But that illustrates the fact that where it would be most useful is when the snapping alignment would be done repeatedly, dozens or even hundreds of times.
A specific application where this would be seriously useful is in model train track designs. Sectional track is very standardized, MUST align properly, and having to align each piece to the next is currently so time consuming in SketchUp that it is not the tool of choice. Currently there's no point in making track components because they would be too hard to use. You can use SketchUp to plan how a model would fit into a room, how the support structure would be assembled, how a backdrop would mount, even the shape of scenery, model buildings, locomotives, etc. but not the track. Automatic alignment would so speed the design process that it would be a game changer in this instance, truly make or break, SketchUp really helps vs. it's too much work.
I hope this helps,
August -
@chris fullmer said:
... My take on it would be that user specificies snapping points, the plane that other objects align to, and then perhaps rotation possibilities around that snap point - infinite rotation posibilities, or maybe force it to rotate only on 90 or 45 degree increments.
The tool would also have its own move tool, so when you select a snapable component, the snap point(s) highlight and then as you move it near or over another snapable component, that one's snap points light up also, making it easy to match up snap-point to snap-point ...
Thanks for thinking about this, Chris.
I had been specifying a line instead of a plane, presuming that there would be no rotation. But for pipe you of course need rotation. Tinker toys would have to allow rotation, Lego only for specific parts. For model railroad track the rotation would be fixed at 0.
If you are going to allow rotation, then special parts with hidden attributes will be required because you cannot select enough on a generic model part to specify all that you need and even if you could, it would add to the number of steps each time and that's what we're trying to reduce. With no rotation, you might be able to do the generic, selected-line-based alignment that I outlined above.
You said that of course you would use a specialized Move tool. I think you will want a separate, specialize Rotate tool too, where the center and rotation plane would be assumed from your selection. If the selection had two (or more?) such connection/coupling planes that were connected to non-selected objects, then they would have to be parallel planes or you could not rotate. If the selection has just one connection/coupling plane connected to another object, then that determines the rotation and you can immediately rotate with the mouse, as limited by the rotation parameters. If you base it on the selection, then you could select an assembly of other parts to rotate by the one connection the selection has to the rest of the model, or rotate a group of pipe fittings within a straight assembly.
I've looked into how to make tools, but I've never seen how to make something like the hidden coupling plane you're talking about. Obviously it will take a specialized tool or dialog or both to specify that.
I imagine that, inside a group, you could select a face and then specify with a menu selection to make that the coupling plane and then a dialog would ask you for specifics and you could set some of those to be defaults for the next time. One option would be to hide the coupling plane, another might be to let its vertexes be the rotation constraints vs. specified angles. Close the dialog, close the group/component and you're done.
Hmm... Could you use those coupling planes to specify how links of chain can rotate with respect to each other? No, I think that's a different problem.
I hope this helps,
August -
-
I'm also interested in such a snap-point module.
Is there already a development ongoing? Any starting ideas ? -
Jim Foltz had started writing one a month ago or so. I'm not sure what ever came of it though.
-
@ronb said:
I'm also interested in such a snap-point module. ...
Hi Ron,
May I invite you to share your application idea?
My experience has been that developers are often motivated by the idea that they are solving real problems for real people. The more you can help them see their work as connected to the real world, the more motivated they are.
That is why I was so verbose above in my ideas for how such a plugin would be used. Legos and Blox are just ideas to stretch the range of applications, my real motivation is for model railroad track.
The first 3D application that I spent any real time with was one aimed at model railroaders, but it was such a general purpose 3D design tool that I got hooked on it for that. I had done some model railroad building in high school and that gave me the shared vocabulary with the rest of the user base, but I was not, and still am not, a modeler of that kind.
That entire field could benefit hugely from SketchUp, but the inability of SU to deal effectively with track design issues is a real obstacle. Snap Alignment would solve that.
What's your application, if I may ask?
I hope this helps,
August -
I had to make a 'predefined' snap location for accessories for our dock builder plugin for Sketchup. I basically created 'balloon' components that were layered on the model. When the user activates the tool it shows the layer containing the balloons. If the user clicks on the balloon, I replace the component definition with the accessory they chose. You can check it out in action in this video: http://www.youtube.com/watch?v=SMZfBORI9wI
I am using a combination of dynamic component attributes and component definitions to make it work. It may not be the most elegant solution, but it seems to work.
Jon
-
My ideas was do create a Fence-Builder where you can plan fences for your garden.
So you could be able to snap the fences vertically and horizontally. Add doors and so on.Thats what snap alignment would be great for.
Advertisement