参数化设计的方法_第1页
参数化设计的方法_第2页
参数化设计的方法_第3页
参数化设计的方法_第4页
参数化设计的方法_第5页
已阅读5页,还剩38页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、RichieCADesign .cn+Landscape +Architecture +CityPlanning27CADesign .cn目前计算机辅助风景园林规划设计的状况2D3D?手工“手工”智能DATA67避免形而上谈论计算机辅助设计技术坚持传统设计基础上拓展新的设计方法计算机辅助风景园林规划设计策略的基本架构计算机辅助设计与学科高度交叉的风景园林规划专业1-以参数模型构建的方式主导设计过程2-以对数据的地理信息化辅助规划设计过程3-以对建筑环境生态模拟控制与优化设计的过程以参数模型构建的方式主导设计过程基于节点式参数化工具Grasshopper(GH)的基本构建使用Python语言构

2、建参数化模型#导入需要用到的标准库import rhinoscriptsyntax as rsimport mathimport random#basiclines函数定义建筑水平方向的结构线,输入条件为一个点def basiclines(basicpoint,lengthunit,angle,offsetvalue,topbplineheigh,multiple1,multiple2,multiple3, floorheight): bpoint0=(basicpoint0,basicpoint1,basicpoint2) bpoints= bpoints.append(bpoint0) l

3、engthunit=lengthunit #lengthunit定义截面基本间距单元 multiple1=multiple1 #定义第一段截面基本间距单元倍数 bpoint1=(bpoint00+multiple1*lengthunit,bpoint01,bpoint02) bpoints.append(bpoint1) angle=angle #angle定义建筑转折处的角度 multiple2=multiple2 #定义第二段截面基本间距单元倍数 hypotenuse=multiple2*lengthunit bpoint2=(bpoint10+hypotenuse*math.sin(an

4、gle), bpoint11+hypotenuse*math.cos(angle),bpoint12) bpoints.append(bpoint2) multiple3=multiple3 #定义第三段截面基本间距单元倍数 bpoint3=(bpoint20+multiple3*lengthunit,bpoint21,bpoint22) bpoints.append(bpoint3) bpline0=rs.AddPolyline(bpoints) #底层水平结构线 bplines= bplines.append(bpline0) fh=floorheight #层高 #建立上部水平结构线fo

5、r i in range(1,4): dividecurvelength=rs.CopyObject (bpline0,0,0,fh*i) bplines.append(dividecurvelength) offsetbplines= offsetvalue=offsetvalue for j in bplines: offsetbpline=rs.OffsetCurve(j,0,0,0,offsetvalue) offsetbplines.append(offsetbpline) topbplineheight=topbplineheighttopbplinecenter=rs.Offse

6、tCurve(bplines-1,0,0,0,offsetvalue/2) topbpline=rs.CopyObject(topbplinecenter,0,0,topbplineheight) 参数化协同设计的方法结构协同设计生态分析协同动力学的协同地理信息系统协同结构协同设计Ansys Workbench生态分析协同动力学的协同地理信息系统协同最小外接立方体V=0.326025m3 V=0.512441m3进化计算与迭代参数化的目的探索“未知”的形态手段纯粹的形式引入影响因子参数化的目的探索“未知”的形态手段纯粹的形式引入影响因子参数化的目的可以建造的“未知”形态形式构建探索已建造参数化

7、的目的可以建造的“未知”形态形式构建探索已建造大厦的设计借助了航空业设计软件,可以根据理想数据调整各种设计,也可以非常方便地计算各种材料的型号及数量。建筑设计这个行业虽然还停留在20世纪,但lT等产业已经进入21世纪,所以电脑技术的应用必不可少。英国伦敦瑞士再保险总部大厦参数化的目的参数化传统设计形态“唯一”的设计形态形式模块参数化的目的参数化传统设计形态“唯一”的设计形态形式模块设计流程方式的创造性参数化的目的-作为解决问题的工具import rhinoscriptsyntax as rsimport mathimport random#basiclines函数定义建筑水平方向的结构线,输入

8、条件为一个点def basiclines(basicpoint,lengthunit,angle,offsetvalue,topbplineheigh,multiple1,multiple2,multiple3, floorheight): bpoint0=(basicpoint0,basicpoint1,basicpoint2) bpoints= bpoints.append(bpoint0) lengthunit=lengthunit #lengthunit定义截面基本间距单元 multiple1=multiple1 #定义第一段截面基本间距单元倍数 bpoint1=(bpoint00+m

9、ultiple1*lengthunit,bpoint01,bpoint02) bpoints.append(bpoint1) angle=angle #angle定义建筑转折处的角度 multiple2=multiple2 #定义第二段截面基本间距单元倍数 hypotenuse=multiple2*lengthunit bpoint2=(bpoint10+hypotenuse*math.sin(angle), bpoint11+hypotenuse*math.cos(angle),bpoint12) bpoints.append(bpoint2) multiple3=multiple3 #定义

