本文整理汇总了Python中geometry.Geometry.writeSTL方法的典型用法代码示例。如果您正苦于以下问题:Python Geometry.writeSTL方法的具体用法?Python Geometry.writeSTL怎么用?Python Geometry.writeSTL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geometry.Geometry
的用法示例。
在下文中一共展示了Geometry.writeSTL方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from geometry import Geometry [as 别名]
# 或者: from geometry.Geometry import writeSTL [as 别名]
#params = geom.get_params() #params['centerbody'] = [(0,0),]
print "Bspline Compute Time: ", time.time()-start_time
start_time = time.time()
deltaC_x = np.zeros((n_c,))
deltaC_r = np.zeros((n_c,))
deltaC_r[-1] = 10 #second to last element, set to 10
deltaC = np.array(zip(deltaC_x,deltaC_r))
geom.deform(centerbody=deltaC)
print "Run Time: ", time.time()-start_time
start_time = time.time()
geom.writeSTL('new.stl', ascii=False)
print "STL Write Time: ", time.time()-start_time
start_time = time.time()
geom.writeFEPOINT('deform.dat')
print "FEPoint Write Time: ", time.time()-start_time
#geometry.writeSTL('new.stl',body.coords.cartesian,ascii=False)
#centerbody.writeFEPOINT('deform.dat',body.coords.cartesian)