Rhino如何画一个指定周长的圆

1
回复
7335
查看
[复制链接]

微信扫一扫 分享朋友圈

签到天数: 3030 天

连续签到: 1 天

[LV.Master]开坛元老

发表于 2011-7-28 16:18:40 | 显示全部楼层 |阅读模式
tony提供rhinoscript方法 RhinoScript 里带的这串指令应该可以达到目的

  1. Sub CircleFromLength()
  2.   Dim arrCenter, arrPlane, dblLength, dblRadius, strObject
  3.   arrCenter = Rhino.GetPoint("Center point of circle")
  4.   If IsArray(arrCenter) Then
  5.     arrPlane = Rhino.MovePlane(Rhino.ViewCPlane, arrCenter)
  6.     dblLength = Rhino.GetReal("Circle circumference")
  7.     If IsNumeric(dblLength) And (dblLength > 0.0) Then
  8.       dblRadius = dblLength / (2 * Rhino.PI)
  9.       strObject = Rhino.AddCircle(arrPlane, dblRadius)
  10.       Rhino.SelectObject strObject
  11.     End If
  12.   End If
  13. End Sub  
复制代码
我提供的marco 寫個按鍵小巨集
輸入的是半徑值 自動用縮放轉化為週長
  1. circle
  2. Radius
  3. 0
  4. pause
  5. SelLast
  6. scale
  7. 0
  8. 0.5/3.141592654
复制代码

订阅 Rhino 最新资讯
回复

使用道具 举报

签到天数: 5 天

连续签到: 1 天

[LV.2]故地重游

发表于 2011-9-18 09:55:46 | 显示全部楼层
VB啊。。和C语言有什么不同呢~~~~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

15927211580

周一至周五 9:30-18:00

武汉市武昌区中山路380号201

  • 关注微信公众号

  • 微信咨询客服号

QQ- Archiver- 鄂ICP备12016959号   充值M币 |勋章中心 | ( 鄂ICP备12016959号 )

Powered by Discuz!X3.2© 2001-2013 Comsenz Inc.

金融信息行业协会理事单位 | 信息服务业行业协会会员单位 | 网络信贷服务业企业联盟单位