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

add_surface with occ geometry kernel broken #567

Open
cc-a opened this issue Jan 6, 2023 · 1 comment · May be fixed by #579
Open

add_surface with occ geometry kernel broken #567

cc-a opened this issue Jan 6, 2023 · 1 comment · May be fixed by #579

Comments

@cc-a
Copy link

cc-a commented Jan 6, 2023

Minimal example:

import pygmsh

with pygmsh.occ.geometry.Geometry() as geom:
    p0 = geom.add_point((0, 0, 0))
    p1 = geom.add_point((-1, 0, 0))
    p2 = geom.add_point((-1, 3, 0))

    l0 = geom.add_line(p0, p1)
    l1 = geom.add_line(p1, p2)
    l2 = geom.add_line(p2, p0)

    cv = geom.add_curve_loop([l0, l1, l2])
    geom.add_surface(cv)

This gives:

Traceback (most recent call last):
File "/home/ccaveayl/projects/Solidity-GUI/experiment.py", line 15, in
geom.add_surface(cv)
File "/home/ccaveayl/projects/Solidity-GUI/.venv/lib/python3.10/site-packages/pygmsh/common/geometry.py", line 92, in add_surface
return Surface(self.env, *args, **kwargs)
File "/home/ccaveayl/projects/Solidity-GUI/.venv/lib/python3.10/site-packages/pygmsh/common/surface.py", line 29, in init
self._id = env.addSurfaceFilling([self.curve_loop._id])
File "/usr/share/gmsh/api/python/gmsh.py", line 7078, in addSurfaceFilling
c_int(wireTag),
TypeError: 'list' object cannot be interpreted as an integer

Running the above but using the geo kernel works fine. The underlying cause seems to be differing arguments for gmsh.model.geo.addSurfaceFilling and gmsh.model.occ.addSurfaceFilling.

@hvasbath
Copy link

hvasbath commented Oct 2, 2023

Same issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants