You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just switched to meshio to read/write some of the ply files we have and I noticed that comments are not supported. There are two closed pull requests that tried to add this: #753#727. The formats that were worked on before are:
VTK: from title line, split into list items by ;
MEDIT: lines starting with #
TETGEN: lines starting with #
XDMF: <information> tags
VTU: <!--...-->
Then there is:
PLY: comment string
I agree with the sentiments brought up in the previous two merge request that this should be a mesh.comments property (a list of a collection of all of the comments).
I am not sure what to do with the ""This file was created by meshio" part, I feel that would need to be filtered on read so that:
I would be happy to contribute some, but I am not sure I can do all the formats, particular the xml ones seem a bit of a stretch, my focus would be mainly on getting ply do work.
Let me know what you think.
As an addition I asked gemini to go through all the different file formats meshio offers and here is what it said:
Formats supporting simple line-prefix comments:
(These formats allow comments by starting a line with a specific character or keyword.)
Nastran (bulk data, .bdf, .fem, .nas): lines starting with $
Netgen (.vol, .vol.gz): lines starting with # (often in definition areas)
OBJ (.obj): lines starting with #
OFF (.off): lines starting with #
PLY (.ply): lines starting with comment (primarily in the header)
SU2 (.su2): lines starting with %
Tecplot .dat (ASCII): lines starting with # (typically in header/zone info)
TetGen (.node/.ele): lines starting with #
UGRID (.ugrid): lines starting with # (typically)
WKT (TIN) (.wkt): lines starting with -- or # (parser-dependent, as WKT focuses on data grammar)
Gmsh (format versions 2.2, 4.0, and 4.1, .msh): lines starting with // or $ can act as comments in many parts (though formal multi-line comments go in $Comments sections).
AVS-UCD (.avs): Descriptive text in initial header lines.
CGNS (.cgns): Structured metadata within the HDF5 file (e.g., Descriptor_t nodes).
DOLFIN XML (.xml): Standard XML comments
Exodus (.e, .exo): Descriptive information in specific variables/attributes within the NetCDF/HDF5 structure.
FLAC3D (.f3grid): Binary format; descriptive text would be internal metadata if supported.
Gmsh (.msh versions 2.2, 4.0, and 4.1, .msh): Formal multi-line comments enclosed in $Comments and $EndComments sections.
H5M (.h5m): Metadata stored as attributes or datasets within the HDF5 file structure.
Medit (.mesh, .meshb): ASCII: Descriptive information tied to specific keyword sections. Bbinary: Metadata part of the binary structure.
MED/Salome (.med): Structured metadata within the HDF5 file.
Neuroglancer precomputed format: Metadata/comments within the JSON info file (often using special _comment fields or similar, as JSON itself has no formal comments).
PERMAS (.post, .post.gz, .dato, .dato.gz): Comments often via specific control cards or lines (e.g., starting with $ or * but interpreted by PERMAS's specific parsing rules for those card types).
STL (.stl): ASCII: Name/description on the initial solid ... line. Binary: 80-character header string.
SVG (.svg): Standard XML comments
VTK (.vtk) (Legacy ASCII): Single 256-character header string on the second line.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I just switched to meshio to read/write some of the ply files we have and I noticed that comments are not supported. There are two closed pull requests that tried to add this: #753 #727. The formats that were worked on before are:
;
#
#
<information>
tags<!--...-->
Then there is:
comment
stringI agree with the sentiments brought up in the previous two merge request that this should be a
mesh.comments
property (a list of a collection of all of the comments).I am not sure what to do with the
""This file was created by meshio"
part, I feel that would need to be filtered on read so that:I would be happy to contribute some, but I am not sure I can do all the formats, particular the xml ones seem a bit of a stretch, my focus would be mainly on getting
ply
do work.Let me know what you think.
As an addition I asked gemini to go through all the different file formats meshio offers and here is what it said:
Beta Was this translation helpful? Give feedback.
All reactions