clbarnes / ncollpyde

Mesh containment and line segment intersection queries in Python (over rust)
MIT License
9 stars 0 forks source link

Incompatible with meshio >=4.0 #2

Closed clbarnes closed 3 years ago

clbarnes commented 4 years ago

Due to triangle cell data

jefferis commented 4 years ago

Was just trying this out. Is this related, Chris?

In [96]: meshio.__version__
Out[96]: '4.3.1'

In [18]: from ncollpyde import Volume

In [19]: vertices = mesh.points

In [20]: triangles = mesh.cells["triangle"]
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-20-26277d86b4ad> in <module>
----> 1 triangles = mesh.cells["triangle"]

this worked:

volume = Volume(vertices, mesh.cells_dict['triangle'])
clbarnes commented 4 years ago

Yes, that's it! meshio 4.0 was pretty hot off the press last time I worked on this, but I should fix it up (or at least add a compatibility shim) now it's been out for a while.

clbarnes commented 3 years ago

0.12.0 only supports meshio 4+