Hi everyone,
I am trying to automate the process of creating models in ABAQUS using pure python scripting techniques. Even though I found a few resources on the web for specific but relatively easy geometry examples, I could not get how to use *faces.findAt to choose the faces I would like to partition. The sequence of points etc. are not very clear to me.
This is an example piece of code for the extruded C-Channel I am trying to partition using a datum plane I defined earlier. I don't have a problem with defining those datum planes. It's the choice of faces. I got this using session.journalOptions.setValues(recoverGeometry=COORDINATE):
mdb.models['W2_527h_8'].parts['channel'].PartitionFaceByDatumPlane(datumPlane=
mdb.models['W2_527h_8'].parts['channel'].datums[3], faces=
mdb.models['W2_527h_8'].parts['channel'].faces.findAt(((38.667267, 193.294,
1625.599935), (0.0, -1.0, 0.0)), ((0.0, 128.862671, 1625.599935), (1.0,
0.0, 0.0)), ((19.333633, 0.0, 1625.599935), (0.0, 1.0, 0.0)), ))
I would be glad if anybody could explain any further. Thank you in advance.
I found on the Internet
I found on the Internet that you can use:
Face = mdb.models['Model-1'].parts['Part-1'].faces.getByBoundingSphere( (0,0,50), 500)
Or probably
Face = mdb.models['Model-1'].parts['Part-1'].faces.getByBoundingBox()
I made short script that seems to work (but don't know if that's what you want to accomplish). It creates C-chanel sketch using shell extrusion, creates datum plane and section is created in middle of channel.
from abaqus import *
from abaqusConstants import *
import sketch
import part
MyModel=mdb.Model(name='Model-1')
CSketch=MyModel.ConstrainedSketch(name='C-channel', sheetSize=100)
g, v, d, c = CSketch.geometry, CSketch.vertices, CSketch.dimensions, CSketch.constraints
CSketch.Line(point1=(10.0, 10.0), point2=(10.0, 15.0))
CSketch.Line(point1=(10.0, 15.0), point2=(-10.0, 15.0))
CSketch.Line(point1=(-10.0, 15.0), point2=(-10.0, -15.0))
CSketch.Line(point1=(-10.0, -15.0), point2=(10.0, -15.0))
CSketch.Line(point1=(10.0, -15.0), point2=(10.0, -10.0))
p = mdb.models['Model-1'].Part(name='Part-1', dimensionality=THREE_D,
type=DEFORMABLE_BODY)
p = mdb.models['Model-1'].parts['Part-1']
p.BaseShellExtrude(sketch=CSketch, depth=100.0)
DatumP = ((0, 0 ,50), (-10,0,50), (-10,-10,50,))
p.DatumPlaneByThreePoints(point1=DatumP[0],
point2=DatumP[1], point3=DatumP[2])
d1=p.datums
Face = mdb.models['Model-1'].parts['Part-1'].faces.getByBoundingSphere( (0,0,50), 500)
p.PartitionFaceByDatumPlane(datumPlane=d1[2], faces=Face)