我的问题可能听起来很简单,但我对 Abaqus 脚本的了解几乎不存在。我的目标是在同一零件中表示一组多边形,其中每个多边形代表零件的 2D 表面(在 3D 空间中)。我正在创建一个脚本来为每个多边形生成一个草图(不确定这是否是最好的方法)。然后为草图创建一个曲面。
我怎么能做到这一点?
非常感谢!
编码:
from abaqus import *
from abaqusConstants import *
import sketch
import part
MyModel=mdb.Model(name='Model-1')
#-------------FIRST POLYGON-------------------------------
s1=MyModel.ConstrainedSketch(name='__poly0__', sheetSize=100)
g, v, d, c = s1.geometry, s1.vertices, s1.dimensions, s1.constraints
s1.Line(point1=(10.0, 10.0), point2=(10.0, 15.0))
s1.Line(point1=(10.0, 15.0), point2=(-10.0, 15.0))
s1.Line(point1=(-10.0, 15.0), point2=(-10.0, -15.0))
s1.Line(point1=(-10.0, -15.0), point2=(10.0, -15.0))
s1.Line(point1=(10.0, -15.0), point2=(10.0, -10.0))
s1.Line(point1=(10.0, -10.0), point2=(5, 0))
s1.Line(point1=(5, 0), point2=(10.0, 10.0))
#-------------SECOND POLYGON-------------------------------
s2=MyModel.ConstrainedSketch(name='__poly1__', sheetSize=100)
g, v, d, c = s2.geometry, s2.vertices, s2.dimensions, s2.constraints
s2.Line(point1=(10.0, 10.0), point2=(5, 0))
s2.Line(point1=(5, 0), point2=(10.0, -10.0))
s2.Line(point1=(10.0, -10.0), point2=(10.0, -15.0))
s2.Line(point1=(10.0, -15.0), point2=(15.0, -15.0))
s2.Line(point1=(15.0, -15.0), point2=(15.0, 0.0))
s2.Line(point1=(15.0, 0.0), point2=(10, 10))
#----------ONE PART WITH TWO PLANAR FACES (ONE PER POLYGON)-----
p = mdb.models['Model-1'].Part(name='Part-1', dimensionality=THREE_D,type=DEFORMABLE_BODY)
p = mdb.models['Model-1'].parts['Part-1']
#How can I put two planar faces here?
#First Polygon
#p.BaseShell(sketch=s1)
#del mdb.models['Model-1'].sketches['__poly0__']
#Second Polygon
#p.BaseShell(sketch=s2)
#del mdb.models['Model-1'].sketches['__poly1__']
#-------------------------------------------------------------