×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Abaqus Python - how to export external triangles of a 3d mesh

Abaqus Python - how to export external triangles of a 3d mesh

Abaqus Python - how to export external triangles of a 3d mesh

(OP)
Hi,

I'm struggling to obtain the external triangles of a tetrahedral mesh...

I did meshing operation with a Python script:

CODE

##### CREATE MODEL ######
myModel = mdb.Model(name=modelName)

##### IMPORT IGES MODEL ######
mdb.openIges('model.igs'
    , msbo=True, scaleFromFile=OFF, trimCurve=DEFAULT)
myModel.PartFromGeometryFile(combine=False, convertToAnalytical=1
    , dimensionality=THREE_D, geometryFile=mdb.acis, name='model',
    stitchAfterCombine=False, stitchEdges=1, stitchTolerance=1.0, type=
    DEFORMABLE_BODY)

[..assign materials, assembly, section, loads., etc etc....]


##### CREATE TETRAHEDRAL MESH #######
myModel.parts['part'].seedPart(size=8.0)
pickedRegions = model.parts[part'].cells
myModel.parts['part'].setMeshControls(elemShape=TET, regions=pickedRegions,
    sizeGrowth=MAXIMUM, technique=FREE)
elemType = mesh.ElemType(elemCode=C3D4, elemLibrary=STANDARD,
    distortionControl=DEFAULT)
pickedRegions = (myModel.parts['part'].cells,)
myModel.parts['part'].setElementType(regions=pickedRegions, elemTypes=(elemType,))
myModel.parts['part'].generateMesh()
myModel.rootAssembly.regenerate()
#########################################
I need to export the 3d faces that compose the external surface. I tried with:

CODE

for ef1 in myModel.parts['part'].elementFaces:
    print ef1

#RESULT:
({'face': FACE1, 'label': 1})
({'face': FACE2, 'label': 1})
({'face': FACE3, 'label': 1})
({'face': FACE4, 'label': 1})
({'face': FACE1, 'label': 2})
({'face': FACE2, 'label': 2})
.... etc etc ......

###########################################

for face in myModel.parts['part'].faces:
    print face

#RESULT:
({'index': 0, 'instanceName': None, 'pointOn': ((16.626792, 29.168272, -50.806711),)})
({'index': 1, 'instanceName': None, 'pointOn': ((15.252681, -118.266439, -14.106842),)})
({'index': 2, 'instanceName': None, 'pointOn': ((-8.57784, -116.351098, -12.873274),)})
({'index': 3, 'instanceName': None, 'pointOn': ((-27.789027, -117.360474, 8.417591),)})
({'index': 4, 'instanceName': None, 'pointOn': ((-5.268457, -119.022915, -34.536412),)})
({'index': 5, 'instanceName': None, 'pointOn': ((-8.440513, -115.967772, -39.54762),)})
.... etc etc .....

############################################
but these results are not useful for my purposes.. I'm very beginning with Abaqus scripting, and I didn't find useful info in the documentation

please can you provide any suggestions?

thank you in advance, best regards

RE: Abaqus Python - how to export external triangles of a 3d mesh

Why not make shells from the solid so that you can mesh the outer surface in triangles.

Tara

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources