genklemsamp.pl error on Windows

Hi all,

I'm trying to run the 3 phase method to on Windows and there are some
problems with running genklemsamp.pl. Not to say that I'm using Andy's
tutorial as the reference.

If I run genklemsamp by defining window properties it works fine:

genklemsamp -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

However it crashes if I pass a window geometry file:

genklemsamp.pl -vd 0 -1 0 window.rad

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 71.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 72.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 102.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.pl line
110.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 111.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at
C:\Radiance\bin\genklemsamp.plline 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at
C:\Radiance\bin\genklemsamp.plline 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at
C:\Radiance\bin\genklemsamp.plline 113.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 118.

There is an issue with $tmploc on line 71 which is apparently only needed
for Windows systems. I tried to pass a different path to the variable as a
string but I couldn't solve the problem. Here is the lines 69-71.

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ....

Anyone knows how can I get genklemsamp to work on Windows?

Thanks in advance,
Mostapha

Hi Mostapha

Try to replace

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ...

with

if ($windoz) {
    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Windows\\Temp";
    }
    chomp($tmploc);
    ...

Warning: Untested!

Regards,
Thomas

···

On Wed, Jul 24, 2013 at 7:53 PM, Mostapha Sadeghipour <[email protected] > wrote:

Hi all,

I'm trying to run the 3 phase method to on Windows and there are some
problems with running genklemsamp.pl. Not to say that I'm using Andy's
tutorial as the reference.

If I run genklemsamp by defining window properties it works fine:

>> genklemsamp -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

However it crashes if I pass a window geometry file:

>> genklemsamp.pl -vd 0 -1 0 window.rad

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 71.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 72.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 102.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.plline 110.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 111.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 118.

There is an issue with $tmploc on line 71 which is apparently only needed
for Windows systems. I tried to pass a different path to the variable as a
string but I couldn't solve the problem. Here is the lines 69-71.

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ....

Anyone knows how can I get genklemsamp to work on Windows?

Thanks in advance,
Mostapha

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

...and be sure and report success back on this channel! Anything that improves Windows compatibility will want to make its way back into the source. =)

- Rob

···

From: Thomas Bleicher [mailto:[email protected]]
Sent: Wednesday, July 24, 2013 9:14 PM
To: Radiance general discussion
Subject: Re: [Radiance-general] genklemsamp.pl error on Windows

Hi Mostapha

Try to replace

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ...

with

if ($windoz) {
    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Windows\\Temp";
    }
    chomp($tmploc);
    ...

Warning: Untested!

Regards,
Thomas
On Wed, Jul 24, 2013 at 7:53 PM, Mostapha Sadeghipour <[email protected]<mailto:[email protected]>> wrote:
Hi all,

I'm trying to run the 3 phase method to on Windows and there are some problems with running genklemsamp.pl<http://genklemsamp.pl>. Not to say that I'm using Andy's tutorial as the reference.

If I run genklemsamp by defining window properties it works fine:

genklemsamp -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

However it crashes if I pass a window geometry file:

genklemsamp.pl<http://genklemsamp.pl> -vd 0 -1 0 window.rad

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 71.
Use of uninitialized value $tmploc in concatenation (.) or string at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 72.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 102.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 110.
Use of uninitialized value $bcube[3] in multiplication (*) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 111.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 113.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl<http://genklemsamp.pl> line 118.

There is an issue with $tmploc on line 71 which is apparently only needed for Windows systems. I tried to pass a different path to the variable as a string but I couldn't solve the problem. Here is the lines 69-71.

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ....

Anyone knows how can I get genklemsamp to work on Windows?

Thanks in advance,
Mostapha

_______________________________________________
Radiance-general mailing list
[email protected]<mailto:[email protected]>
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Thomas and Rob,

Thank you Thomas for the reply. Here is the result:

Global symbol "$tmploc" requires explicit package name at C:\Radiance\bin\
genklemsamp.pl line 75.
Global symbol "$tmploc" requires explicit package name at C:\Radiance\bin\
genklemsamp.pl line 76.
Execution of C:\Radiance\bin\genklemsamp.pl aborted due to compilation
errors.

I tried to solve the proble by adding "my $tmploc;" outside the block but
it then is giving me a similar error to what I had yesterday. I also tried
to change the location to c:\\temp to make sure it is not a permission
issue:

if ($windoz) {
    my $tmploc;
    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Temp";
    }
    chomp($tmploc);
...

