Design forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Consistent eroor in my autoscripted object

Mats_Knutsson
Enthusiast
I'm trying to make a simple lamp and gets an error message in the 3D view all the time. The code that's the problem is (in about 8 places):

result_113 = sweepgroup{2} ("group_112", -0.001732050807569, 0.001, 0)

What's the deal?

Also the white colour looks darker on the vertical surfaces...everything that's not glass in the image is white.

See attached image fo what I'm trying to make.
/Mats GDL-moron
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB
13 REPLIES 13

Peter Devlin
Newcomer
Hello Mats,
It looks like the auto-script mechanism has shot itself in the foot.
It's interesting that the "sweepgroup{2}" command is not
mentioned in the AC 10 GDL reference manual.
You might try saving the project that contain the elements
you are trying to auto-script into AC 9 format, opening the
project in AC 9, and trying the auto-script in that version ?
Peter Devlin
iMac
0S 10.6.8
AC 10 US build (1188)

F_ Beister
Newcomer
What's the exact error message?

Can you post the code passage?

Try this:

result_113 = sweepgroup ("group_112", -0.001732050807569, 0.001, 0)

The first version of the command has the same syntax. Maybe this works. Probably the difference is internal as RULED and RULED{2}.

Mats_Knutsson
Enthusiast
F. wrote:
What's the exact error message?

Can you post the code passage?

Try this:

result_113 = sweepgroup ("group_112", -0.001732050807569, 0.001, 0)

The first version of the command has the same syntax. Maybe this works. Probably the difference is internal as RULED and RULED{2}.
Hi Frank,
I'm too lousy at GDL to understand whats happening.

Every line of code with the string above (result_XXXX....) gives an error message as attached.
The object is pretty simple!? A profiler object, some walls with empty window openings and some additional walls.
I tried to delete the {} but with no success.
I will try Peters advice tomorrow.
Thanks for helping me!
:)Mats
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Mats_Knutsson
Enthusiast
Peter wrote:
Hello Mats,
It looks like the auto-script mechanism has shot itself in the foot.
It's interesting that the "sweepgroup{2}" command is not
mentioned in the AC 10 GDL reference manual.
You might try saving the project that contain the elements
you are trying to auto-script into AC 9 format, opening the
project in AC 9, and trying the auto-script in that version ?
Peter Devlin
Worked of course in AC9...ahhhhhrg...
Thanks for the tip of doing it in v9!
Mats
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

F_ Beister
Newcomer
Have you compared both scripts? v10 <> v9? Whats the difference? Works the v9 scripted version in AC10?

Mats_Knutsson
Enthusiast
F. wrote:
Have you compared both scripts? v10 <> v9? Whats the difference? Works the v9 scripted version in AC10?
I don't have the time to look deeper into this. I will do the stuff in AC9 in the future. I spent several hours of dearly precious night time to fix this...so right now I don't want to GDL anything more...until Nottingham next week....😉
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Matthew Lohden
Newcomer
I have sen some problems in group operations in 10 that were not present in 9. This might be related.

See you next week in Nottingham, Mats.
Matthew Lohden
Consultant, SF CA

MacPro 8core 32GB Radeon 5870
OSX 10.8 Mountain Lion, XP32, Win 7x64

Peter Devlin
Newcomer
Hello Mats,
I had made an assumption that once the object was successfully
auto-scripted in AC 9 it would work in AC 10.
I understand that you don't want to compare the two scripts
but could you answer Frank's other question.
Does the AC 9 auto-scripted object work in AC 10.
Thank you,
Peter Devlin
iMac
0S 10.6.8
AC 10 US build (1188)

Mats_Knutsson
Enthusiast
Peter wrote:
Hello Mats,
I had made an assumption that once the object was successfully
auto-scripted in AC 9 it would work in AC 10.
I understand that you don't want to compare the two scripts
but could you answer Frank's other question.
Does the AC 9 auto-scripted object work in AC 10.
Thank you,
Peter Devlin
OKi, the AC9 autoscripted object works in AC10...
AC 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

Peter Devlin
Newcomer
Hello Mats,
Thanks for checking on that for us.
Peter Devlin
iMac
0S 10.6.8
AC 10 US build (1188)

F_ Beister
Newcomer
I got mail from GS:
The difference between SWEEPGROUP and SWEEPGROUP{2} is that in the
former case the actual transformation matrix is applied again to the
direction vector of the sweeping operation with respect to the current
coordinate system. (Roughly speaking, in the case of SWEEPGROUP, the
current transformation is applied to the direction vector twice with
respect to the global coordinate system.)
See the example below. We rotate the coordinate system (CS) by 45
degrees around the z axis. Since SWEEPGROUP rotates the direction vector
again in the current CS by 45, the direction vector of swept_1 in the
global CS will be {0,1,0}. In the case of SWEEPGROUP{2} the direction
vector is left as is in the local CS, so its direction in the global
space will be {sqr(2)/2,sqr(2)/2,0}. (See the attached example.)

resol 8
rotz 45

group "tool_1"
addz 1
sphere 0.2
del 1
endgroup

group "tool_2"
addz 2
sphere 0.2
del 1
endgroup

swept_1 = sweepgroup( "tool_1", 1, 0, 0 )
placegroup swept_1

swept_2 = sweepgroup{2}( "tool_2", 1, 0, 0 )
placegroup swept_2

Peter Devlin
Newcomer
Hello Frank,
Thanks for passing this along to us.
I was wondering how you knew that
the syntax was not different between
sweepgroup and sweepgroup{2}
when sweepgroup{2} is not mentioned
in the AC 10 GDL manual nor in the
New GDL Features in Archicad 10
that I could see.
Thanks,
Peter Devlin
iMac
0S 10.6.8
AC 10 US build (1188)

F_ Beister
Newcomer
I was wondering how you knew that
the syntax was not different between
sweepgroup and sweepgroup{2}
I did not knew. I compared both commands and it was obvisiously the same. 😉 I made an illustration and uploaded it to www.selfgdl.com.

Didn't find the answer? Start a new discussion

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!