# Rhino 5: drawing curves with arc, specifying length

Hi, I have been trying to draw a curve using the arc command.

Using centre of circular curve, radius and the length of arc.

Sometimes I seem to get a result. Mostly not.

I am trying to specify the length. Using the segment angle does not provide an exact length due to the no. Of dp’s rounding error.

The Arc data is simple R=161m and the length is 250m start point isn’t critical. The curve length is.

I was trying to draw in GH, but thought that setting the curve in Rhino was easier, alas not yet.

Rhino has the _Arc command which allows to specify the length from the commandline after you have picked the center and start point. For your arc centered at the origin this would be:

`_Arc 0 161,0,0 _Length 250`

above creates the arc in question, if your units are set to meters. The arc starts at the x-axis and goes counterclockwise, the computed angle is 88.9686017°

If you want to do this in Grasshopper, calculating the arc angle in radians is easy like this:

`angle_in_radians = arc_length / arc_radius`

Below example in GH which draws the counterclockwise arc centered at the world origin.

c.

Is this about Grasshopper Developer? Are you trying to create arcs through code?

Yes, I am trying to learn scripting for IFC classes in Infrastructure. gg seems to cover building classes…that is one of my aims (longer term)

The arc seemed to be the simplest geometry for which I was hoping to get scripting information, about the fields required for an arc, which I got from Clement.

I thought grasshopper developer was appropriate.

Rgds

Kenyon

Ah get you, there are two grasshopper topics, I have been typing on my iPad and only saw grasshopper twice, without the developer part of the tag.

Should have been in the grasshopper (only) topic. My mistake. My aim is still scripting for infrastructure.

Sorry.

No worries, easy mistake to make.

It’s often not possible to exactly mimic Rhino commands as GH components, because Rhino commands have the benefit of being able to infer certain information from the context of the command (where is the cursor located? which view is active? what’s the orientation of the current c-plane?). Grasshopper components do not exist in such a context so they often need to specifically ask for that kind of information. Creating an arc with a specific length will require more than just the end-points and the length, as an infinite number of arcs would meet those criteria. The orientation needs to be defined as well, either as a plane or as a tangent vector. Unfortunately once you do this the inputs are overconstrained. If the end-points do not lie on the plane then the plane cannot be used, etc. etc.

It would definitely be possible to create an arc with a specific length, but it’s difficult to see what sort of inputs would actually be helpful. It may be easier to just create the complete circle, then trim it to a specific length:

cutcurve.gh (6.7 KB)

Many thanks David, I was looking at it from a very simple approach. If in a 2D plane, if I have the start point and centre of the circle/arc and a length along that curve, I can only move either clockwise or anticlockwise. I can do this easily in Rhino and have been setting the curves manually.
I was looking at from the curve length approach as I couldn’'t get the angle subtended approach to give me the ‘exact’ magical 250m, which i was reverse engineering. Normally the curve or curves if a compound curve would be the unknown and the end points known.

I have used software MX in the distant past that for compound or multiple arcs/curves introduced or removed translational constraints at the intermediate or an end points of segments.If the support was indeterminate there would be no solution.