Array Points on Surface
来源:互联网 发布:新浪域名国外的 编辑:程序博客网 时间:2024/06/11 08:36
# Creates an array of points on a surfaceimport rhinoscriptsyntax as rsdef ArrayPointsOnSurface(): # Get the surface object surface_id = rs.GetObject("Select surface", rs.filter.surface) if surface_id is None: return # Get the number of rows rows = rs.GetInteger("Number of rows", 2, 2) if rows is None: return # Get the number of columns columns = rs.GetInteger("Number of columns", 2, 2) if columns is None: return # Get the domain of the surface U = rs.SurfaceDomain(surface_id, 0) V = rs.SurfaceDomain(surface_id, 1) if U is None or V is None: return # Add the points for i in xrange(0,rows): param0 = U[0] + (((U[1] - U[0]) / (rows-1)) * i) for j in xrange(0,columns): param1 = V[0] + (((V[1] - V[0]) / (columns-1)) * j) point = rs.EvaluateSurface(surface_id, param0, param1) rs.AddPoint(point)# Check to see if this file is being executed as the "main" python# script instead of being used as a module by some other python script# This allows us to use the module which ever way we want.if __name__ == "__main__": # call the function defined above ArrayPointsOnSurface()
阅读全文
0 0
- Array Points on Surface
- HDU1700:Points on Cycle
- codeforces251A. Points on Line
- CF251A. Points on Line
- codeforces251A. Points on Line
- Points on C 第一章总结
- hdu1700 Points on Cycle (数学)
- Max Points on a Line
- Max Points on a Line
- Max Points on a Line
- Max Points on a Line
- Max Points on a Line
- Max Points on a Line
- Max Points On a Line
- Max Points on a Line
- Max Points on a Line
- Max Points on a Line
- max points on a line
- jemete(java apache) 压力测试工具 (接口测试工具) window apache php 环境
- Android中的ToolBar使用
- android控件06---CheckBox
- 微信公众号测试环境访问本地项目-ngrok
- 28个企业运维岗经典面试题
- Array Points on Surface
- Comparable和Comparator的比较
- 查找组成一个偶数最接近的两个素数
- javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.
- android ANR 杂乱 文档整理中,各位先不要点击查看
- JAVA新手入门--对数据类型/标识符/包等概念的初步认识与了解
- 设计模式之建造者模式(Builder)
- 网址http格式的拆分
- 【图解算法】排序算法——快速排序