10、第三段截面基本间距单元倍数 bpoint3=(bpoint20+multiple3*lengthunit,bpoint21,bpoint22) bpoints.append(bpoint3) bpline0=rs.AddPolyline(bpoints) #底层水平结构线 bplines= bplines.append(bpline0) fh=floorheight #层高 #建立上部水平结构线for i in range(1,4): dividecurvelength=rs.CopyObject (bpline0,0,0,fh*i) bplines.append(dividecurvelen

11、gth) offsetbplines= offsetvalue=offsetvalue for j in bplines: offsetbpline=rs.OffsetCurve(j,0,0,0,offsetvalue) offsetbplines.append(offsetbpline) topbplineheight=topbplineheighttopbplinecenter=rs.OffsetCurve(bplines-1,0,0,0,offsetvalue/2) 编程与设计pupoints4= for e in range(len(pupoints4sub): pupoints4.a

12、ppend(pupoints4sube0,pupoints4sube1,pupoints4sube2) sectionpolylinesparts= for q in range(len(pupoints0):#通过随机选择的点建立截面结构线 sectionpolylinesparts.append(rs.AddPolyline(pupoints0q,pupoints1q, pupoints2q,pupoints4q) return sectionpolylinesparts,pupoints4#mainfunction函数时主要为interface code,建立于用户间的互动操作def m

13、ainfunction(): basicpoint=rs.GetPoint(Select one point:) if not basicpoint:return values=5,120,12,5,4,3,4,5 lengthunit=values0 angle=values1 offsetvalue=values2 topbplineheight=values3 multiple1=values4 multiple2=values5 multiple3=values6 floorheight=values7#与用户的互动程序,图为程序运行时Rhino命令行的提示,可以看到设计过程中主要用于

14、控制建筑结构线的相关参数 while True: prompt=Setting result=rs.GetString(prompt,Insert:,(Lengthunit,Angle,Offsetvalue, Topbplineheight,Multiple1,Multiple2,Multiple3, Floorheight,Insert) if not result:return result=result.upper() if result=LENGTHUNIT: f=rs.GetReal(Lengthunit:,values0) if f is not None:lengthunit=

15、felif result=ANGLE: f=rs.GetReal(Angle(110-120):,values1,110,120) if f is not None:angle=f elif result=OFFSETVALUE: f=rs.GetReal(Offsetvalue:,values2) if f is not None:offsetvalue=f elif result=TOPBPLINEHEIGHT: f=rs.GetReal(Topbplineheight:,values3) if f is not None:topbplineheight=f elif result=MUL

16、TIPLE1: f=rs.GetReal(Multiple1:,values4) if f is not None:multiple1=f elif result=MULTIPLE2: f=rs.GetReal(Multiple2:,values5) if f is not None:multiple2=f elif result=MULTIPLE3: f=rs.GetReal(Multiple3:,values5) if f is not None:multiple3=f elif result=FLOORHEIGHT: f=rs.GetReal(Floorheight:,values5)

17、if f is not None: floorheight=f elif result=INSERT:break bplines,offsetbplines,topbpline=basiclines(basicpoint,lengthunit,angle, offsetvalue,topbplineheight,multiple1,multiple2,multiple3,floorheight) sectionpolylinespart0,pupoints40=basicpoints(bplines,lengthunit) sectionpolylinespart1,pupoints41=ba

18、sicpoints(offsetbplines,lengthunit)topdivide=rs.DivideCurveLength(topbpline,lengthunit,True,True) topdividepoints= for a in range(len(topdivide): topdividepoints.append(topdividea0,topdividea1,topdividea2) toppolylines= for s in range(len(topdividepoints): import rhinoscriptsyntax as rsmesh=mesh #导入

19、外部程序的Mesh面。meshes=rs.ExplodeMeshes(mesh) #分解单一Mesh面为多个。xymeshes=for i in range(len(meshes): if i =0: #处理分解后第一个Mesh面的展平位置。 mesh0point=rs.MeshVertices(meshesi) mesh0points= for r in mesh0point: mesh0points.append(r0,r1,r2) xymesh0=rs.OrientObject(meshesi,mesh0points, 0,10,0,10,0,0,0,0,0,1) xymeshes.ap

20、pend(xymesh0) else: #余下Mesh面的循环遍历。 vertices2=rs.MeshVertices(meshesi) vertices1=rs.MeshVertices(meshesi-1) vertices2lst= vertices1lst= for q in vertices2: vertices2lst.append(q0,q1,q2) for p in vertices1: vertices1lst.append(p0,p1,p2) #找到相邻两个面的共同顶点。 ver=m for m in vertices1lst for n in vertices2lst

21、if m=n a=ver0 b=ver1#找到相邻两个面共同顶点的索引。 indexa=vertices1lst.index(a) indexb=vertices1lst.index(b) #找到相邻两个面不共边的顶点。 cref=m for m in vertices1lst if m not in ver0 cv=m for m in vertices2lst if m not in ver0 #定义面的延展方向。 refvertice=rs.MeshVertices(xymeshesi-1) refvertices= for x in refvertice: refvertices.append(x0,x1,x2) indexc=c for c i

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论