--- cut here (距離.rvb) ---
 Dim pt1,pt2,dist,arrPt1,arrPt2
   Rhino.Command "_SelNone"
   arrPt1=Rhino.GetPoint
   Rhino.Addpoint arrPt1
   pt1=Rhino.FirstObject
 '    pt1=Rhino.GetObject("点を指示",1)
 '    arrPt1 = Rhino.PointCoordinates(pt1)
   Rhino.Command "_closestpt pause w" & Rhino.pt2str(arrPt1)
   pt2=Rhino.FirstObject
   arrPt2 = Rhino.PointCoordinates(pt2)
   dist=Rhino.Distance(arrPt1,arrPt2)
   msgbox round(dist,4) ,,"距離"
   Rhino.deleteObject(pt1)
   Rhino.deleteObject(pt2)
--- cut here (距離.rvb) ---
--- cut here (抜き勾配.rvb) ---
 Dim pt1,pt2,arrPt1,arrPt2,arrAng
   Rhino.Command "_SelNone"
   arrPt1=Rhino.GetPoint
   Rhino.Addpoint arrPt1
   pt1=Rhino.FirstObject
   arrPt2=Rhino.GetPoint
   Rhino.Addpoint arrPt2
   pt2=Rhino.FirstObject
   if arrPt1(2) > arrPt2(2) then
       arrAng=Rhino.angle(arrPt1,arrPt2)
   else
       arrAng=Rhino.angle(arrPt2,arrPt1)
   end if
   msgbox round(90+arrAng(1),4) & "°" ,,"抜き勾配" 
   Rhino.deleteObject(pt1)
   Rhino.deleteObject(pt2)
--- cut here (抜き勾配.rvb) ---  
--- cut here (R測定.rvb) ---
 Dim obj1,obj2,obj3,obj4,arrPt,dblRadius
   Rhino.Command "!_selnone"
 '    Rhino.Command "!-_curvature  _pause _MarkCurvature=Yes _pause _enter"
 '    Rhino.Command "!-_curvature _pause _m _pause _enter"
   Rhino.Command "!-_curvature "
 '    obj1=Rhino.FirstObject
 '    obj2=Rhino.nextobject(obj1)
 '    obj3=Rhino.nextobject(obj2)
   obj4 = Rhino.GetObject("カーブを選択",4)
   If (obj4 <> vbNull) Then
       arrPt = Rhino.GetPointOnCurve(obj4, "点を選択")
       dblRadius = Rhino.CurveRadius(obj4, arrPt)
       msgbox "R" & round(dblRadius,4) ,,"R寸法"
   End If
 '    Rhino.deleteObject(obj1)
 '    Rhino.deleteObject(obj2)
 '    Rhino.deleteObject(obj3)
--- cut here (R測定.rvb) ---





--- cut here (R測定.rvb 修正版) ---
  Dim obj1,obj2,obj3,obj4,arrPt,dblRadius

  Rhino.Command "!_selnone"
  Rhino.Command "!-_curvature _pause _M=_Yes _pause _enter"

  obj1=Rhino.FirstObject
  obj2=Rhino.nextobject(obj1)
  obj3=Rhino.nextobject(obj2)

  obj4 = Rhino.GetObject("カーブを選択",4)
  If (obj4 <> vbNull) Then
      arrPt = Rhino.GetPointOnCurve(obj4, "点を選択")
      dblRadius = Rhino.CurveRadius(obj4, arrPt)
      msgbox "R" & round(dblRadius,4) ,,"R寸法"
  End If
'  Rhino.command "_radius"
  Rhino.deleteObjects(array(obj1,obj2,obj3))
--- cut here (R測定.rvb 修正版) ---


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2008-05-27 (火) 15:14:29 (5823d)