Bug located in export_mapdl_cdb - exporting unconnected nodes
- Dominant language
- Python
- Stars
- 35
- Forks
- 14
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 11
Description
### 🔍 Before submitting the issue
- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment
### 🐞 Description of the bug
When importing a Catia CATPart containing surfaces, meshing a specific surface and export that mesh to a CDB file, the exported file has a lot of unconnected nodes (seemingly from the other unmeshed surfaces in the model). That creates unnecessarily large cdb files. I would like to be able to only export the nodes connected to the mesh.
### 📝 Steps to reproduce
I am using the following:
import_params = prime.ImportCadParams(
model=model,
cad_reader_route=prime.CadReaderRoute.SPACECLAIM,
length_unit=prime.LengthUnit.MM,
part_creation_type=prime.PartCreationType.BODY,
)
file_io.import_cad(file_name=str(filepath), params=import_params)
surfer = prime.Surfer(model)
surfer_params = prime.SurferParams(model=model, constant_size=20.0, generate_quads=True)
export_params = prime.ExportMapdlCdbParams(model=model)
part = model.get_part_by_name(part_name)
surfer.mesh_topo_faces(part.id, topo_faces=part.get_topo_faces(), params=surfer_params)
file_io.export_mapdl_cdb(str(export_path), export_params)
### 💻 Which operating system are you using?
Windows
### 📀 Which ANSYS version are you using?
241
### 🐍 Which Python version are you using?
3.10
### 📦 Installed packages
```shell
aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiosignal==1.3.1
alabaster==0.7.13
ansys-api-mapdl==0.5.2
ansys-api-meshing-prime==0.1.3
ansys-api-platform-instancemanagement==1.1.0
ansys-mapdl-core==0.68.6
ansys-mapdl-reader==0.54.1
ansys-math-core==0.2.0
ansys-meshing-prime==0.6.2
ansys-platform-instancemanagement==1.1.2
ansys-tools-path==0.6.0
ansys-tools-visualization-interface==0.5.0
appdirs==1.4.4
apptools==5.2.0
async-timeout==4.0.3
atomicwrites==1.4.1
attr==0.3.2
attrs==24.2.0
Babel==2.12.1
black==23.3.0
bokeh==3.1.0
certifi==2024.8.30
cffi==1.15.1
chaco==5.1.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
comtypes==1.1.14
configobj==5.0.8
contourpy==1.3.1
coverage==7.2.3
cryptography==40.0.2
cx-Freeze==6.14.9
cx-Logging==3.1.0
cycler==0.12.1
docutils==0.19
enable==5.3.1
envisage==7.0.3
exceptiongroup==1.1.1
flake8==6.0.0
fonttools==4.54.1
frozenlist==1.5.0
geomdl==5.3.1
grpcio==1.67.1
h5py==3.10.0
idna==3.10
imagesize==1.4.1
importlib-resources==5.12.0
importlib_metadata==8.5.0
iniconfig==2.0.0
jaraco.classes==3.2.3
Jinja2==3.1.2
keyring==23.13.1
kiwisolver==1.4.4
lief==0.13.0
lxml==4.9.2
MarkupSafe==2.1.2
matplotlib==3.7.1
mccabe==0.7.0
MIScriptingToolkit==3.0.16
more-itertools==10.5.0
msgpack==1.1.0
multidict==6.1.0
mypy-extensions==1.0.0
ntlm-auth==1.5.0
numpy==1.24.3
packaging==24.2
pandas==2.0.1
pathspec==0.11.1
Pillow==9.5.0
platformdirs==4.3.6
pluggy==1.4.0
pooch==1.8.2
propcache==0.2.0
protobuf==4.25.5
psutil==6.1.0
pyansys-tools-versioning==0.6.0
pycodestyle==2.10.0
pycparser==2.21
pyface==8.0.0
pyflakes==3.0.1
Pygments==2.15.1
pyiges==0.3.1
pyparsing==3.2.0
pyperclip==1.9.0
pypiwin32==223
pyproject-flake8==6.0.0.post1
pyspnego==0.8.0
pytest==8.1.1
pytest-cov==4.0.0
pytest-mock==3.10.0
python-dateutil==2.9.0.post0
pytz==2023.3.post1
pyvista==0.44.1
pywin32==305
pywin32-ctypes==0.2.0
pywinauto==0.6.8
PyYAML==6.0
reportlab==3.6.12
requests==2.32.3
tqdm==4.67.0
traits==6.4.1
traitsui==8.0.0
trame==3.7.0
trame-client==3.4.0
trame-server==3.2.3
trame-vtk==2.8.12
trame-vuetify==2.7.1
typing_extensions==4.12.2
tzdata==2023.3
unittest-xml-reporting==3.2.0
urllib3==2.2.3
vtk==9.3.1
websockets==13.1
wslink==2.2.1
wxPython==4.2.1
xyzservices==2023.2.0
yarl==1.17.1
zipp==3.21.0
```
Contributor guide
Research direction
Start with the export_mapdl_cdb entry point and ExportMapdlCdbParams, then reproduce the issue with the ImportCadParams and mesh_topo_faces sequence shown in the report. Done means the generated CDB contains only nodes connected to the exported mesh, without nodes from unmeshed surfaces.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100