Closed alexfoxfox closed 3 years ago
Well, you can just plug a meshio mesh into pygalmesh routine and expect things to work. In fact, pygalmesh only supports set operations (diff, intersection etc.) with pygalmesh domain objects (as the error message says), so Ball, Cube etc. What you need to do is to somehow transform your meshes into domains, but pygalmesh is the wrong tool for the task I think.
Well, then I would think the usability of this is somehow limited IMO. Note that all C++ counterparts of GTS, CGAL and VTK can import meshes as native objects. People mostly work with CAD models and scanned meshes, not Balls, Cubes etc. In the meantime, I was able to fix the vtkIntersectionPolyData filter infinite loop bug and wrap it into Python, so I will continue using the VTK Python wrappings instead.
Best,
Alex
On Thu, Mar 25, 2021 at 5:34 PM Nico Schlömer @.***> wrote:
Closed #135 https://github.com/nschloe/pygalmesh/issues/135.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nschloe/pygalmesh/issues/135#event-4510503717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF62RWJ7S3HB6WGH2NQWWETTFO27LANCNFSM4ZWFZ5VA .
Dear All,
I need to compute the difference between two triangulated surfaces saved into .stl files.
My problem is that at the moment I am using the vtkIntersectionPolyData filter to accomplish this task however this VTK fitler is known to be not robust and goes into infinite loop when computing intersections of some surfaces I have deal with. I hoped the CGAL/pygalmesh intersection algorithm would be more robust.
How can I do it?
I tried:
The last line (pg.Difference) produces the following exception:
Invoked with:
What should I do to make it work? Do I need to convert the meshio mesh object to the pygalmesh.DomainBase object somehow (how?) or something else is needed? The example would be greatly appreciated.
Best Regards,
Alex