Here is the error again (line 76 is the last line in the code:
"chomp($tmploc);")

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 76.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 77.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 107.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.pl line
115.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 116.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at
C:\Radiance\bin\genklemsamp.plline 118.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at
C:\Radiance\bin\genklemsamp.plline 118.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at
C:\Radiance\bin\genklemsamp.plline 118.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 123.

···

On Thu, Jul 25, 2013 at 1:05 PM, Guglielmetti, Robert < [email protected]> wrote:

…and be sure and report success back on this channel! Anything that
improves Windows compatibility will want to make its way back into the
source. =)****

** **

- Rob****

** **

*From:* Thomas Bleicher [mailto:[email protected]]
*Sent:* Wednesday, July 24, 2013 9:14 PM
*To:* Radiance general discussion
*Subject:* Re: [Radiance-general] genklemsamp.pl error on Windows****

** **

Hi Mostapha****

** **

Try to replace ****

** **

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ...****

with

if ($windoz) {
    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Windows\\Temp";
    }
    chomp($tmploc);
    ...

Warning: Untested! ****

** **

Regards,****

Thomas****

On Wed, Jul 24, 2013 at 7:53 PM, Mostapha Sadeghipour <
[email protected]> wrote:****

Hi all,

I'm trying to run the 3 phase method to on Windows and there are some
problems with running genklemsamp.pl. Not to say that I'm using Andy's
tutorial as the reference.

If I run genklemsamp by defining window properties it works fine:

>> genklemsamp -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

However it crashes if I pass a window geometry file:

>> genklemsamp.pl -vd 0 -1 0 window.rad****

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 71.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 72.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 102.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.plline 110.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 111.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 118.****

There is an issue with $tmploc on line 71 which is apparently only needed
for Windows systems. I tried to pass a different path to the variable as a
string but I couldn't solve the problem. Here is the lines 69-71.

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ....

Anyone knows how can I get genklemsamp to work on Windows?

Thanks in advance,
Mostapha****

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general****

** **

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

So the problem with the code was $ENV{'TMP'} returns a HASH and Windows
couldn't create the temp folder. I assigned "c:\temp" as the temporary
folder so the code creates the temp folder however it cannot execute the
xform command later.

system "xform -m void @ARGV | oconv - > $td/surf.oct";

I tested it on Windows7 and Windows8 and I assume it is a permission issue
since if I type the same command in the command line, it just works fine
and creates surf.oct in the folder (attached!).

I think if I can find a way to run the commands in an elevated mode from
the Perl script, and modify all (system "do something") lines, then the
script should work just fine in Windows.

Mostapha

···

On Thu, Jul 25, 2013 at 1:35 PM, Mostapha Sadeghipour <[email protected] > wrote:

Hi Thomas and Rob,

Thank you Thomas for the reply. Here is the result:

Global symbol "$tmploc" requires explicit package name at C:\Radiance\bin\
genklemsamp.pl line 75.
Global symbol "$tmploc" requires explicit package name at C:\Radiance\bin\
genklemsamp.pl line 76.
Execution of C:\Radiance\bin\genklemsamp.pl aborted due to compilation
errors.

I tried to solve the proble by adding "my $tmploc;" outside the block but
it then is giving me a similar error to what I had yesterday. I also tried
to change the location to c:\\temp to make sure it is not a permission
issue:

if ($windoz) {
    my $tmploc;

    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Temp";
    }
    chomp($tmploc);
...

Here is the error again (line 76 is the last line in the code:
"chomp($tmploc);")

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 76.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 77.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 107.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.plline 115.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 116.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 118.

vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 123.

On Thu, Jul 25, 2013 at 1:05 PM, Guglielmetti, Robert < > [email protected]> wrote:

…and be sure and report success back on this channel! Anything that
improves Windows compatibility will want to make its way back into the
source. =)****

** **

- Rob****

** **

*From:* Thomas Bleicher [mailto:[email protected]]
*Sent:* Wednesday, July 24, 2013 9:14 PM
*To:* Radiance general discussion
*Subject:* Re: [Radiance-general] genklemsamp.pl error on Windows****

** **

Hi Mostapha****

** **

Try to replace ****

** **

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ...****

with

if ($windoz) {
    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Windows\\Temp";
    }
    chomp($tmploc);
    ...

Warning: Untested! ****

** **

Regards,****

Thomas****

On Wed, Jul 24, 2013 at 7:53 PM, Mostapha Sadeghipour <
[email protected]> wrote:****

Hi all,

I'm trying to run the 3 phase method to on Windows and there are some
problems with running genklemsamp.pl. Not to say that I'm using Andy's
tutorial as the reference.

If I run genklemsamp by defining window properties it works fine:

>> genklemsamp -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

However it crashes if I pass a window geometry file:

