-
Notifications
You must be signed in to change notification settings - Fork 157
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
Vtk export is broken #312
Comments
guyer attached twin_ap_3D.msh on 03-15-2012 at 09:48 |
guyer attached estat.py on 03-15-2012 at 09:47 |
These don't seem to be issues under FiPy's control. Although Gmsh can't read the ConvexPointSet cells that FiPy exports, Mayavi, and ParaView can. It would be good to eventually export the more specific cell types when we can, but it's not urgent. I'm not sure what's to be done about the localization issues. FiPy doesn't actually write the file, it just supplies the data to tvtk. Trac comment by guyer on 04-10-2012 at 15:40 |
There's some good information about diagnosing this with pyvista in #693 and pyvista/pyvista-support#108 |
@guyer the issue from pyvista/pyvista-support#108 is not limited to 3D meshes. Consider the following example:
Please also take a look at the following email exchange, credit goes to @wd15 :
If I'm reading this correctly then the best way forward would be to add a function which readjusts the direction of the normals, rather than than attempting to refactor in order to adopt VTK ordering. Is this correct? If so where should such a function be located? |
That's not how I read that, nor is it what I'd do. The FiPy code for exporting VTK is wrong and should be fixed. What Daniel is saying is that the face normals (which FiPy already knows) can be used to figure out what order the exported vertices should be in. |
As reported in http://thread.gmane.org/gmane.comp.python.fipy/2469, some 3D meshes are not exported cleanly via Vtk.
Gmsh can't read them (who knew Gmsh could read them in the first place?). At least one issue is that FiPy exports all CellVariable elements as ConvexPointSet cells. Gmsh apparently doesn't know what to do with that (
Error : Unknown type of cell 41
) and Prabhu has discouraged them. I did it that way originally because it seemed easier than figuring out what every FiPy cell geometry corresponded to in Vtk terms, but I later did all that work for Gmsh anyway (see trunk/fipy/meshes/gmshImport.py@5140#L283 and trunk/fipy/meshes/gmshImport.py@5140#L411 (which should be reconciled)), so probably best to exploit it.There seem to be localization problems on some platforms/configurations: the Vtk file is apparently exported with commas instead of periods as the decimal separator, but Gmsh and Mayavi don't understand this. This is particularly confusing in the case of Mayavi, since the export file is written by tvtk and presumably this is what Mayavi is using to read it back in.
Imported from trac ticket #433, created by guyer on 03-15-2012 at 09:46, last modified: 09-09-2013 at 18:45
The text was updated successfully, but these errors were encountered: