当前位置: 首页>>代码示例>>Python>>正文


Python Geometry.writeFEPOINT方法代码示例

本文整理汇总了Python中geometry.Geometry.writeFEPOINT方法的典型用法代码示例。如果您正苦于以下问题:Python Geometry.writeFEPOINT方法的具体用法?Python Geometry.writeFEPOINT怎么用?Python Geometry.writeFEPOINT使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在geometry.Geometry的用法示例。


在下文中一共展示了Geometry.writeFEPOINT方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from geometry import Geometry [as 别名]
# 或者: from geometry.Geometry import writeFEPOINT [as 别名]
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)








开发者ID:JustinSGray,项目名称:pyBspline,代码行数:24,代码来源:test_body.py

示例2:

# 需要导入模块: from geometry import Geometry [as 别名]
# 或者: from geometry.Geometry import writeFEPOINT [as 别名]
deltaC_c = np.array(zip(deltaC_cx,deltaC_cr))
deltaC_tx = np.zeros((n_c,))
deltaC_tr = np.zeros((n_c,))
# deltaC_tr[:-1] = 1 #second to last element, set to 10
deltaC_t = np.array(zip(deltaC_tx,deltaC_tr))
geom.deform(cowl=(deltaC_c,deltaC_t))


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('new.fepoint')




import pylab as p
profile = geom.project_profile()
for point_set in profile: 
    X = point_set[:,0]
    Y = point_set[:,1]
    p.plot(X,Y)

p.show()

开发者ID:JustinSGray,项目名称:pyBspline,代码行数:31,代码来源:simple_nozzle.py


注:本文中的geometry.Geometry.writeFEPOINT方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。