>> genklemsamp.pl -vd 0 -1 0 window.rad****

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 71.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 72.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 102.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.plline 110.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 111.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 118.****

There is an issue with $tmploc on line 71 which is apparently only needed
for Windows systems. I tried to pass a different path to the variable as a
string but I couldn't solve the problem. Here is the lines 69-71.

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ....

Anyone knows how can I get genklemsamp to work on Windows?

Thanks in advance,
Mostapha****

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general****

** **

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Here is the attachment!

···

On Thu, Jul 25, 2013 at 3:38 PM, Mostapha Sadeghipour <[email protected] > wrote:

So the problem with the code was $ENV{'TMP'} returns a HASH and Windows
couldn't create the temp folder. I assigned "c:\temp" as the temporary
folder so the code creates the temp folder however it cannot execute the
xform command later.

system "xform -m void @ARGV | oconv - > $td/surf.oct";

I tested it on Windows7 and Windows8 and I assume it is a permission issue
since if I type the same command in the command line, it just works fine
and creates surf.oct in the folder (attached!).

I think if I can find a way to run the commands in an elevated mode from
the Perl script, and modify all (system "do something") lines, then the
script should work just fine in Windows.

Mostapha

On Thu, Jul 25, 2013 at 1:35 PM, Mostapha Sadeghipour < > [email protected]> wrote:

Hi Thomas and Rob,

Thank you Thomas for the reply. Here is the result:

Global symbol "$tmploc" requires explicit package name at C:\Radiance\bin\
genklemsamp.pl line 75.
Global symbol "$tmploc" requires explicit package name at C:\Radiance\bin\
genklemsamp.pl line 76.
Execution of C:\Radiance\bin\genklemsamp.pl aborted due to compilation
errors.

I tried to solve the proble by adding "my $tmploc;" outside the block but
it then is giving me a similar error to what I had yesterday. I also tried
to change the location to c:\\temp to make sure it is not a permission
issue:

if ($windoz) {
    my $tmploc;

    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Temp";
    }
    chomp($tmploc);
...

Here is the error again (line 76 is the last line in the code:
"chomp($tmploc);")

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 76.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 77.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 107.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.plline 115.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 116.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 118.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 118.

vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 123.

On Thu, Jul 25, 2013 at 1:05 PM, Guglielmetti, Robert < >> [email protected]> wrote:

…and be sure and report success back on this channel! Anything that
improves Windows compatibility will want to make its way back into the
source. =)****

** **

- Rob****

** **

*From:* Thomas Bleicher [mailto:[email protected]]
*Sent:* Wednesday, July 24, 2013 9:14 PM
*To:* Radiance general discussion
*Subject:* Re: [Radiance-general] genklemsamp.pl error on Windows****

** **

Hi Mostapha****

** **

Try to replace ****

** **

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ...****

with

