ansys / pyansys-geometry

A Python wrapper for Ansys Geometry Services
https://geometry.docs.pyansys.com/
MIT License
43 stars 12 forks source link

Export to pmdb fails #1432

Closed rmanno91 closed 1 month ago

rmanno91 commented 1 month ago

🔍 Before submitting the issue

🐞 Description of the bug

When trying to export a geometry created within the pygemetry context to a pmdb file it fails with the following error:

image

📝 Steps to reproduce

run the following script:

from ansys.geometry.core import launch_modeler_with_geometry_service
from ansys.geometry.core.misc import DEFAULT_UNITS
from ansys.geometry.core.sketch import Sketch
from ansys.geometry.core.designer import DesignFileFormat
from ansys.geometry.core.math import (
    UNITVECTOR3D_X,
    UNITVECTOR3D_Y,
    Plane,
    Point2D,
    Point3D,
)

modeler = launch_modeler_with_geometry_service()
design = modeler.create_design("RVE")
w = 0.05
unit = DEFAULT_UNITS.LENGTH
start_at = Point3D([w / 2, w / 2, 0.0], unit=unit)

plane = Plane(
    start_at,
    UNITVECTOR3D_X,
    UNITVECTOR3D_Y,
)
box_plane = Sketch(plane)
box_plane.box(Point2D([0.0, 0.0], unit=unit), width=w, height=w)

box = design.extrude_sketch("block", box_plane, w)

design.download(
            file_location="block.pmdb",
            format=DesignFileFormat.PMDB,
        )

the result is the same even if we change the design.dowload for the following command:

design.export_to_pmdb("block.pmdb")

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2025r1

🐍 Which Python version are you using?

3.12

📦 Installed packages

accessible-pygments==0.0.5
aiohappyeyeballs==2.4.0       
aiohttp==3.10.5
aiosignal==1.3.1
alabaster==0.7.16
annotated-types==0.7.0        
ansys-api-dbu==0.3.4
ansys-api-geometry==0.4.8     
ansys-api-mapdl==0.5.2        
ansys-api-meshing-prime==0.1.3
ansys-api-platform-instancemanagement==1.1.0
ansys-geometry-core @ git+https://github.com/ansys/pyansys-geometry@7430991b61884c064f65a7cef073989b8731d52b
ansys-mapdl-core @ git+https://github.com/ansys/pymapdl@e25dddf56624827c19a9f424851b54034a3dfea2
ansys-mapdl-reader==0.54.0
ansys-materials-manager @ git+https://github.com/ansys/pymaterials-manager@b296591cb29901a3a86c2ef998f3822005913415
ansys-math-core==0.1.5
ansys-meshing-prime @ git+https://github.com/ansys/pyprimemesh@c838da9f69e83f36874f9f850b936fbf3aecfc74
ansys-platform-instancemanagement==1.1.2
ansys-sphinx-theme==0.16.5
ansys-tools-path==0.6.0
ansys-tools-visualization-interface==0.4.1
appdirs==1.4.4
asttokens==2.4.1
attrs==24.2.0
babel==2.16.0
beartype==0.18.5
beautifulsoup4==4.12.3
build==1.2.1
certifi==2024.8.30
cfgv==3.4.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
comm==0.2.2
contourpy==1.3.0
coverage==7.6.1
cycler==0.12.1
debugpy==1.8.5
decorator==5.1.1
distlib==0.3.8
docutils==0.21.2
executing==2.1.0
filelock==3.15.4
flexcache==0.3
flexparser==0.3.1
flit==3.9.0
flit_core==3.9.0
fonttools==4.53.1
frozenlist==1.4.1
geomdl==5.3.1
grpcio==1.66.1
grpcio-health-checking==1.62.3
identify==2.6.0
idna==3.8
imagesize==1.4.1
importlib_metadata==8.4.0
iniconfig==2.0.0
ipykernel==6.29.5
ipython==8.27.0
jaraco.classes==3.4.0
jaraco.context==6.0.1
jaraco.functools==4.0.2
jedi==0.19.1
Jinja2==3.1.4
jupyter_client==8.6.2
jupyter_core==5.7.2
keyring==25.3.0
kiwisolver==1.4.5
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
matplotlib-inline==0.1.7
mdurl==0.1.2
more-itertools==10.4.0
msgpack==1.0.8
multidict==6.0.5
nest-asyncio==1.6.0
nh3==0.2.18
nodeenv==1.9.1
numpy==1.26.4
numpydoc==1.7.0
packaging==24.1
parso==0.8.4
pillow==10.4.0
Pint==0.24.3
pkginfo==1.11.1
platformdirs==4.2.2
pluggy==1.5.0
pooch==1.8.2
pre-commit==3.8.0
prompt_toolkit==3.0.47
protobuf==4.25.4
psutil==6.0.0
pure_eval==0.2.3
pyansys-tools-versioning==0.6.0
pydantic==2.8.2
pydantic_core==2.20.1
pydata-sphinx-theme==0.14.4
Pygments==2.18.0
pyiges==0.3.1
pyparsing==3.1.4
pyproject_hooks==1.1.0
pytest==8.2.2
pytest-cov==5.0.0
python-dateutil==2.9.0.post0
pyvista==0.43.10
pywin32==306
pywin32-ctypes==0.2.3
PyYAML==6.0.2
pyzmq==26.2.0
readme_renderer==44.0
requests==2.32.3
requests-toolbelt==1.0.0
rfc3986==2.0.0
rich==13.8.0
scipy==1.14.1
scooby==0.10.0
semver==3.0.2
six==1.16.0
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==7.3.7
sphinx-copybutton==0.5.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
stack-data==0.6.3
tabulate==0.9.0
tomli_w==1.0.0
tornado==6.4.1
tqdm==4.66.5
traitlets==5.14.3
trame==3.6.3
trame-client==3.2.5
trame-server==3.1.0
trame-vtk==2.8.10
trame-vuetify==2.7.0
twine==5.1.0
typing_extensions==4.12.2
urllib3==2.2.2
virtualenv==20.26.3
vtk==9.3.1
wcwidth==0.2.13
websockets==12.0
wheel==0.44.0
wslink==2.1.2
yarl==1.9.7
zipp==3.20.1
RobPasMue commented 1 month ago

Latest "published" versions of the Geometry Service do not seem to have any issues. Seems like a devops problem internally (bleeding edge builds used by Ansys employees). Closing since issue is not related to the Python library itself. We will handle this internally.