How do i get sporph to orient all objects in the same rotation, without breaking the plane

I have been working on a script to help me apply a corrugated material to the shape I have created, mostly to be used for rendering, maybe also to make plans for fabrication. Currently, I’m struggling to get all of the material to orient in the same direction (perpendicular to the ground plane) without being broken out of their planes. As you can see in the model, their orientation seems to be based on the direction of the surface.

How can I change the script so that I can control the direction they are all rotated towards? I have been trying to see if I can use a point as an attractor.

Additionally, you might notice my script looks terribly inefficient. If anyone sees something that’s just stupid on my part please feel free to point it out.

I’ll attach my rhino file and the gh fileROOFSTUFF3.gh (98.3 KB) HOUSEPROJ3.3dm (17.7 MB)

I’m not sure this is gonna help you, anyway if you’d like to unify your surfaces UV directions, there’s a plugin that does this.

this is a little silly, but I’m not allowed to update rhino on my work/school computer, so I can’t use that plugin. Are there any alternatives?

There are a few other problems with your definition…

I flipped some of the normals in Rhino and internalized all input geometry.

Not all surfaces are planar but that’s not such a big problem. I used the Project command to have a planar surface for the extrusion.

I then used the Orient command to orient the corrugated geometry from XY to the planes on your roof. Instead of extruding the edges, I only extruded the surface and used that for a Boolean intersection.

The planes on the roof are right now aligned with a Z vector.

ROOFSTUFF3_mrtn.gh (134.9 KB)

I tend not to want to internalize geometry because I’d like to apply it to other forms, however
Thank you so much for your help! I’m looking over your script and definitely starting to understand this better.

The main reason to internalize the geometry was to avoid having to upload a second file.
Internalized geometry that doesn’t need to be edited also makes it easier for anyone else looking at this definition.

1 Like