if ($windoz) {
    if (exists $ENV{'TMP'}) {
        my $tmploc = $ENV{'TMP'};
    } else {
        my $tmploc = "C:\\Windows\\Temp";
    }
    chomp($tmploc);
    ...

Warning: Untested! ****

** **

Regards,****

Thomas****

On Wed, Jul 24, 2013 at 7:53 PM, Mostapha Sadeghipour <
[email protected]> wrote:****

Hi all,

I'm trying to run the 3 phase method to on Windows and there are some
problems with running genklemsamp.pl. Not to say that I'm using Andy's
tutorial as the reference.

If I run genklemsamp by defining window properties it works fine:

>> genklemsamp -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

However it crashes if I pass a window geometry file:

>> genklemsamp.pl -vd 0 -1 0 window.rad****

Use of uninitialized value $tmploc in scalar chomp at C:\Radiance\bin\
genklemsamp.pl line 71.
Use of uninitialized value $tmploc in concatenation (.) or string at
C:\Radiance\bin\genklemsamp.pl line 72.
Can't spawn "cmd.exe": No such file or directory at C:\Radiance\bin\
genklemsamp.pl line 102.
Use of uninitialized value in split at C:\Radiance\bin\genklemsamp.plline 110.
Use of uninitialized value $bcube[3] in multiplication (*) at
C:\Radiance\bin\genklemsamp.pl line 111.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value $bcube[3] in division (/) at C:\Radiance\bin\
genklemsamp.pl line 113.
Use of uninitialized value in addition (+) at C:\Radiance\bin\
genklemsamp.pl line 113.
vwright: illegal horizontal view size
Illegal division by zero at C:\Radiance\bin\genklemsamp.pl line 118.****

There is an issue with $tmploc on line 71 which is apparently only
needed for Windows systems. I tried to pass a different path to the
variable as a string but I couldn't solve the problem. Here is the lines
69-71.

if ($windoz) {
    my $tmploc = `echo \%TMP\%`;
    chomp($tmploc);
    ....

Anyone knows how can I get genklemsamp to work on Windows?

Thanks in advance,
Mostapha****

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general****

** **

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Mostapha,

could you try out this version of genklemsamp, please:
http://www.jaloxa.eu/pickup/genklemsamp-aj01.pl

I've made some small changes to the tempdir code.

I tried to solve the proble by adding "my $tmploc;" outside the block but
it then is giving me a similar error to what I had yesterday. I also tried
to change the location to c:\\temp to make sure it is not a permission
issue:

if ($windoz) {
     my $tmploc;
     if (exists $ENV{'TMP'}) {
         my $tmploc = $ENV{'TMP'};
     } else {
         my $tmploc = "C:\\Temp";
     }
     chomp($tmploc);
...

Regards

Axel

Hi Axel,

Thanks for your help.

It does change the folder to Windows temp folder:
C:\Users\%usename%\AppData\Local\Temp\(randomName) in my case, but it
doesn't create it.

I added one line to create the folder so it does it now but the problem
with executing Xform is still there (system "xform -m void @ARGV | oconv -

$td/surf.oct":wink:

Again, if I write the same command in the command line it works fine.

Best regards,
Mostapha

···

On Sun, Jul 28, 2013 at 1:02 PM, Axel Jacobs <[email protected]> wrote:

Mostapha,

could you try out this version of genklemsamp, please:
http://www.jaloxa.eu/pickup/**genklemsamp-aj01.pl<http://www.jaloxa.eu/pickup/genklemsamp-aj01.pl>

I've made some small changes to the tempdir code.

I tried to solve the proble by adding "my $tmploc;" outside the block but

it then is giving me a similar error to what I had yesterday. I also tried
to change the location to c:\\temp to make sure it is not a permission
issue:

if ($windoz) {
     my $tmploc;
     if (exists $ENV{'TMP'}) {
         my $tmploc = $ENV{'TMP'};
     } else {
         my $tmploc = "C:\\Temp";
     }
     chomp($tmploc);
...

Regards

Axel

______________________________**_________________
Radiance-general mailing list
Radiance-general@radiance-**online.org<[email protected]>
http://www.radiance-online.**org/mailman/listinfo/radiance-**general<http://www.radiance-online.org/mailman/listinfo/radiance-general>

Mostapha Sadeghipour <sadeghipour@...> writes:

Hi Axel,
Thanks for your help.

It does change the folder to Windows temp folder:

C:\Users\%usename%\AppData\Local\Temp\(randomName) in my case, but it
doesn't create it.

I added one line to create the folder so it does it now but the problem

with executing Xform is still there (system "xform -m void <at> ARGV |
oconv - > $td/surf.oct":wink:

Again, if I write the same command in the command line it works fine.

Best regards,
Mostapha

On Sun, Jul 28, 2013 at 1:02 PM, Axel Jacobs <jacobs.axel-

[email protected]> wrote:Mostapha,

could you try out this version of genklemsamp,

please:http://www.jaloxa.eu/pickup/genklemsamp-aj01.pl

I've made some small changes to the tempdir code.

I tried to solve the proble by adding "my $tmploc;" outside the block but
it then is giving me a similar error to what I had yesterday. I also tried
to change the location to c:\\temp to make sure it is not a permission
issue:
if ($windoz) {
my $tmploc;
if (exists $ENV{'TMP'}) {
my $tmploc = $ENV{'TMP'};
} else {
my $tmploc = "C:\\Temp";
}
chomp($tmploc);
...

Regards
Axel

_______________________________________________
Radiance-general mailing listRadiance-general <at> radiance-

online.orghttp://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
Radiance-general@...
http://www.radiance-online.org/mailman/listinfo/radiance-general

I seem to be having similar trouble - I assume this hasn't been resolved as
I'm using Radiance 4.2.a.4 from 17 April 2014?

I've tried a couple of workarounds, using "run as administrator" on the
cmd.exe, Perl.exe, a shortcut.lnk for genklemsamp, and genklemsamp.pl
itself. None seemed to work.

genklemsamp.pl -vp 50 0 25 -vh 80 -vv 40 -vd 0 -1 0 > samplerays_1.dat

The above in DOS cmd, creates the file samplerays_1.dat but it contains 0KB.

Any suggestions or developments on solving this?
Thanks for any help,

Best,
Patrick