Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Calculate Union on meshes from meshio #191

Closed
gatoniel opened this issue Mar 16, 2022 · 0 comments
Closed

Calculate Union on meshes from meshio #191

gatoniel opened this issue Mar 16, 2022 · 0 comments

Comments

@gatoniel
Copy link

gatoniel commented Mar 16, 2022

Hi,
I hope it is okay to ask for help here. Additionally, I am unsure if this is a replicate of #131

I want to calculate the union of two 3d closed objects defined by triangles. With meshio.Mesh it is super straight forward to create the meshes of these objects. But I cannot pass them to pygalmesh.Union. Is there a way to use pygalmesh.Union on these meshes or how would you proceed? Or is pygalmesh.Union only available for primitive objects like Spheres, etc. (i.e., things that can be represented with _pygalmesh.DomainBase)?

I would like to use this pseudo code:

# verts1, verts2= ...
# faces = ...
mesh1 = meshio.Mesh(
        verts1, [("triangle", faces)]
)
mesh2 = meshio.Mesh(
        verts2, [("triangle", faces)]
)

# do some intermediate stuff to transform mesh1 and mesh2 to correct format, i.e., _pygalmesh.DomainBase

union = pygalmesh.Union([mesh1, mesh2])

This code results in this error message:

TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. _pygalmesh.Union(arg0: List[_pygalmesh.DomainBase])

Invoked with: [<meshio mesh object>
  Number of points: 96
  Number of cells:
    triangle: 188, <meshio mesh object>
  Number of points: 96
  Number of cells:
    triangle: 188]

If pygalmesh is not the correct choice for this, do you know any other package that can do something like this?

@meshpro meshpro locked and limited conversation to collaborators Mar 17, 2022
@nschloe nschloe converted this issue into discussion #192 Mar 17, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant