maksolino Posted June 17, 2010 Posted June 17, 2010 hello to all Rhino question. it is possible to make a lisp for : Measure lenght of a curve between two point. Thanks Quote
alanjt Posted June 17, 2010 Posted June 17, 2010 I posted this one a while back... http://www.theswamp.org/index.php?topic=32677.0 Quote
ReMark Posted June 17, 2010 Posted June 17, 2010 Does Rhino support the use of lisp? I thought it relied upon VBscript? Quote
alanjt Posted June 17, 2010 Posted June 17, 2010 Does Rhino support the use of lisp? I thought it relied upon VBscript? Beats me. He said LISP, so that's what I provided. Quote
ReMark Posted June 17, 2010 Posted June 17, 2010 Alan. Don't give them what they ask for...give them what they need! Maybe the OP can clear up the confusion. Quote
ReMark Posted June 17, 2010 Posted June 17, 2010 I found a paper written in 2004 that clearly mentions that Rhiniceros uses vbScript. http://www.rhino3d.com/tutorials/vbscript/RhinoScript.pdf Quote
alanjt Posted June 17, 2010 Posted June 17, 2010 Alan. Don't give them what they ask for...give them what they need! Maybe the OP can clear up the confusion. LoL, noted. I found a paper written in 2004 that clearly mentions that Rhiniceros uses vbScript. http://www.rhino3d.com/tutorials/vbscript/RhinoScript.pdf Well, that answers that question. Quote
SEANT Posted June 20, 2010 Posted June 20, 2010 This would be a RhinoScript version of that particular task: Option Explicit Sub LenBetweenPts Dim crv Dim stParam, ndParam Dim msg Dim stpt, ndpt Dim arrSubDomain(1), dblLen With Rhino crv = .GetObject("Pick a curve", 4) .EnableRedraw False If (VarType(crv) <> vbString) Then Exit Sub stpt = .GetPointOnCurve (crv, "Pick first Point:") If Not IsArray(stpt) Then Exit Sub stParam = .CurveClosestPoint(crv, stpt) ndpt = .GetPointOnCurve (crv, "Pick next Point:") If Not IsArray(ndpt) Then Exit Sub ndParam = .CurveClosestPoint(crv, ndpt) If stparam > ndparam Then arrSubDomain(1) = stParam arrSubDomain(0) = ndParam Else arrSubDomain(0) = stParam arrSubDomain(1) = ndParam End If dblLen = Rhino.CurveLength(crv,, arrSubDomain) If IsNumeric(dblLen) Then msg = "Length between points: " & CStr(dblLen) .Print msg End If .EnableRedraw True End With End Sub Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.