Grasshopper

algorithmic modeling for Rhino

Avoid flipping of curves in list by unifying normals?

HI, 

I am lost here. Been working on a stair definition dependent on a spline that works great in some instances, but on others some of the curves in the list that generate the surfaces flip and cause inverted surfaces. (See Attached). 

I can fix this with list item on a case by case basis, but then it is not parametric. Anyone know of a full proof method to ensure that the curves will be properly arranged as to avoid these surfaces?

thank you. 

Erik

Views: 602

Attachments:

Replies to This Discussion

Hello Erik,

this could be a way but need further tests with changes coming from your variables.

another strategy would be to measure the distance the two points of each line segment from the bounding box center and sort these points synchronously with those distances and line them again (this one could be better than the one i am uploading)

cheers

alex

Attachments:

Thank you Alex for your reply,

I did not think to use the 'sort along curve' component. I understand how this component works in two dimensions, but I am not sure how the circle around the volumetric centroid of the bounding box acts as the sorting curve for the points. Even so, it seems as though it would work with other curves (such as the input spline) as well; yet, I would think that it should be higher in the bounding box than the centroid. 

As far as the second strategy is concerned, do you mean to measure each point of the line segments and then sort them with the common sort component or the 'sort along curve' method? Also, would this not return negative values that should be adjusted with the absolute value?

Thank you again for your response. 

Best, 

Erik

Hello Erik,

I am not sure how it works too. i might be the case that it works on projected points and curves, but then a plane input would be available.

the second strategy

uses the distance of each line vertex to the volume center, then these are sorted synchronously with the sorted distances, using sort list component. seems solid workaround.

cheers

alex

Attachments:

Hi Erik Sven,

I checked your file, and although I don't understand the first part (calculation of heights), I'd say the big problem causer is the PlaneNormal component. It results in planes that are not oriented consequently. I added a AlignPlane component to fix that.
You could check if that alone fixes all issues. Note: I had allready edited the last part of the definition, before I found/fixed the orientation problem.
The things I changed are in the purple groups.

(P.S.: I think it would be preferable to have the step heights all the same, to prevent broken bones or spilled coffee a.s.o., but then again, I'm not an architect)

Attachments:

Thank you for your replies. I haven't had a chance to work them out yet, but they both make sense. I appreciate you getting back to me!

@ng5 - i agree with your second approach and thank you for sharing as it makes sense now. 

@Pieter - I also agree with the spilled coffee, this approach allows (potentially) for wider treads when the curve is more horizontal. 

I will run these scripts in the morning and thank you again. 

Best, 

Erik

Best, 

Erik

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service