Best way to align / rotate an object to match another that is at a different angle

Hi, I’m a relatively new user and have been searching for an answer to this and have come up short because others asking it are only asking about alignment without different angles being involved. Here’s the simple example: Say you have a model of a skylight and the model is level; in other words its parallel to the red/green (x/y) plane. You have a roof (that’s obviously sloped) and want to place the skylight on the roof so that the skylight is angled exactly as the roof is. Of course the pitch of the roof is known, and from that there is a known angle. And of course the rotate tool could be used to rotate the skylight. But, is there any way to ‘acquire’ the angle from the roof geometry itself? In other words, you wouldn’t have to even know the slope of the roof, you’d just get the points and it would be exact. AutoCAD has a command that will do this called ‘align’ and it does ask you if you want to scale the object but you can decline. It essentially forces one object to be aligned with another merely by choosing points and that’s it. The numerical position or angle of the object being used as the ‘alignment target’ doesn’t have to be known.

I tried to experiment in Sketchup and came up empty. I created a box and then angled the top. Then I created a cylinder. I then wanted to rotate the cylinder so that it would match the slope of the box. I tried using the rotate tool on the cylinder and attempted to get the angle of rotation by using points along the top slope of the box. I came close but was off a bit. Was I on the right track, trying to use the acquired points to define the angle OR was this entire approach completely wrong? Just wondered if I had the right idea with bad execution OR completely going in the wrong direction. :slight_smile: Thanks for any tips. -jonR

1 Like

I find it tends to be easiest to draw parts in place, that way you don’t tend to run into these kind of problems.

But in answer to your question: If you make the skylight a component ,you can change it to a “glue to” component with several choices. I chose “any” to demonstrate a little more potential, but there is also an only “sloped” option. Click the component in the “in model” tab of the components browser window and you can place a fresh copy of the component to glue to any face.

I made a quick gif to explain a little better:

1 Like

‘Glue to’ components are great in cases as these.
There’s also the option to right click on the top face (or any odd angled face) and select ‘Align Axes’ in the context menu. With the axes aligned to the face (temporarily, as new drawing axes) you can bring any component in, aligned to the face (glued or else). You can also draw orthogonal to that face, creating new aligned geometry.

Right click on an axis in empty space and select ‘Reset’ to return to the systems axes.

1 Like

You can use the rotate tool.
Here’s one I did to show how to align a cylinder to a sloped surface.

1 Like

Wow! Much thanks to all of you guys. In case you just heard a noise that was my mind being blown! Can’t wait to play around with these workflows and to use them as needed. I think the ‘glue to’ functionality makes the most sense but I’m not one to ignore the others. I found that when learning AutoCAD and Revit or any skill in life be it music, art or software coding, the best way to get better is to learn multiple ways to do things. Then you can ‘mix and match’ depending on the context. Thanks again!


IanT, Thanks gain; played around with this and found it extremely useful. I did notice one issue with this feature that takes away from it’s ‘intelligence’ as it makes assumptions about the state of the geometry you are turning into the component with the ‘glue to’ feature. Unless I’m making a mistake, it seems the component geometry has to be parallel with the red/green axis (i.e. flat ‘on the ground’), otherwise ‘glue to’ mis-calibrates. It assumes ‘flat to the ground’ and adjusts from that. It does this rather than not making the assumption and using the difference between what angle the component actually is and the sloped surface it’s being glued to. Obviously more of a nit-pick but it is something I noticed. I noticed that you stressed ‘fresh copy’ of the component and for a reason. I found it interesting that you can’t use the geometry in the scene that was newly edited to use the ‘glue to’ functionality. It has to be a fresh copy.

You need to set the component axis so it knows which face of the component should be the glue to point.

1 Like

Here’s a quick example.

If you forget to set the axis, or you’re not happy with how you’ve set it you can change it later too.

Bear in mind wherever you set the axis center, that will be the point you hold when taking a copy from the component window, it can be useful for placement.

Wow, thanks guys. I figured there was extremely good chance that I wasn’t doing something correctly. One thing I’m playing around with now is the basic workflow of this stuff. Specifically, maintaining/editing/ and updating. As I think IanT alluded to earlier, you need to put a fresh copy of the component into the scene if you change the ‘glue to’ setting. (I’m just playing around with this stuff now just for learning; not that I’d probably do this in a typical workflow.) Let’s say you change from ‘glue to/sloped’ to ‘glue to/vertical’. The components already in the scene won’t get updated with that particular edit. However, if you change a material assignment, all components in the scene update immediately and so does the image in the component panel.

Changing the type of ‘Glue to’ has no influence on component instances in the modeling space (to avoid confucion you shouldn’t say “already in the scene”. The term “scene” is reserved for something else).
What is important is the gluing plane of the component, its own red/green plane which you can change at any time. Doing so means that you in fact reposition the component’s geometry for the local (component’s) axes.
So it will affect all the component instances of that component, whether already glued to or not.
You can copy a ‘Glue to’ component to another face and it will also ‘Glue to’. If that particular property for an (just that one) instance somehow gets broken, the others still keep that status. It can be restored for that instance by using a plugin. Or just replace it by a fresh one from the component library or by using a copy of one that still has the ‘Glue to’ property.

1 Like

I wanted to thank everyone here for answering my question. I have to say, I’ve only been in this forum a few weeks or so and am very impressed by the kind generosity people here exhibit with regards to helping others and exchanging info. Not only that, but most everyone here is excellent at explaining things; are you guys professional teachers? :slight_smile: I’m saying all of this as a veteran user of other types of forums that people use to exchange info, and I am specifically talking about skill-based forums such as for programming/coding, music, building design, and other software applications (other than Sketchup). Many of those that I’ve been a member of have been great sources of info and help from others but as great as they have been, it seems that this place here is even better. Thanks again! jonR


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.