Hallo GDL-Profis
Ich habe mich bisher immer gut ohne gdl durchschlagen können. Aber jetzt steh ich mit meinen Basic-Kenntnissen am Anschlag...
Ich habe das berühmte Fahnen-Objekt mit eigenem Motiv belegen wollen, aber irgendwie klappts nicht so recht.
Das Motiv "ccaarau" besteht aus einem dreieckigen Wimpel auf quadratischem roten Hintergrund, welcher noch fein schwraz umrandet ist.
Das Problem ist nun, dass das Motiv a) spiegelverkehrt dargestellt wird, und b) das Motiv immer auf etwas kleiner als Wimpelgrösse geschnitten wird. Bildgrösse ändern hat keinen Einfluss... :confused: Das Spiegeln des Motivs im Bildbearbeitungsprogramm funktioniert zwar, scheint mir aber ziemlich unlogisch.
Danke im Voraus für eure Unterstützung.
</font><blockquote><font size="1" face="Verdana, Helvetica, sans-serif">Code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> !Flag Pole
RESOL 12
MATERIAL MTL
CONE FPHT, FPHT*0.0075, FPHT*0.0025, 90, 90
ADDZ FPHT
SPHERE FPHT*0.0065
DEL 1
flagName = FLG
!Flag selection
IF RNDM THEN
rNum = INT(RND(25))
IF rNum=1 THEN flagName='Arg'
IF rNum=2 THEN flagName='Austl'
IF rNum=3 THEN flagName='Austria'
IF rNum=4 THEN flagName='Belgium'
IF rNum=5 THEN flagName='Canada'
IF rNum=6 THEN flagName='Denmark'
IF rNum=7 THEN flagName='Finland'
IF rNum=8 THEN flagName='France'
IF rNum=9 THEN flagName='Germany'
IF rNum=10 THEN flagName='Hungary'
IF rNum=11 THEN flagName='Italy'
IF rNum=12 THEN flagName='Lithua'
IF rNum=13 THEN flagName='Mexico'
IF rNum=14 THEN flagName='Moldova'
IF rNum=15 THEN flagName='Neth'
IF rNum=16 THEN flagName='Norway'
IF rNum=17 THEN flagName='Nz'
IF rNum=18 THEN flagName='Peru'
IF rNum=19 THEN flagName='Russia'
IF rNum=20 THEN flagName='Sa'
IF rNum=21 THEN flagName='Switz'
IF rNum=22 THEN flagName='Uk'
IF rNum=23 THEN flagName='Usa'
IF rNum=24 THEN flagName='Venez'
IF rNum=25 THEN flagName='ccaarau'
!DEFINE STYLE "aa" "Arial", 2000, 7, 0
!SET STYLE "aa"
!TEXT 0.001, 0, flagName
ENDIF
IF flagName ="Arg" THEN GOSUB 10
IF flagName ="Austl" THEN GOSUB 20
IF flagName ="Austria" THEN GOSUB 10
IF flagName ="Belgium" THEN GOSUB 30
IF flagName ="Canada" THEN GOSUB 20
IF flagName ="Denmark" THEN GOSUB 40
IF flagName ="Finland" THEN GOSUB 50
IF flagName ="France" THEN GOSUB 10
IF flagName ="Germany" THEN GOSUB 60
IF flagName ="Hungary" THEN GOSUB 10
IF flagName ="Italy" THEN GOSUB 10
IF flagName ="Lithua" THEN GOSUB 20
IF flagName ="Mexico" THEN GOSUB 10
IF flagName ="Moldova" THEN GOSUB 70
IF flagName ="Neth" THEN GOSUB 10
IF flagName ="Norway" THEN GOSUB 80
IF flagName ="Nz" THEN GOSUB 20
IF flagName ="Peru" THEN GOSUB 10
IF flagName ="Russia" THEN GOSUB 10
IF flagName ="Sa" THEN GOSUB 10
IF flagName ="Switz" THEN GOSUB 90
IF flagName ="Uk" THEN GOSUB 20
IF flagName ="Usa" THEN GOSUB 100
IF flagName ="Venez" THEN GOSUB 10
IF flagName ="ccaarau" THEN GOSUB 90
!Wind Speed Selection
IF WSPD="Slow" THEN SPD=0.75
IF WSPD="Medium" THEN SPD=1
IF WSPD="Fast" THEN SPD=1.5
RATFLG =SZX/SZY
ADDZ FPHT-0.6*FLGL/RATFLG
ADDX 1.1*FLGL/2
MUL FLGL/2, FLGL/2*SPD, FLGL/RATFLG
FLGX=RATX/SZX*FLGL
FLGY=RATY/SZY*FLGL/RATFLG
ROTX 90
q=(N_+FNU)*40
!Flag body
BODY -1
VERT -1.009465, 0.497912, sin(q+360)*0.1*0
VERT -0.758049, 0.513212, sin(q+320)*0.1*0.2
VERT -0.521268, 0.508426, sin(q+280)*0.1*0.4
VERT -0.250387, 0.487386, sin(q+240)*0.1*0.6
VERT -0.00974972, 0.471607, sin(q+200)*0.1*0.8
VERT 0.250612, 0.483442, sin(q+160)*0.1*1
VERT 0.499139, 0.499221, sin(q+120)*0.1*1.2
VERT 0.755893, 0.472164, sin(q+80)*0.1*1.4
VERT 0.937848, 0.429705, sin(q+40)*0.1*1.6
VERT -0.980189, 0.250694, sin(q+320)*0.1*0.2
VERT -0.736317, 0.26934, sin(q+280)*0.1*0.3
VERT -0.497599, 0.271733, sin(q+240)*0.1*0.5
VERT -0.234085, 0.257267, sin(q+200)*0.1*0.6
VERT -0.00341036, 0.238725, sin(q+160)*0.1*0.8
VERT 0.252406, 0.237792, sin(q+120)*0.1*1
VERT 0.500454, 0.250694, sin(q+80)*0.1*1.2
VERT 0.751064, 0.230706, sin(q+40)*0.1*1.4
VERT 0.978772, 0.221673, sin(q+0)*0.1*1.6
VERT -0.960054, 0.00531673, sin(q+280)*0.1*0.4
VERT -0.720275, 0.01530751, sin(q+240)*0.1*0.5
VERT -0.490488, 0.01530751, sin(q+200)*0.1*0.6
VERT -0.234057, 0.00864699, sin(q+160)*0.1*0.7
VERT 0.00239097, -0.00134379, sin(q+120)*0.1*0.8
VERT 0.272142, -0.00134379, sin(q+80)*0.1*1
VERT 0.50859, 0.00531673, sin(q+40)*0.1*1.2
VERT 0.785002, -0.02132535, sin(q+0)*0.1*1.4
VERT 1.001469, -0.03797665, sin(q-40)*0.1*1.6
VERT -0.983366, -0.274425, sin(q+240)*0.1*0.4
VERT -0.716945, -0.254444, sin(q+200)*0.1*0.5
VERT -0.490488, -0.241123, sin(q+160)*0.1*0.6
VERT -0.237388, -0.241123, sin(q+120)*0.1*0.7
VERT -0.00093929, -0.247783, sin(q+80)*0.1*0.8
VERT 0.268812, -0.241123, sin(q+40)*0.1*1
VERT 0.521912, -0.247783, sin(q+0)*0.1*1.2
VERT 0.781672, -0.261104, sin(q-40)*0.1*1.4
VERT 1.01146, -0.274425, sin(q-80)*0.1*1.6
VERT -1.049971, -0.530855, sin(q+200)*0.1*0.3
VERT -0.771689, -0.501782, sin(q+160)*0.1*0.4
VERT -0.530451, -0.477571, sin(q+120)*0.1*0.5
VERT -0.257369, -0.477571, sin(q+80)*0.1*0.6
VERT 0.00239097, -0.500883, sin(q+40)*0.1*0.8
VERT 0.278803, -0.500883, sin(q+0)*0.1*1
VERT 0.558544, -0.514204, sin(q-40)*0.1*1.2
VERT 0.828295, -0.537516, sin(q-80)*0.1*1.4
VERT 1.078065, -0.570818, sin(q-120)*0.1*1.9
VERT -1.50366, -0.75183, 0
VERT 1.50366, -0.75183, 0
VERT -1.50366, 0.75183, 0
VERT -1.50366, -0.75183, 1
EDGE 1, 2, 1, 0, 0
EDGE 2, 3, 3, 0, 0
EDGE 3, 4, 5, 0, 0
EDGE 4, 5, 7, 0, 0
EDGE 5, 6, 9, 0, 0
EDGE 6, 7, 11, 0, 0
EDGE 7, 8, 13, 0, 0
EDGE 8, 9, 15, 0, 0
EDGE 9, 1, 0, 0, 1
EDGE 1, 10, 2, 0, 0
EDGE 2, 11, 1, 4, 1
EDGE 3, 12, 3, 6, 1
EDGE 4, 13, 5, 8, 1
EDGE 5, 14, 7, 10, 1
EDGE 6, 15, 9, 12, 1
EDGE 7, 16, 11, 14, 1
EDGE 8, 17, 13, 16, 1
EDGE 9, 18, 15, 0, 0
EDGE 10, 11, 2, 17, 1
EDGE 11, 12, 4, 19, 1
EDGE 12, 13, 6, 21, 1
EDGE 13, 14, 8, 23, 1
EDGE 14, 15, 10, 25, 1
EDGE 15, 16, 12, 27, 1
EDGE 16, 17, 14, 29, 1
EDGE 17, 18, 16, 31, 1
EDGE 18, 10, 0, 0, 1
EDGE 10, 19, 18, 0, 0
EDGE 11, 20, 17, 20, 1
EDGE 12, 21, 19, 22, 1
EDGE 13, 22, 21, 24, 1
EDGE 14, 23, 23, 26, 1
EDGE 15, 24, 25, 28, 1
EDGE 16, 25, 27, 30, 1
EDGE 17, 26, 29, 32, 1
EDGE 18, 27, 31, 0, 0
EDGE 19, 20, 18, 33, 1
EDGE 20, 21, 20, 35, 1
EDGE 21, 22, 22, 37, 1
EDGE 22, 23, 24, 39, 1
EDGE 23, 24, 26, 41, 1
EDGE 24, 25, 28, 43, 1
EDGE 25, 26, 30, 45, 1
EDGE 26, 27, 32, 47, 1
EDGE 27, 19, 0, 0, 1
EDGE 19, 28, 34, 0, 0
EDGE 20, 29, 33, 36, 1
EDGE 21, 30, 35, 38, 1
EDGE 22, 31, 37, 40, 1
EDGE 23, 32, 39, 42, 1
EDGE 24, 33, 41, 44, 1
EDGE 25, 34, 43, 46, 1
EDGE 26, 35, 45, 48, 1
EDGE 27, 36, 47, 0, 0
EDGE 28, 29, 34, 49, 1
EDGE 29, 30, 36, 51, 1
EDGE 30, 31, 38, 53, 1
EDGE 31, 32, 40, 55, 1
EDGE 32, 33, 42, 57, 1
EDGE 33, 34, 44, 59, 1
EDGE 34, 35, 46, 61, 1
EDGE 35, 36, 48, 63, 1
EDGE 36, 28, 0, 0, 1
EDGE 28, 37, 50, 0, 0
EDGE 29, 38, 49, 52, 1
EDGE 30, 39, 51, 54, 1
EDGE 31, 40, 53, 56, 1
EDGE 32, 41, 55, 58, 1
EDGE 33, 42, 57, 60, 1
EDGE 34, 43, 59, 62, 1
EDGE 35, 44, 61, 64, 1
EDGE 36, 45, 63, 0, 0
EDGE 37, 38, 50, 0, 0
EDGE 38, 39, 52, 0, 0
EDGE 39, 40, 54, 0, 0
EDGE 40, 41, 56, 0, 0
EDGE 41, 42, 58, 0, 0
EDGE 42, 43, 60, 0, 0
EDGE 43, 44, 62, 0, 0
EDGE 44, 45, 64, 0, 0
EDGE 45, 37, 0, 0, 1
EDGE 1, 11, 1, 2, 1
EDGE 2, 12, 3, 4, 1
EDGE 3, 13, 5, 6, 1
EDGE 4, 14, 7, 8, 1
EDGE 5, 15, 9, 10, 1
EDGE 6, 16, 11, 12, 1
EDGE 7, 17, 13, 14, 1
EDGE 8, 18, 15, 16, 1
EDGE 10, 20, 17, 18, 1
EDGE 11, 21, 19, 20, 1
EDGE 12, 22, 21, 22, 1
EDGE 13, 23, 23, 24, 1
EDGE 14, 24, 25, 26, 1
EDGE 15, 25, 27, 28, 1
EDGE 16, 26, 29, 30, 1
EDGE 17, 27, 31, 32, 1
EDGE 19, 29, 33, 34, 1
EDGE 20, 30, 35, 36, 1
EDGE 21, 31, 37, 38, 1
EDGE 22, 32, 39, 40, 1
EDGE 23, 33, 41, 42, 1
EDGE 24, 34, 43, 44, 1
EDGE 25, 35, 45, 46, 1
EDGE 26, 36, 47, 48, 1
EDGE 28, 38, 49, 50, 1
EDGE 29, 39, 51, 52, 1
EDGE 30, 40, 53, 54, 1
EDGE 31, 41, 55, 56, 1
EDGE 32, 42, 57, 58, 1
EDGE 33, 43, 59, 60, 1
EDGE 34, 44, 61, 62, 1
EDGE 35, 45, 63, 64, 1
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 82, -11, -1
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 10, 19, -82
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 83, -12, -2
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 11, 20, -83
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 84, -13, -3
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 12, 21, -84
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 85, -14, -4
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 13, 22, -85
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 86, -15, -5
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 14, 23, -86
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 87, -16, -6
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 15, 24, -87
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 88, -17, -7
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 16, 25, -88
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 89, -18, -8
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 17, 26, -89
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 90, -29, -19
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 28, 37, -90
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 91, -30, -20
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 29, 38, -91
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 92, -31, -21
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 30, 39, -92
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 93, -32, -22
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 31, 40, -93
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 94, -33, -23
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 32, 41, -94
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 95, -34, -24
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 33, 42, -95
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 96, -35, -25
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 34, 43, -96
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 97, -36, -26
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 35, 44, -97
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 98, -47, -37
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 46, 55, -98
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 99, -48, -38
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 47, 56, -99
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 100, -49, -39
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 48, 57, -100
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 101, -50, -40
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 49, 58, -101
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 102, -51, -41
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 50, 59, -102
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 103, -52, -42
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 51, 60, -103
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 104, -53, -43
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 52, 61, -104
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 105, -54, -44
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 53, 62, -105
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 106, -65, -55
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 64, 73, -106
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 107, -66, -56
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 65, 74, -107
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 108, -67, -57
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 66, 75, -108
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 109, -68, -58
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 67, 76, -109
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 110, -69, -59
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 68, 77, -110
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 111, -70, -60
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 69, 78, -111
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 112, -71, -61
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 70, 79, -112
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 113, -72, -62
PIPG flagName, FLGX, FLGY, 4, 3, 0, 0, 71, 80, -113
COOR 1+256, 46, 47, 48, 49
BODY -1
DEL 4
EXIT
10:
SZX=2.25
SZY=1.5
RATX=3.38
RATY=2.25
FNU=2
RETURN
20:
SZX=2.6
SZY=1.3
RATX=3.9
RATY=1.95
FNU=4
RETURN
30:
SZX=1.98
SZY=1.71
RATX=2.97
RATY=2.57
FNU=6
RETURN
40:
SZX=2.12
SZY=1.6
RATX=3.18
RATY=2.4
FNU=8
RETURN
50:
SZX=2.35
SZY=1.44
RATX=3.53
RATY=2.16
FNU=10
RETURN
60:
SZX=2.37
SZY=1.43
RATX=3.56
RATY=2.15
FNU=12
RETURN
70:
SZX=1.4
SZY=0.7
RATX=2.1
RATY=1.05
FNU=14
RETURN
80:
SZX=2.16
SZY=1.57
RATX=3.24
RATY=2.36
FNU=16
RETURN
90:
SZX=1.84
SZY=1.84
RATX=2.76
RATY=2.76
FNU=18
RETURN
100:
SZX=2.53
SZY=1.34
RATX=3.80
RATY=2.01
FNU=20
RETURN
Ich habe natürlich auch das Parameterscript ergänzt. Bis auf die oben erwähnten Problem funktioniert alles.
Gruss, poeik
ArchiCAD CHE 5 - 27 - Windows 10