# Skyg halfcosine plugin wanted or quick way to draw lines from points

Hi,

I have drawn an arc and used divide command 32 segments and need to draw lines down to its base line from all 32 or so points.

Any quick way of doing this ?

better still…

Well all you need to do is download my handy cosine spacing plugin for
Rhino.
Okay, so now we can divide our airfoil into a cosine spaced
curve,

so its do them the hard way. unless someone has the plugin file I could have.

Steve

draw a line longer than necessary then use `ArrayCrv` set to no rotation…

then trim off the excess.

(assuming it should look like this prior to the trim)

You could also create this just once at a known arc radius, store it as a template file somewhere; then import the file as necessary and scale it to fit the profile in question.

–Mitch

Hi,

ArrayCrv works, thanks Jeff. Also as you say Mitch, create it once then scale it to suit, which is what I decided to do until getting the replies.

Array Crv steps were :-

1. draw line at far left
2. arrayCrv and select line enter
3. select curve enter
use 33 for a divide 32 arc and no rotation.
The 33 makes the line correspond to the 33 points from divide32

then trim .

simple when you know how ! With CommandHelp still script erroring I am a bit blind.

Cheers

Steve

tbh, i’m not entirely sure of how this needs to work in order to be helpful but here’s a rough draft at a python script which will provide this type of spacing along a curve…

``````import rhinoscriptsyntax as rs
import math

def cosinedivide():

crv = rs.GetObject('Select a curve to divide', 4)
if not crv: return
rs.FlashObject(crv)
div = rs.GetInteger('Number of Segments', 10)
if not div: return

start = rs.CurveStartPoint(crv)
end = rs.CurveEndPoint(crv)

degree = 90 / div
plane = rs.WorldYZPlane()

for i in range(div + 1):
angle = math.radians(90 - degree * i)
x = start[0] + math.cos(angle) * radius
xplane = rs.MovePlane(plane, (x, 0, 0))
pt = rs.PlaneCurveIntersection(xplane, crv)
as is, it’s only doing the division along the x axis (as shown in your original example) but i suppose it could be modified to accept a user defined axis… the curve direction matters and you might have to `Flip` the curve for proper results… (in the example image, the direction of the 2nd curve down is going from rightToLeft and the others are going LtoRight…