Grasshopper

algorithmic modeling for Rhino

Hi,

 

I am trying to split closed polylines at their corners to get some kind of control over their edges (smoothing, rebuilding etc.). The problem occurs with polylines that have their origin in unrolling, squishing or even in offseting other curves because of a control-point chaos in the corners. For every corner I sometimes have to zoom into particles to find which one IS the corner point. There is also no rule for the number of segments at each edge.

Is there an elegant way to make those splits in the corners, for example to define a certain change of angle at which the split has to take place?

I couldn't find anything in the discussions, hope it is not something essential that I do not see. I have attached a simple example.

 

Thanks for any hint

Views: 7275

Attachments:

Replies to This Discussion

 Hey

here is a drawing solution :-)

DeDackel

or like this?

Hi Dedackelzucht,

 

Thanks for the quick solutions. I am not sure if I am missing something here, but when taking my example (I have forgotten to re-join it into a closed polyline before attaching) I do not get the corner points. Your first solution gives only one corner point, the other intersections are somewhere at the edges. The second solution gives me four points that are not necessarily in the corners.

Maybe there is a misunderstanding, I am not talking about rectangles or squares but of (any possible) shape with corners somewhere at some points that do not follow any geometrical or numerical rule.

Cheers

 

how about this? I am not sure if it works all the time with the last larger than component (larger 3 ?)

Best Regards

DeDackel

The idea is to measure the angle of two vectors. The vectors start at each Pt. One goes to the next Pt in the first direction, the other in the opposite direction.  If the angle is bigger than 3 rad it is nearly straight. smaller must be a kink (corner). Deepending on you geometry you might have to change the 3 rad to get the result you want.

 

Best regards

DeDackel

You are too fast, give me some time to go through your solutions :)

I am studying your last solution and together with your explanation I think it is just what I wanted to achieve.

 

Thanks a lot for your time and the ingenious ideas!

I don't know if this question that I had might be of any help?

 

http://www.grasshopper3d.com/forum/topics/moving-crv-start-pts-to-a...

 

ryan

Hi Hrvoje, this would be my answer to your original question, I think you can edit it to suit your further needs.

Attachments:

Thanks Ryan and Pieter, the approaches and hints of both of you are also very helpful. Each approach is widening my horizons in different ways - thanks also for that.

Cheers!

 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service