Archive for the ‘lines’ Category

misc.documentation.arrows.01
March.5.2010

Option Explicit ‘Script written by ‘Script copyrighted by ‘Script version Sunday, June 08, 2008 1:19:49 AM Call Main() Sub Main() Dim crv: crv = Rhino.GetObjects(“Select Curves”,4) If isNull(crv) Then Exit Sub Dim arrItems, arrValues, arrResults arrItems = array(“scale_width”,”twist_angle”,”tip_location”,”tip_angle”,”start_width”,”end_width”,”tip_length”,”type_(1)or(2)”,”curved arrows”) arrValues = array(1,0,.95,45,.2,.5,1,1,True) arrResults = Rhino.PropertyListBox (arrItems, arrValues ,,”Arrow Parameters”) Dim i If arrResults(0) .99 Then [...]

lines.curveredraw.01
November.5.2009

Option Explicit Sub CurveRedraw() Dim strObject,dblDegree,arrPoints,strCmd,arrPoint,i strObject= Rhino.GetObject (“Select curve to redraw”,4) If IsNull (strObject) Then Exit Sub If Rhino.IsCurveClosed(strObject) Then Rhino.Print “The object is a closed curve.” Exit Sub End If arrPoints = Rhino.CurvePoints(strObject) dblDegree = Rhino.CurveDegree(strObject) Rhino.DeleteObject strObject Dim strE strE=” “ If IsArray(arrPoints) Then For Each arrPoint In arrPoints If i=UBound(arrPoints) Then [...]

lines.pline2curve.01
November.5.2009

Option Explicit Sub Poly2CrvMid () Dim arrCrvs,strCrv, arrPoints,arrPoint Dim K,i,arrNPt,hh,kk arrCrvs = Rhino.GetObjects(“Select curves”, 4) If IsNull(arrCrvs) Then Exit Sub ReDim arrCC(UBound(arrCrvs)) hh=0 For Each strCrv In arrCrvs If Rhino.IsPolyline(strCrv) Then arrPoints = Rhino.PolylineVertices(strCrv) If IsArray(arrPoints) Then k=UBound(arrPoints) kk=(k+1)*2-2 ReDim arrNPt(kk) Dim nn : nn=0 For i=1 To kk Step 2 arrNPt(i) = Array((arrPoints(nn)(0)+arrPoints(nn+1)(0))/2, (arrPoints(nn)(1)+arrPoints(nn+1)(1))/2, [...]

Follow

Get every new post delivered to your Inbox.