Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 360973 - sci-mathematics/geomview-1.9.4 doesn't display binary MESH files
Summary: sci-mathematics/geomview-1.9.4 doesn't display binary MESH files
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor (vote)
Assignee: Steve Arnold
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 17:55 UTC by Frank Peters
Modified: 2012-06-16 09:09 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ASCII MESH data file (ascii.mesh,49 bytes, text/plain)
2011-03-28 17:55 UTC, Frank Peters
Details
MESH BINARY data file (binary.mesh,68 bytes, text/plain)
2011-03-28 17:56 UTC, Frank Peters
Details
ZMESH BINARY data file (binaryz.mesh,37 bytes, text/plain)
2011-03-28 17:56 UTC, Frank Peters
Details
MESH BINARY data file (binary.mesh,68 bytes, application/octet-stream)
2011-03-28 17:59 UTC, Frank Peters
Details
ZMESH BINARY data file (binaryz.mesh,37 bytes, application/octet-stream)
2011-03-28 18:00 UTC, Frank Peters
Details
emerge --info output (emerge-info.txt,3.31 KB, text/plain)
2011-03-30 00:50 UTC, Frank Peters
Details
Updated ebuild for installing the attached MESH files. (geomview-1.9.4.ebuild,2.58 KB, text/plain)
2011-04-03 06:57 UTC, Steve Arnold
Details
ASCII grid data with four equal points (ascii2.mesh,41 bytes, text/plain)
2011-04-09 23:25 UTC, Frank Peters
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Peters 2011-03-28 17:55:12 UTC
Created attachment 267569 [details]
ASCII MESH data file

Geomview-1.9.4 does not display binary MESH files.

MESH files contain three coordinates, x,y,z, for each point.  These coordinates can be stored as ASCII data in a MESH file and geomview will display the file properly.  However, if the data is stored as binary values (big endian format) the file will apparently load into geomview but nothing is displayed.  An entry for the binary file is shown in the "Targets" window, but nothing is visible.

An example ASCII MESH is attached (ascii.mesh).  This file contains only four points that define a constant function but is correctly displayed as a flat white sheet.

A binary file (MESH BINARY) containing the same data (with big endian values) is also attached (binary.mesh).  This file is loaded but does not display.  It should appear the same as ascii.mesh.

However, a change in binary format to ZMESH BINARY, where only the z-coordinate is specified, *does* display.  Also attached is a binary file (binary.zmesh) containing the same values that *does* display as a flat white sheet.

Summary: Of the three file formats, MESH, BINARY MESH, and BINARY ZMESH, the BINARY MESH will not display.
Comment 1 Frank Peters 2011-03-28 17:56:09 UTC
Created attachment 267571 [details]
MESH BINARY data file
Comment 2 Frank Peters 2011-03-28 17:56:39 UTC
Created attachment 267573 [details]
ZMESH BINARY data file
Comment 3 Frank Peters 2011-03-28 17:59:17 UTC
Created attachment 267575 [details]
MESH BINARY data file
Comment 4 Frank Peters 2011-03-28 18:00:03 UTC
Created attachment 267577 [details]
ZMESH BINARY data file
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2011-03-29 23:25:41 UTC
Please post your `emerge --info' output too.
Comment 6 Frank Peters 2011-03-30 00:50:17 UTC
Created attachment 267755 [details]
emerge --info output
Comment 7 Steve Arnold archtester gentoo-dev 2011-04-03 06:56:18 UTC
I would close this as UPSTREAM but they don't appear to be very active lately.  Feel free to try it through one of the supported debuggers, and hopefully submit a patch.  Otherwise I probably won't get to this for a while...

I'll attach an updated ebuild that installs the attached mesh files (drop them in FILESDIR).
Comment 8 Steve Arnold archtester gentoo-dev 2011-04-03 06:57:46 UTC
Created attachment 268281 [details]
Updated ebuild for installing the attached MESH files.
Comment 9 Steve Arnold archtester gentoo-dev 2011-04-09 16:25:04 UTC
Any new info on this one?  When I tried the example MESH files, I saw no console output of any kind.  I managed to replicate the reported behavior, but that's pretty much it.  Some additional data would be helpful, but at this point I'm not sure exactly what that is...
Comment 10 Frank Peters 2011-04-09 23:09:50 UTC
(In reply to comment #9)

> Any new info on this one?  When I tried the example MESH files, I saw no
> console output of any kind.

There should be no console output because apparently the binary.mesh file is being successfully read.  If one of the data points in the binary file is deliberately corrupted, geomview will throw out an error message.

The problem happens after the binary file is read,

But I've managed to find the binary file, or at least a part of it.  Here is how it's done:

1)  Start geomview with the -noopengl option:  geomview -noopengl

2)  Load the binary.mesh file (it will show under "Targets" in the main window)

3)  Select the binary.mesh display in the Targets section of the main window.

3)  Open the "Appearance" window: Inspect --> Appearance

4)  Make sure that BBoxes is checked.  Set Line Width to 200.

A short black horizontal line should now appear in the Camera window (if not then click the "Center" button on the Tools window.

This is how geomview apparently has processed the binary.mesh file, and somehow the OpenGL interface will mess up the display even more.

Unfortunately, I don't know how geomview works and I would have to take some time to study the source code before I could debug this further.  I already reported the problem to the upstream geomview list but received no response.
Comment 11 Frank Peters 2011-04-09 23:23:54 UTC
(In reply to comment #9)
> Any new info on this one?

I can also duplicate the behavior of the binary.mesh file by using this ASCII file:

MESH 2 2
0 0 6.5
0 0 6.5
0 0 6.5
0 0 6.5

(This file is attached as ascii2.mesh)

In this file, all four points of the grid are set to the same value.  When loaded into geomview nothing is displayed.

However, only a single point is displayed, and by setting the bounding box (BBox) line width to 200, a horizontal line that "bounds" the point is observed.

So apparently, geomview reads the binary.mesh data but only displays a single point.
Comment 12 Frank Peters 2011-04-09 23:25:27 UTC
Created attachment 269247 [details]
ASCII grid data with four equal points
Comment 13 Frank Peters 2011-04-10 00:10:40 UTC
The problem is solved.  It had nothing to do with Geomview.  I was using faulty data.

For a binary file, the data must be in big endian format.  A Linux x64 system produces little endian values and these have to be converted before storing to a file.  My C routines for conversionwere faulty and were producing the incorrect format.

The fault is entirely my own and I sincerely apologize for any inconvenience that I may have caused, but discerning incorrect patterns in binary floating point data is not an easy task.
Comment 14 Pacho Ramos gentoo-dev 2012-06-16 09:09:24 UTC
(In reply to comment #13)
> The problem is solved.  It had nothing to do with Geomview.  I was using
> faulty data.
> 
> For a binary file, the data must be in big endian format.  A Linux x64
> system produces little endian values and these have to be converted before
> storing to a file.  My C routines for conversionwere faulty and were
> producing the incorrect format.
> 
> The fault is entirely my own and I sincerely apologize for any inconvenience
> that I may have caused, but discerning incorrect patterns in binary floating
> point data is not an easy task.

no problem