Is there a Rhino command to orient objects in the XY plane?

I’m about to write a script to take objects and lay them down in the XY plane, but something seems really familiar about this. Is there a native Rhino command to do this? I know it’s not Smash, as I don’t want to “disassemble” the objects.

image

image

I keep thinking I’ve seen this before, but I’m getting old and my memory isn’t what it used to be. :laughing:

Thanks,

Dan

Pascal or Mitch wrote something like this for me years ago, not sure if it ever made it into production Rhino. It’s been years since I used it so I would be no help telling you how it works, I’ll dig it up and post it if you like…?

Brian

Hi Brian,

Sure, if you can find it I’d love to see how they did it. I have some ideas on how to do it, but it’s always useful to see other ways of doing something.

Thanks,

Dan

Let me see if I can dig it up. Hopefully I put it in the “What has Autocad ever done for me” folder by mistake. That would make it easy to find.

Brian

I think this is it…
wd_OrientObjectsSurfaceToSurface.rvb (1.8 KB)

Brian

I don’t think that is it, it was written by someone else. I’m still looking.

It might have been this one. What I needed to do was orient solids to the X-Y plane so I could run make 2D on each. I think I ended up with a couple of different scripts that I used. I don’t really know scripting well enough to really understand what these do and have not used in awhile since my last ramp and twist stair almost 15 years ago.

brian-2.rvb (834 Bytes)

Brian

well in that case one would use unroll at most. i usually explode these objects and only unroll the surfaces i quickly pick manually then use NonmanifoldMerge and use unroll which unrolls all the picked and merged surfaces at once, since these are for a cut layout for production usually i dont need the thickness of the full slabs.

but in case you really need the full slabs, i cant think of anything else other than a script donor. there may be tricks with RemapCPlane, but that also only works per object and you still would have to make a macro to align them towards the vertical center of the plane.

it might help if all have the same thickness, then you could make a macro with the first mentioned method and simply extrude/offset them back to thickness.

The native rhino command that I would use to do this is Orient3pt. Seems like it would be a pain to script with though.

if a gh is an option, something like this could work:

I’m very familiar with that command, but it’s too many mouse clicks. I’m going to come up with a solution where I can window around all of the displayed objects and lay them down with the largest face down. I just don’t want to expend that effort if there’s a command already in Rhino that I’m overlooking.

Thanks,

Dan

Hi Gijs,

We haven’t gone down the Grasshopper road. For what we do there’s never been a need.

Thanks,

Dan

Thanks, I’ll take a look.