algorithmic modeling for Rhino
Dear forum,
I have a question. I have a curve which serves as a ground plane for an extruded box (see attachment). When I extrude the curve, a box is created. When I explode the box and evaluate the surface normals, the normals are pointing outwards. But if I then offset these faces, some of them will move inwards, some of them outwards. I can't just flip the normals, because that won't solve the problem.
Solutions, anyone?
Tags:
I didn't check your files yet, but a possible solution is to:
- offset the faces both inwards and outwards (+distance, -distance)
- get area centroid of the faces
- get volume centroid of the box
- get the distance of the area centroids from the volume centroid
- sort the faces based on this distance
- pick the desired faces (closest/inwards offset or farthest/outwards offset)
Thanks for your input! It was easier to make a box of it first.. problem solved!
Thanks Pieter.. sometimes things are really simple :)
I think the offset direction for a surface is tied to the direction of the face loop...so the edge curve direction is the driver. It looks like making a box out of it resets these directions.
True.. or it least it seems so.
The problem is now that if your curve is NOT rectangular, the solution proposed by Pieter does not work anymore.. so I most probably need to do it more complicated in the way Faberyayo suggested.
yes...I imagine you also could test for the direction of the edge loop, possibly using a plane constructed from the volume centroid to the face centroid...might make for a lighter calculation if you're doing it for a ton of objects at once...but just doing offsets and testing for proximity is probably easier.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by