How to align two objects

Hello,

This topic is very similar to the previous one: Align like in Revit - #3 by s.urbanski

I already know that Rhino can not align two objects like Revit does but there must be some way to make two objects parallel. I am modelling a truss:

There are 4 horizontal beams connected by oblique beams.


I want to model the oblique beams between the horizontal ones because they are connected.
What I need to achieve is to make faces of the beams parallel and connected, so there are no gaps between them but there is also no intersection. I tried orient 2D but the result can be seen here:

There must be a way to make two objects parallel, especially that both of them have simple, planar faces. I would be grateful for your help.

Hello - please post a simple file with objects arranged in the ‘start’ positions, I’ll see if I can come up with something useful.

-Pascal

I believe @Helvetosaur wrote a script to map from a planar face to world XY plane. Maybe it could be adapted or there is another one to map from a planar face to another planar face (of another object)? This would allow to skip the Orient3Pt procedure which requires selecting 6 points for each object pair.

Except a plane is arbitrary, so without the 6 point alignment, you have no idea how to orient the objects to each other rotationally around the interface plane’s Z-Axis. With 2 simple picks of planar faces you can make the faces of two objects co-planar certainly, but I’m willing to bet the result will not be what you want 99% of the time.

It could probably be made to work with 5 clicks - the two planar faces, a common origin point and a point along the X-axis on both objects Two clicks less (you need 7 for Orient3Pt) is not all that much of a saving.

@s.urbanski wanted to mimic 2-clicks-only Revit behavior - and my impression is that for rectangular faces it recognizes the larger of U/V sizes and aligns accordingly, larger edge along larger edge.

That could probably be done for this very specific use case, but it wouldn’t work for anything remotely non-rectangular and would be unreliable in any case for square sections. If the longer edges are not the same length on the two objects, how does it align them? If it’s a rectangle where say the long edges are the same length between the two objects but the shorter ones are different - how does it align? Top/Bottom/Left/Right/Centered ? And even if the two rectangular sections are exactly the same - there are still two possible orientations - rotations of 180° about the center.

So, to clarify, is this what you want to achieve (simplified)?

Thank you @mikolaj @Helvetosaur and @jeremy5 for your answers. Although I am not a programmist I think that we don’t need transformation of one object to another but rather projection (with moving the entire element). If only the elements are aligned, I can position them in the right place with gumball or other tools.

See how it is solved in Revit (https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/Revit-Model/files/GUID-9C867721-1970-4ECC-90F1-3C112B9EC2E6-htm.html)

All I want from Rhino is to give me “peace of mind” that elements are connected and not intersecting with each other.

Before

After

Before

After

The “Orient” tool have two disadvantages:

  1. It requires picking 6 points which takes time. For hundreds of elements, it is a nightmare.
  2. As far as I understand this tool and Rhino in general - I can pick only corner or midpoints. While most of my elements lie on the walls or floors so no specific points to snap to. Besides, even if I am wrong now, there is a disadvantage described in point 1.

@jeremy5 Your understanding is correct. I prepared a visualization project:
Ideal world beams.3dm (218.5 KB)
Which is very similar to what you have shown.

There is no problem when you can snap to the world axis. But objects modelled from point cloud are in the “as is” condition. In this example, the horizontal beams are not aligned to X nor Y plane.

It appears you are looking for geometry constraints, which don’t exist in Rhino

Ah I see: you don’t simply want to draw the geometry as a cohesive whole, you want to take components that you have modelled individually from real world point cloud data and assemble them. Because of the tolerances involved, and because the original items may have been warped and twisted, your parts may not fit exactly. Because of the orientation of your point cloud(s) it is hard to line things up during assembly. That is harder. Depending on your willingness to approximate, you could simplify things: for example, get the first diagonal strut in place, then instead of placing the remaining three, mirror the first to make the second, then mirror the first two to get the third and fourth.

No, if you turn the Near Osnap on you can snap anywhere on an edge. When it comes to Orient3D the three points you pick represent an origin and two vectors in a plane. Points 1 will coincide, but Points 2 and 3 only match direction, not position - your target 3, for example could be on the edge of the floor on the far side of the room.

1 Like

@cdordoni In this example there is no need for constraints because I want to move one element to another, not “glue” it permanently. So far “group” is enough for me.

Although it would be great to have constraints. I thought that this can be achieved with grasshopper?

