×
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

HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

(OP)
thread799-178458: HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

Hi everybody,

I have done an analysis in abaqus and then I had to export the final part geometry in a CAD file. But unfortunately the abaqus add-on for direct export of the final part geometry is not working so I have to write a python script for it. There was a thread many years ago and one of the members here (cdeepakroy) wrote a script but it was 2D and he saved it in VTK. Does anybody know how whould be script if it were to be 3D and saved as VRML or STL?

Here is the script:

# create odb object from odb file
outputDatabase = session.openOdb(name= ImplantAnalysisJob.name + '.odb' )

# get access to the nodal displacement data
frame = outputDatabase.steps[ '<give-step-name-here>' ].frames[-1]

dispField = frame.fieldOutputs['U']

# get access to the part instance -- thru which u can access the undeformed nodal position coordinates
my_part_instance = outputDatabase.rootAssembly.instances['PART-1-1']


# Write deformed shape to vtk file
# NOTE: if you want to export to a different file format, you should appropriate code for that file format here

outFile = open( 'deformed_shape.vtk' , 'w' )

# write vtk header

outFile.write( '# vtk DataFile Version 3.0' )
outFile.write( '\nvtk output' )
outFile.write( '\nASCII' )
outFile.write( '\nDATASET UNSTRUCTURED_GRID' )

# write points

numNodesTotal = len( my_part_instance.nodes )

outFile.write( '\n\nPOINTS ' + str( numNodesTotal ) + ' float' )

for i in range( numNodesTotal ):

curNode = my_part_instance.nodes[i]

defNodePos = curNode.coordinates + dispField.values[i].data

outFile.write( '\n' )

for j in range( 3 ):

outFile.write( str( defNodePos[j] ) + ' ' )

# write cells

numElementsTotal = len( my_part_instance.elements )

outFile.write( '\n\nCELLS ' + str( numElementsTotal ) + ' ' + str( numElementsTotal * 5 ) )

for i in range( numElementsTotal ):

curElement = list( [4] + list( my_part_instance.elements[i].connectivity ) )

outFile.write( '\n' )

for j in range( 5 ):

outFile.write( str( curElement[j] ) + ' ' )

# write cell types

outFile.write( '\n\nCELL_TYPES ' + str( numElementsTotal ) )

for i in range( numElementsTotal ):

outFile.write( '\n10' )

# write cell data

outFile.write( '\n\nCELL_DATA ' + str( numElementsTotal ) )

# write point data

outFile.write( '\n\nPOINT_DATA ' + str( numNodesTotal ) )

outFile.close()

outputDatabase.close()

RE: HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

I believe that now there is a much simpler way. While viewing the results go to Plug-Ins>Tools>STL Export.

I hope this helps.
Rob

Rob Stupplebeen
Rob's Engineering Blog
Rob's LinkedIn Profile

RE: HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

(OP)
Dear rstupplebeen,

Tnx for the answer but as I said Unfortunately that option doesn't work. It only export the tool geometry and not the part geometry.

RE: HELP ! URGENT ! Export deformed shape into any CAD format from ABAQUS

Get the deformed mesh of the part into a new model by importing from the .odb

Then try to export as .STL using the plug-in. Might work?

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


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close