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
Commercial Buildings Research Group
National Renewable Energy Laboratory
15013 Denver West Parkway MS:RSF202
Golden, CO 80401
303.275.4319
robert.guglielme...@nrel.gov


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

Reply via email to