Grasshopper

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?

Views: 3692

Attachments:

Replies to This Discussion

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!

Hi jkanters, I can't say why this is happening, but I found an easy solution for it:

Thanks Pieter.. sometimes things are really simple :)

Touché!

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.

True, I am not a big fan of too many area/volume centroid computations either. 

I just noticed that if the normals of the faces are in the desired directions, then you can also do this:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service