Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug located in cad_import of Rhino files #872

Closed
2 tasks done
dkowollik opened this issue Sep 6, 2024 · 1 comment · Fixed by #916
Closed
2 tasks done

Bug located in cad_import of Rhino files #872

dkowollik opened this issue Sep 6, 2024 · 1 comment · Fixed by #916
Assignees
Labels
aps Anything related to Ansys Prime Server bug Something isn't working

Comments

@dkowollik
Copy link

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

I found a refaceting issue during import of Rhino files in combination with prime.CadFaceter.PARASOLID and prime.CadReaderRoute.PROGRAMCONTROLLED or prime.CadReaderRoute.WORKBENCH. The facet resolution stays always the same and is always very coarse, which cannot be used for appropriate meshing.

Using ACIS for the Faceter or SPACECLAIM for the CadReaderRoute shows no issue. With these settings I can also succesfully use CUSTOM CadRefacetingResolution.

I attached a 25mm Sphere as Rhino model and Parasolid model, so that you can reproduce the refacet issues:
Sphere25.zip

📝 Steps to reproduce

import ansys.meshing.prime as pyprime
from ansys.meshing.prime import graphics

prime = pyprime.launch_prime()
filename = "Sphere25.x_t"
filename = "Sphere25.3dm"

res = pyprime.FileIO(prime.model).import_cad(
    filename,
    pyprime.ImportCadParams(
        model=prime.model,
        refacet=True,
        cad_reader_route=pyprime.CadReaderRoute.PROGRAMCONTROLLED,
        cad_refaceting_params=pyprime.CadRefacetingParams(
            model=prime.model,
            cad_faceter=pyprime.CadFaceter.PARASOLID,
            custom_surface_deviation_tolerance=1.,
            custom_normal_angle_tolerance=5.,
            max_edge_size_limit=pyprime.CadRefacetingMaxEdgeSizeLimit.ABSOLUTE,
            max_edge_size=5.,
            faceting_resolution=pyprime.CadRefacetingResolution.CUSTOM,
        )
    )
)


display = pyprime.graphics.Graphics(model=prime.model)
display()

res = pyprime.FileIO(prime.model).import_cad(
    filename,
    pyprime.ImportCadParams(
        model=prime.model,
        refacet=True,
        cad_reader_route=pyprime.CadReaderRoute.PROGRAMCONTROLLED,
        cad_refaceting_params=pyprime.CadRefacetingParams(
            model=prime.model,
            cad_faceter=pyprime.CadFaceter.PARASOLID,
            custom_surface_deviation_tolerance=2.,
            custom_normal_angle_tolerance=15.,
            max_edge_size_limit=pyprime.CadRefacetingMaxEdgeSizeLimit.ABSOLUTE,
            max_edge_size=5.,
            faceting_resolution=pyprime.CadRefacetingResolution.CUSTOM,
        )
    )
)


display = pyprime.graphics.Graphics(model=prime.model)
display()

prime.exit()

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

No response

🐍 Which Python version are you using?

3.10

📦 Installed packages

aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
ansys-api-dbu==0.3.4
ansys-api-geometry==0.4.7
ansys-api-mapdl==0.5.2
ansys-api-mechanical==0.1.2
ansys-api-meshing-prime==0.1.3
ansys-api-platform-instancemanagement==1.1.0
ansys-dpf-composites==0.6.0
ansys-dpf-core==0.13.0
ansys-geometry-core==0.7.0
ansys-mapdl-core==0.68.4
ansys-mapdl-reader==0.54.0
ansys-math-core==0.1.5
ansys-mechanical-core==0.11.5
ansys-mechanical-env==0.1.7
ansys-meshing-prime==0.6.2
ansys-platform-instancemanagement==1.1.2
ansys-pythonnet==3.1.0rc3
ansys-tools-path==0.6.0
ansys-tools-visualization-interface==0.4.0
appdirs==1.4.4
asttokens==2.4.1
async-timeout==4.0.3
attrs==24.2.0
beartype==0.18.5
cachetools==5.5.0
certifi==2024.7.4
cffi==1.17.0
charset-normalizer==3.3.2
click==8.1.7
clr-loader==0.2.6
colorama==0.4.6
contourpy==1.3.0
cycler==0.12.1
decorator==5.1.1
exceptiongroup==1.2.2
executing==2.0.1
flexcache==0.3
flexparser==0.3.1
fonttools==4.53.1
frozenlist==1.4.1
geomdl==5.3.1
google-api-core==2.19.2
google-api-python-client==2.142.0
google-auth==2.34.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.65.0
grpcio==1.66.0
grpcio-health-checking==1.62.3
httplib2==0.22.0
idna==3.8
importlib_metadata==8.4.0
ipython==8.26.0
jedi==0.19.1
kiwisolver==1.4.5
matplotlib==3.9.2
matplotlib-inline==0.1.7
more-itertools==10.4.0
msgpack==1.0.8
multidict==6.0.5
numpy==1.26.4
packaging==24.1
parso==0.8.4
pillow==10.4.0
Pint==0.24.3
platformdirs==4.2.2
pooch==1.8.2
prompt_toolkit==3.0.47
proto-plus==1.24.0
protobuf==4.25.4
psutil==6.0.0
pure_eval==0.2.3
pyansys-tools-versioning==0.6.0
pyasn1==0.6.0
pyasn1_modules==0.4.0
pycparser==2.22
Pygments==2.18.0
pyiges==0.3.1
pyparsing==3.1.4
python-dateutil==2.9.0.post0
pyvista==0.43.10
requests==2.32.3
rsa==4.9
scipy==1.14.1
scooby==0.10.0
semver==3.0.2
six==1.16.0
stack-data==0.6.3
tabulate==0.9.0
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.6.2
typing_extensions==4.12.2
uritemplate==4.1.1
urllib3==2.2.2
vtk==9.3.1
wcwidth==0.2.13
websockets==12.0
wslink==2.1.2
yarl==1.9.4
zipp==3.20.1
@dkowollik dkowollik added the bug Something isn't working label Sep 6, 2024
@waltersma waltersma added the aps Anything related to Ansys Prime Server label Sep 6, 2024
@waltersma waltersma self-assigned this Sep 6, 2024
@waltersma
Copy link
Contributor

Hi @dkowollik, thanks for reporting this issue. I confirm I can reproduce. We will look into this and provide an update shortly.

APS 1126754

@waltersma waltersma linked a pull request Oct 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aps Anything related to Ansys Prime Server bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants