The best way is to export the vrml file and convert it using Tetra4D or pdf3D and Adobe Acrobat professional. 3D pdf can look very good. However, commercial software will cost more than £ 800 a year. I created a Python script to create 3D pdf directly from Abaqus / CAE and Viewer, which uses 2 open source tools: 1) Meshlab ( http://www.meshlab.net/ ) to create a U3D file, 2) MiKTeX ( https://miktex.org/ ) to convert a U3D file to pdf. The output is not as polished as Tetra4D, but it works. I have not tried this with the latest version of Meshlab. Just run this script from Abaqus / CAE or Abaqus / Viewer.
from abaqus import *
from abaqusConstants import *
from viewerModules import *
import os
import subprocess
import sys
pdfName='try'
meshlab_path="C:/Program Files/VCG/MeshLab/meshlabserver.exe"
pdfLatex_path="C:/Program Files (x86)/MiKTeX 2.9/miktex/bin/pdflatex.exe"
currView=session.viewports[session.currentViewportName]
try:
cOdbD=currView.odbDisplay
odb = session.odbs[cOdbD.name]
name=odb.name.split(r'/')[-1].replace('.odb','')
module='Vis'
except:
import stlExport_kernel
name = repr(currView.displayedObject).split('[')[-1].split(']')[0][1:-1]
module='CAE'
print module
if module=='CAE':
cOdbD=None
try:
ext='.stl'
stlExport_kernel.STLExport(moduleName='Assembly', stlFileName=pdfName + ext, stlFileType='BINARY')
except:
try:
ext='.obj'
session.writeOBJFile(fileName=os.path.join(directory,pdfName + ext), canvasObjects= (currView, ))
except:
print 'Either your assembly is not fully meshed or something else'
directory=(os.getcwd())
else:
if cOdbD.viewCut:
session.graphicsOptions.setValues(antiAlias=OFF)
odb = session.odbs[cOdbD.name]
directory=odb.path.replace(odb.path.split('/')[-1],'').replace('/','\\')
currView.viewportAnnotationOptions.setValues(triad=OFF,
legend=OFF, title=OFF, state=OFF, annotations=OFF, compass=OFF)
ext='.wrl'
session.writeVrmlFile(fileName=os.path.join(directory,pdfName + ext),
compression=0, canvasObjects= (currView, ))
pdfFilePath=os.path.join(directory,pdfName+'-out.pdf')
if os.path.isfile(pdfFilePath):
os.remove(pdfFilePath)
if os.path.isfile(pdfFilePath):
print "Aborted because pdf file of same name cant be deleted. Please close programs which it might be open in"
1/0
if cOdbD:
if 'CONTOURS' in repr(cOdbD.display.plotState[0]):
p=subprocess.Popen([meshlab_path,'-i',pdfName + ext, '-o',pdfName + '.u3d','-m','vc'])
else:
p=subprocess.Popen([meshlab_path,'-i',pdfName + ext, '-o',pdfName + '.u3d'])
else:
p=subprocess.Popen([meshlab_path,'-i',pdfName + ext, '-o',pdfName + '.u3d'])
p.communicate()
file_fullPathName=os.path.join(directory, pdfName + '.tex')
with open(file_fullPathName, 'r') as texFile:
lines = texFile.read()
lines=lines.replace("\usepackage[3D]{movie15}","\\usepackage[3D]{movie15}\n\\usepackage[margin=-2.2in]{geometry}")
if cOdbD:
if 'CONTOURS' in repr(cOdbD.display.plotState[0]):
lines=lines.replace("3Dlights=CAD,","3Dlights=CAD,\n\t3Drender=SolidWireframe,")
lines=lines.replace("\n\end{document}","{---------------------------------------------------------------------------------Click above! MB1 - rotate, MB2 wheel or MB3 - zoom, Ctrl-MB1 - pan--------------}\n\\end{document}")
file_fullPathName=os.path.join(directory, pdfName + '-out.tex')
with open(file_fullPathName, "w") as outp:
outp.write(lines)
p=subprocess.Popen([
pdfLatex_path,
pdfName + '-out.tex',
])
p.communicate()
print 'Conversion to pdf complete'
print file_fullPathName