Grasshopper

algorithmic modeling for Rhino

Determining only the inside angles of a closed random curve

Hello! Help me please to understand the following questions. I work with different plane closed curves (an example of one of them - is 3). At the end of work of another algorithm it creates a curve and then I want to measure the inner angles.
The first question is how can i do that when determining of the angles in points of closed curve are always will be only inner corners, no matter how was created the curve?
I use these algorithms:
The second question is if I rotate a curve in space (3), then the arcs of angles will bend, how to correct it?I tried to use different algorithms, but the first is not working properly, i don't understand why?

Views: 2002

Attachments:

Replies to This Discussion

Sorry for late reply, Denis.

The main "problem" here is this: you curve is not just a polyline. The "top" segment is a nurb-curve and you often have small pieces co-linear to others.

My old definition you linked use fragmented patch (mesh) to find the direction of the curve, to determine the inside/outside, fragmented patch doesnt work with nurbs-curve... some fix needed....

Here is a possible solution: convert/clean your curve to a polyline...

1st solution: take start point of each segment and rejoin them into a polyline, strightening any non-linear segment (nurbs-curve segments).

2nd solution: use discontinuity points to rebuild the polyline, this also remove small co-linear segments, like merging them.

Then you can use the output curve/polyline to "feed" my old definition you linked.

This is not properly a correct solution, because the definition "wants" you to adapt the geometry.

I'm working in a definition that accept any shape...

New files

Attachments:

PMing with you, I was talking about my older definition, which you linked here at OP.

It's ugly and dispersive, but at least works.

When I'll have time I will try to do a version with adaptive size for arcs and texts again...

Attachments:

Riccardo thank you!!!!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service