@jeremy5

Your understanding is correct. After all, people usually have design documentation. Companies like mine are paid for telling how things are in reality to avoid costly mistakes.

That’s what I did. The problem is that, due to elements not being aligned with the world axis, new elements are intersecting with existing ones. And here we are at the start again: how to align them with each other.

That is new to me. I will try that tomorrow. Thank you for your explanation.

Also, bear in mind that if you have a subset of pieces that are correctly aligned to one another you can select them all and use Orient3D on the entire subset rather than individually, cutting down the number of point selections you have to make.

For example here is a set of truss beams and a set of diagonal struts in separate orientations:

If I select the four struts and run Orient3D, placing my three points like this:

And choose my target points like this:

I have all four struts correctly positioned in one hit:

HTH
Jeremy

1 Like

Thank you @jeremy5 for your help. I tried your advice and it helped a little but I am afraid that I still need surface-to-surface movement:

Imagine that the bigger solid is a wall and the smaller one is some element attached to the wall. I can not place it where I want. The detour would be to snap the element to the edge of the wall but with complex structures, I would have to drag the element all over the entire building.

@s.urbanski Are you attempting to replicate a workflow you use in other software? Have you used Rhino previously for other purposes?

Do you know about the on object OSnaps including OnSurface and PersistentOnSurface? Object snaps | Rhino 3-D modeling (Scroll down to the section about snaps on an object.)

1 Like

Previously you said:

So it seems the goalposts have moved :wink:

Other than by orienting the element at a given datum on your wall and moving it measured distances across the surface, in your desired world, how do you determine where on the wall you will place it?

Thank you for your post @davidcockey

Yes and no. I want to achieve the effect described in my first post: to align two objects. Having experience in Revit I am looking for something similar but I am open to all workflows and solutions which will allow me to have the same effect as quickly as possible.

I have never worked with Rhino before but tomorrow is the last day of my 90-day evaluation. Before I started testing on point cloud projects, I finished several of these few hours tutorials from the learn page.

I was looking for something like OnSurface but only in this bar:

With this command, I managed to put an object on the surface of another:

I wonder if I can somehow speed up this process because for 2 out of 3 points I had to write “on surface” in the command line.

@jeremy5 Thank you for noticing my error in testimony :slight_smile: It really looks like I don’t know what I want. Luckily, I think that describing my workflow will explain why I am so determined to get this alignment tool.

As you know, I am not a designer. I model from point clouds, which, by definition, are not aligned to the Rhino world axis.

Let’s assume that I want to model this air conditioner:

First I would model the wall. Please notice, that the wall created parallel to the world axis (I hold shift when drawing) is not aligned with the point cloud. Although the angle is only 0.57 degrees the distance is more than 5 centimetres.

But that is not a problem because I can drag the wall or draw it in the right position at the beginning:

Now, let’s model the air conditioner. I want just a simple solid but its dimensions must be accurate (so aligned with point cloud). To do it quickly and accurately, I will use section views.

Now you see for yourself, the element is intersecting with the wall. If only I could tell Rhino “make this (air conditioner) surface parallel with this (the wall) and connect the elements. Move the conditioner as you like”

Since the element is in a more or less good position (that’s why I used section views) I don’t need precise transformation like the orient does. I just want to quickly make it right.

Now, if I want to use orient (correct me if I am wrong) I need to:

  • move the elements further from the wall to have access to its corner points,
  • select three points,
  • turn on OnSurface
  • select the wall surface,
  • pick the first point,
  • turn on OnSurface again,
  • select the second point,
  • select the third point (let’s assume I don’t need OnSurface with this one)
    and adjust the element in the section views to match the point cloud.

In this video, it took me 47 seconds and I did not achieve my goal because there was some crazy snapping at the end.

If we compare it to 5 second Revit “align” and multiply by all elements that need to be aligned properly we have hours of wasted or saved time on just one project.

Try the PersistentOnSurface or PersistentOnPolySurface

I highly recommend anyone to use Grid snap at any time, unless specific dimensions are required on a certain object. That will guarantee that the majority of objects in the scene, built by free-form moving and extrusions, will have a size in whole numbers instead of random decimal numbers that are difficult to control and adjust.

1 Like

Grid snap does not work for what the original poster needs to do. He is aligning objects created from scan data, not creating new, free-form modeling.