Getting error when i try to plot the geometry #1384
Replies: 2 comments 14 replies
-
Hi @Indrajeetrt - transfering this discussion to the PyAnsys Geometry repository! |
Beta Was this translation helpful? Give feedback.
-
Hi @Indrajeetrt - I gave it a try to this code on my side (I just defined a specific file to be uploaded, which I am also providing here): File used: https://github.com/ansys/pyansys-geometry/blob/main/tests/integration/files/import/box.3dm from pathlib import Path
from ansys.geometry.core import launch_modeler_with_spaceclaim
from ansys.geometry.core.plotting import GeometryPlotter
fileName = Path.cwd() / 'tests' / 'integration' / 'files' / 'import' / 'box.3dm'
# Launch modeler with spaceclaim
modeler = launch_modeler_with_spaceclaim(hidden=True)
geom = modeler.open_file(fileName.as_posix(), upload_to_server=False)
plotter = GeometryPlotter()
plotter.show(geom)
modeler.close() Question...
I will adapt this last point to also accept Path objects but this will have to be done in a new release =) Also, just for convenience... You don't need to instantiate a geom = modeler.open_file(fileName.as_posix(), upload_to_server=False)
geom.plot()
modeler.close() |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to use these line of code to read a geometry and plot it. 3 weeks back this GeometryPlotter() worked for me but when i try now it is giving me error saying GeometryExitedError: Geometry service connection terminated: The given key was not present in the dictionary. it would be helpfull if anyone has some clues about the error..
Thank you in advance
from ansys.geometry.core import launch_modeler_with_spaceclaim
from ansys.geometry.core.plotting import GeometryPlotter
#Lunch modeler with spaceclaim and
modeler = launch_modeler_with_spaceclaim(hidden=True)
geom = modeler.open_file(fileName,False)
plotter = GeometryPlotter()
plotter.show(geom)
Beta Was this translation helpful? Give feedback.
All reactions