Problem with importing a geometry from CATPart into mapdl #4226
Unanswered
JoseNogueron
asked this question in
Q&A
Replies: 3 comments 5 replies
-
@JoseNogueron What happens if you try fmt=0? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @JoseNogueron never mind. Instead run the command via the non-interactive method. Like so: with mapdl.non_interactive:
mapdl.run("~cat5in,cylinder,CATPart,,all,0) What happens then? |
Beta Was this translation helpful? Give feedback.
1 reply
-
@JoseNogueron Try to import one of the Catia 5 files from here (assuming you have a standard installation): |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I recently tried to import a CATIA V5 .CATPart into ANSYS MAPDL using PyMAPDL.
When I use the CAT5IN command to import a CATIA V5 .CATPart, MAPDL reports no errors, yet no geometry is brought in (no volumes/areas/lines). Has anyone managed to import CATIA V5 files into MAPDL? Any tips or prerequisites?
These are the versions that I am using:
PyMAPDL: 0.70.2
MAPDL version: 23.2
ANSYS: 2023R2
CATIA: V5-6R2021
I don’t believe this is a licensing issue, as I can import a CATPart file directly in ANSYS APDL. I would appreciate any help regarding this issue. Below, you can find the code I am using. Thank you so much!
from ansys.mapdl.core import launch_mapdl, version as pymapdl_version
mapdl = launch_mapdl(run_location=r"C:\Users\u7260\Desktop\Workflow_BB\Prueba_Catia_Ansys", override=True)
mapdl.clear()
Versiones
print("PyMAPDL:", pymapdl_version)
print("MAPDL version:", mapdl.version)
print("Working dir:", mapdl.directory)
mapdl.prep7()
mapdl.cat5in(name="cylinder",extension="CATPart",entity="all",fmt=1)
3) Cuenta entidades
nvol = int(mapdl.get_value('VOLU', 0, 'COUNT'))
nare = int(mapdl.get_value('AREA', 0, 'COUNT'))
nlin = int(mapdl.get_value('LINE', 0, 'COUNT'))
nkpt = int(mapdl.get_value('KP', 0, 'COUNT'))
print("Conteo:", nvol, nare, nlin, nkpt)
4) Plotea lo que haya
if nvol > 0:
mapdl.vplot()
elif nare > 0:
mapdl.aplot()
elif nlin > 0:
mapdl.lplot()
else:
print("No geometry available.")
Beta Was this translation helpful? Give feedback.
All reactions