ABAQUS/Viewer 결과에서 3D pdf를 인쇄하는 방법을 찾고 있습니다. 이렇게하면 시뮬레이션 결과에 관심이 있지만 ABAQUS에 액세스 할 수없는 다른 사용자와 결과를 쉽게 통신 할 수 있습니다.ABAQUS/Viewer에서 3D PDF를 인쇄하는 방법은 무엇입니까?
4
A
답변
6
가장 좋은 방법은 vrml 파일을 내보내고 Tetra4D 또는 pdf3D 및 Adobe Acrobat 전문가를 사용하여 변환하는 것입니다. 3D pdfs는 매우 잘 보입니다. 그러나 상용 소프트웨어는 연간 800 파운드 이상의 비용이 소요됩니다. 나는 U3D 파일을 생성하기 위해 Meshlab (http://www.meshlab.net/), U3D 파일을 생성하기 위해 Meshlab (2) MikeTeX (https://miktex.org/)를 사용하여 U3D 파일을 aaa 파일로 변환하는 Abaqus/CAE & Viewer에서 직접 3D pdf를 생성하는 Python 스크립트를 만들었습니다. pdf. 출력물은 Tetra4D만큼 세련되지는 않지만 작동합니다. 나는 Meshlab의 최신 버전으로 이것을 시도하지 않았다. Abaqus/CAE 또는 Abaqus/Viewer에서이 스크립트를 실행하면됩니다.
아바쿠스 * .odb 결과 Tecplot 360을 사용하는 인쇄의 가장 간단한 방법은 어느 아바쿠스 * .odb 파일을 읽어 당신은 *이 .tif을 얻을 수 있으며, * .PNG 결과를 어떤 해상도와 당신이 할 수있는# Abaqus CAE/Viewer Python Script to create a 3D pdf directly from Abaqus/CAE or Abaqus/Viewer.
# You must first install meshlab (meshlabserver.exe)and MiKTeX (pdflatex.exe)
# Edit this script to reflect the installed locations of meshlabserver.exe and pdflatex.exe
# It will export a stl or obj file the mesh of current viewport and convert into 3D pdf
# Or run in Abaqus/viewer and it will create a VRML file and convert to 3D pdf.
# If contours are displayed in Abaqus Viewer, then it will create a contour 3D pdf
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: # for Abaqus Viewer
cOdbD=currView.odbDisplay
odb = session.odbs[cOdbD.name]
name=odb.name.split(r'/')[-1].replace('.odb','')
module='Vis'
except: # Abaqus CAE
#name=currView.displayedObject.modelName
import stlExport_kernel
name = repr(currView.displayedObject).split('[')[-1].split(']')[0][1:-1] # allows for either main or visulation modules
module='CAE'
print module
if module=='CAE':
#All instances must be meshed
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: # Abaqus/Viewer
if cOdbD.viewCut:
session.graphicsOptions.setValues(antiAlias=OFF) # Better with anti aliasing off
odb = session.odbs[cOdbD.name]
directory=odb.path.replace(odb.path.split('/')[-1],'').replace('/','\\')
# Turn off most of the stuff in the viewport
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)
#Check file was deleted
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 #a dodgy way to exit program
# Invoke meshlab to convert to a .u3d file
if cOdbD: #If in Abaqus/viewer
if 'CONTOURS' in repr(cOdbD.display.plotState[0]): # If contours are displayed. Output contoured pdf
p=subprocess.Popen([meshlab_path,'-i',pdfName + ext, '-o',pdfName + '.u3d','-m','vc']) #'vn fn fc vt'
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() # Wait for meshlab to finish
file_fullPathName=os.path.join(directory, pdfName + '.tex')
#Read the .tex file which meshlab has just created
with open(file_fullPathName, 'r') as texFile:
lines = texFile.read()
#Edit the .tex file
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
1
또한 3D로 모델을 회전하고 글꼴 및 필요한 모든 것을 변경하십시오.
관련 문제
- 1. iText로 만든 PDF를 인쇄하는 방법은 무엇입니까?
- 2. Catia로 3D pdf를 만드는 방법
- 3. pdf를 인쇄하는 방법?
- 4. 브라우저에서 PDF를 인쇄하는 방법
- 5. 함수에서 pdf를 인쇄하는 방법
- 6. 리눅스에서 pdf를 인쇄하는 Bash 스크립트
- 7. Qt5에서 프린터로 PDF를 인쇄하는 방법
- 8. 문서 나 PDF를 인쇄하는 코드를 다음 사용
- 9. 3d 배열을 인쇄하는 것을 고투하십시오
- 10. PDF를 생성하는 방법은 무엇입니까?
- 11. 엔티티 인쇄 모듈에서 엔티티를 인쇄하는 방법은 무엇입니까?
- 12. mysql_num_rows를 인쇄하는 방법은 무엇입니까?
- 13. 히스토그램을 인쇄하는 방법은 무엇입니까?
- 14. 벡터를 인쇄하는 방법은 무엇입니까?
- 15. pdf를 이메일로 보내고 공유하고 인쇄하는 방법?
- 16. Delphi : PDF를 표시하지 않고 인쇄하는 방법?
- 17. 자바를 사용하여 출력 스트림 PDF를 인쇄하는 방법
- 18. 안드로이드를 사용하여 PDF를 인쇄하는 방법 4.4 인쇄 프레임 워크
- 19. 큰 URL 목록을 PDF로 인쇄하는 방법은 무엇입니까?
- 20. C에서 \\을 (를) 인쇄하는 방법은 무엇입니까? (fprintf)
- 21. Rails 소스 코드를 인쇄하는 방법은 무엇입니까?
- 22. PDF를 React에서 만드는 방법은 무엇입니까?
- 23. dwg에서 pdf를 만드는 방법은 무엇입니까?
- 24. epydoc으로 pdf를 생성하는 방법은 무엇입니까?
- 25. PDF를 FDF와 병합하는 방법은 무엇입니까?
- 26. reStructuredText에서 PDF를 만드는 방법은 무엇입니까?
- 27. reactjs에서 pdf를 여는 방법은 무엇입니까?
- 28. geospatial pdf를 만드는 방법은 무엇입니까?
- 29. Zweckform 4737 레이블을 인쇄하는 방법은 무엇입니까?
- 30. 새 PDF를 만들지 않고 PDF를 업데이트하는 방법은 무엇입니까?
방금 솔루션을 사용해 보았지만 제대로 작동하는지 확인한 결과 매우 만족 스럽습니다. 감사합니다! – CodeCupboard
@churchwalk 기쁘게 생각합니다. AbaqusViewer contoured export로 음영 처리 방법을 찾을 수 없었습니다. 그러나 그것은 아직도 꽤 좋아 보인다. – DougR
관심있어,이 방법은 파워 포인트 프레 젠 테이션에 3d 이미지를 만드는 데 사용할 수 있습니까? – CodeCupboard