Looking for a function in RS

So I am digging through the api’s… I am trying to find a function that will do the following.

Select multiple closed curves
Run some function that will measure all angles in the curve
Then throw a point on that area if it falls below a certain degree.

I can write all of it… I just need to know if there is a function for this.

Better visual would be a triangle. I need to get all the interior angle degrees.

VB, C#, Python, or RS… it dosnt matter.


i guess you would just have to get the polyline segments and measure the angle between their tangent vectors. RhinoScript has the Angle2 method to do this, eg in python:

angle, ref_angle = rs.Angle2((origin, tangent_A), (origin, tangent_B))

The origin variable is always the world origin (0,0,0), tangent_A is the tangent located at the end of the first segment, tangent_B is measured at the start of the second. For closed curves, you’ll need to measure between last and first segment as well.


In addition to what Clement said, if the curves are polycurves and not just polylines, you will have to be able to separate them into their subsegments first and check those joints in the same way. If you are using rhinoscriptsyntax, you will end up having to use rs.ExplodeCurve; otherwise you will need to drill down into RhinoCommon and use something like Rhino.Geometry.PolyCurve.DuplicateSegments().


Thanks. I am going to playaround with those.

I wanted to basically select a whole bunch of closed curves and throw a point down where the angle is less than a certain degree.

I’ll post back if I run into any troubles