Hi David, I found the problem, and can figure out how to fix it. The code assumes that exponents have two digits only, which is still true on most Unix machines. I guess they're making room for "long double's" (128-bit IEEE float) and don't have different code for that than the "regular" doubles.
I will check in a fix later today -- thanks so much for spotting this. Cheers, -Greg > From: "Guglielmetti, Robert" <robert.guglielme...@nrel.gov> > Date: April 30, 2012 8:41:17 AM PDT > > Hi David, > > AFAIK, the sources for those two programs were not touched in the Windows > binary project. I don't fully understand the behavior of this program right > now. I will check with Kitware to see if any changes were in fact made to > that source in order to get it to work on Windows. > > Rob Guglielmetti IESNA, LEED AP > > > On 4/30/12 6:35 AM, "David Geisler-Moroder" > <david.moro...@gmail.com<mailto:david.moro...@gmail.com>> wrote: > > Hi Greg, hi list, > > from time to time I am using mgf2inv with the "-vrml" option to export and > view my models. > > This time I wanted to do the conversion with rad2mgf and mgf2inv -vrml on > Windows using the > NREL binaries. However, the resulting files are corrupt due to bad number > representations and > normal descriptions. > > For example the description of a face in the VRML-file created with the Linux > binaries is: > > DEF ceil_fac_001 Group { > Separator { > USE ceil_mat > Coordinate3 { > point [ -2.000000000e+00 +4.500000000e+00 +2.162119874e+00, > -1.500000000e+00 +4.500000000e+00 +3.000000000e+00, > -1.500000000e+00 +5.000000000e+00 +1.461123454e+00, > -2.000000000e+00 +5.000000000e+00 +6.232433278e-01 ] > } > IndexedFaceSet { > coordIndex [ 0, 1, 2, 3 ] > } > } > } > > > In the files created with the Windows version the same face is described as: > > DEF ceil_fac_001 Group { > Separator { > USE ceil_mat > Coordinate3 { > point [ -2.000000000e+000 +4.500000000e+000 +2.162119874e+, > -1.500000000e+000 +4.500000000e+000 +3.000000000e+, > -1.500000000e+000 +5.000000000e+000 +1.461123454e+, > -2.000000000e+000 +5.000000000e+000 +6.232433278e- ] > } > Normal { > vector [ 00 > +0.000 +0.000 +0.0-1.500000000e+000 +4.500000000e+000 +3.000000000e+, > 00 > +0.000 +0.000 +0.0-1.500000000e+000 +5.000000000e+000 +1.461123454e+, > 00 > +0.000 +0.000 +0.0-2.000000000e+000 +5.000000000e+000 +6.232433278e-, > 01 > +0.000 +0.000 +0.000 ] > } > IndexedFaceSet { > coordIndex [ 0, 1, 2, 3 ] > normalIndex [ 0, 1, 2, 3 ] > } > } > } > > > Obviously, two things are corrupt: > - the z-coordinates are missing their exponents > - the normal vector coordinates are messed up > > Moreover, for me it's unclear why normal vectors are written (needed ??) in > the Windows version, while > they are completely missing in the Linux version. > > I believe that all this has something to do with de definition of VERTFMT in > src/cv/mgf2inv.c > #define VERTFMT "%+16.9e %+16.9e %+16.9e\n%+6.3f %+6.3f %+6.3f" > > Any ideas how to solve that for both platforms?? > > Cheers, > David _______________________________________________ Radiance-dev mailing list Radiance-dev@radiance-online.org http://www.radiance-online.org/mailman/listinfo/radiance-dev