abbrechen
Suchergebnisse werden angezeigt für 
Stattdessen suchen nach 
Meintest du: 
abbrechen
Suchergebnisse werden angezeigt für 
Stattdessen suchen nach 
Meintest du: 
Programmierung
Alles über Programmierung in GDL und Python

3D Objekt ändern

bjoern1
Newcomer
Hallo, ich bin blutiger Anfänger im Bereich GDL, ich möchte gerne das Bibliothekselement vom Brandschtutz (Spule 14) ändern in der Breite, finde aber nicht die richtigen Parameter, das ist das 3D Skript


!!! Swing Reel.gsm !!!


IF gs_detlevel_3D_m = -1 THEN
gs_detlevel_3D_m = 2 ! Detailed
IF gs_detlevel_3D = `Aus` THEN gs_detlevel_3D_m = 0
IF gs_detlevel_3D = `Einfach` THEN gs_detlevel_3D_m = 1
ENDIF

IF gs_detlevel_3D_m = 0 THEN END


PEN gs_cont_pen


IF gs_shadow=0 THEN SHADOW OFF
IF gs_shadow=1 THEN SHADOW ON

unID = 1
HOTSPOT -a/2, -b/2, 0, unID
unID=unID+1
HOTSPOT -a/2, b/2, 0, unID
unID=unID+1
HOTSPOT a/2, -b/2, 0, unID
unID=unID+1
HOTSPOT a/2, b/2, 0, unID
unID=unID+1

hotspot a/2, -b/2, 0, unID, zzyzx, 1+128
unID=unID+1
hotspot a/2, -b/2, -1, unID, zzyzx, 3
unID=unID+1
hotspot a/2, -b/2, zzyzx, unID, zzyzx, 2

unID=unID+1
hotspot a/2, b/2, 0, unID, zzyzx, 1+128
unID=unID+1
hotspot a/2, b/2, -1, unID, zzyzx, 3
unID=unID+1
hotspot a/2, b/2, zzyzx, unID, zzyzx, 2

IF GLOB_CONTEXT>20 and GLOB_CONTEXT<40 THEN gs_detlevel_3D_m=1


! --- start of modifying to Shaft


! --- CONNECTIONS --- !

PEN gs_cont_pen
IF gs_detlevel_3D=`Einfach` THEN RESOL 8
IF gs_detlevel_3D=`Detailliert` THEN RESOL 24

isavailable = 0
isInArchiCAD = APPLICATION_QUERY ("MEPMODELER", "IsAvailable()", isavailable)

IF isavailable OR isInArchiCAD = 0 THEN

IF useSysMat THEN
rack_mat = sMat
hose_mat = sMat
squirt_mat = sMat
ENDIF

CALL "MEP_m_ConnectionsACL_4" PARAMETERS SetProgram = SetProgram,
ui_current_con = ui_current_con,
MEP_NumberConnections = MEP_NumberConnections,
MEP_NumConnectionData = gs_Connections,
gs_AddConnections = gs_AddConnections,
cShow3D = 1,
gs_ConMat = rack_mat,
MEP_InsShow = 0,
MEP_cline_show_3D = 0,
gs_cont_pen = gs_cont_pen,
ConPosX_1=ConPosX_1, ConPosY_1=ConPosY_1, ConPosZ_1=ConPosZ_1, ConLength_1=ConLength_1, ConEdit_1 = 1
ENDIF

! --- end of modifying to Shaft


IF gs_detlevel_3D_m=1 THEN RESOL 16
IF gs_detlevel_3D_m=2 THEN RESOL gs_resol

ADD -0.045, 0.055, 0

IF gs_detlevel_3D_m=1 THEN !! Simple 3D

MATERIAL rack_mat

ADD a/2+0.045-0.1, -0.21+hth/2+0.03, zzyzx-0.11
BLOCK 0.1, 0.21, 0.11
DEL 1

MATERIAL hose_mat

ADD 0, hth/2+0.03, a/2-0.045
ROTX 90
PRISM_ 7, hth+0.06,
a/2-0.045, 0, 79,
0, 1, 800,
-a/2+0.045, 0, 1079,
a/2-0.045+0.008, 0, 1079,
a/2+0.045-0.02, zzyzx-a/2+0.045-0.11, 15,
a/2+0.045-0.08, zzyzx-a/2+0.045-0.11, 15,
a/2-0.045, 0, -1
DEL 2

ENDIF


IF gs_detlevel_3D_m=2 THEN

!! Detailed 3D !!

MATERIAL rack_mat

ADDZ a/2-0.045
ROTX 90

ADDZ -hth/2-0.03
CYLIND 0.005, 0.04
DEL 1


FOR HL=1 TO 2

ADDZ hth/2
CYLIND 0.02, 0.125
DEL 1

ADDZ hth/2+0.02
CYLIND 0.005, 0.085
DEL 1

ADDZ hth/2+0.01
PRISM_ 10, 0.01,
a/2-0.045, 0, 79,
0, 1, 800,
-a/2+0.045, 0, 1079,
a/2-0.045, 0, 1079,
a/2-0.045, 0, -1,

a/2-0.045-0.006, 0, 79,
0, 1, 800,
-a/2+0.045+0.006, 0, 1079,
a/2-0.045-0.006, 0, 1079,
a/2-0.045-0.006, 0, -1
DEL 1

FOR HI=1 TO gs_resol
ROTZ 180/gs_resol
ADD 0, (a/2-0.045-0.006)*COS(180/gs_resol), 0
CUTPLANE 1, 0, 1
DEL 2
ROTZ 360/gs_resol
NEXT HI
DEL gs_resol

CUTPOLYA 4, 1, 0,
0.125, 0, 15,
0, 1, 800,
-0.125, 0, 1015,
0.125, 0, 1015

FOR HK=1 TO 8
ADD -0.0015, 0, hth/2+0.012
BLOCK 0.003, a/2-0.045, 0.008
DEL 1
ROTZ 45
NEXT HK
DEL 8

FOR HJ=1 TO gs_resol+1
CUTEND
NEXT HJ

MULZ -1
NEXT HL
DEL 2


!! Cantilever !!

ROTX -90
CUTPOLY 6,
-a, -hth/2-0.025,
a/2-0.045+0.02, -hth/2-0.025,
a/2-0.045+0.02, hth/2+0.025,
a, hth/2+0.025,
a, 1,
-a, 1
DEL 1

ADDZ -hth/2-0.03
PRISM_ 31, hth+0.06,
0.029941, -0.026524, 15,
0.340802+(a-0.74)/2, -0.206-(a-0.74)/2*TAN(30), 15,
0.379+(a-0.74)/2, -0.206-(a-0.74)/2*TAN(30), 15,
0.379+(a-0.74)/2, -0.19-(a-0.74)/2*TAN(30), 15,
0.34509+(a-0.74)/2, -0.19-(a-0.74)/2*TAN(30), 15,
0.037941, -0.012668, 15,
0.04, -0.0, 79,
0.037941, 0.012668, 15,
0.34509+(a-0.74)/2, 0.19+(a-0.74)/2*TAN(30), 15,
0.379+(a-0.74)/2, 0.19+(a-0.74)/2*TAN(30), 15,
0.379+(a-0.74)/2, 0.206+(a-0.74)/2*TAN(30), 15,
0.340802+(a-0.74)/2, 0.206+(a-0.74)/2*TAN(30), 15,
0.029941, 0.026524, 15,
0.021831, 0.033517, 79,
0.012157, 0.038108, 79,
0.001611, 0.039968, 79,
-0.009050, 0.038963, 79,
-0.019062, 0.035166, 79,
-0.027709, 0.028848, 79,
-0.034369, 0.020463, 79,
-0.038567, 0.010612, 79,
-0.04, 0, 79,
-0.038567, -0.010612, 79,
-0.034369, -0.020463, 79,
-0.027709, -0.028848, 79,
-0.019062, -0.035166, 79,
-0.009050, -0.038963, 79,
0.001611, -0.039968, 79,
0.012157, -0.038108, 79,
0.021831, -0.033517, 79,
0.029941, -0.026524, -1
DEL 1

CUTEND

ADDZ -hth/2-0.03
PRISM_ 5, 0.005,
a/2-0.045+0.09-0.07, -0.19-(a-0.74)/2*TAN(30)-0.085, 15,
a/2-0.045+0.09-0.03, -0.19-(a-0.74)/2*TAN(30)-0.085, 15,
a/2-0.045+0.09-0.03, -0.19-(a-0.74)/2*TAN(30)-0.085+0.1, 15,
a/2-0.045+0.09-0.07, -0.19-(a-0.74)/2*TAN(30)-0.085+0.1, 15,
a/2-0.045+0.09-0.07, -0.19-(a-0.74)/2*TAN(30)-0.085, -1
DEL 1

ADDZ -hth/2-0.03
PRISM_ 5, 0.005,
a/2-0.045+0.09-0.07, 0.206+(a-0.74)/2*TAN(30)-0.085, 15,
a/2-0.045+0.09-0.03, 0.206+(a-0.74)/2*TAN(30)-0.085, 15,
a/2-0.045+0.09-0.03, 0.206+(a-0.74)/2*TAN(30)-0.085+0.1, 15,
a/2-0.045+0.09-0.07, 0.206+(a-0.74)/2*TAN(30)-0.085+0.1, 15,
a/2-0.045+0.09-0.07, 0.206+(a-0.74)/2*TAN(30)-0.085, -1
DEL 1

DEL 2



!! Connection !!
ADD a/2+0.045-0.05, 0.05, 0
ROTZ -90

ADDZ zzyzx-0.05
RESOL gs_resol*2
REVOLVE 11, 360, 1+2+4+8+16+32,
0.21, 0.005, 0,
0.16, 0.005, 0,
0.16, 0.027, 0,
0.15, 0.027, 0,
0.15, 0.025, 0,
0.1499, 0.025, 1,
-1, 0, 800,
0.09, 0.05, 1000,
0.08, 0.05, 0,
0.08, 0.04, 0,
0.02, 0.04, 0

RESOL gs_resol
REVOLVE 4, 360, 1+2+4+8+16+32,
0.21, 0.045, 1,
0, 1, 800,
0.2, 0.045, 1001,
0.21, 0.045, 1001

ROTY 90
CUTPOLYA 4, 1, 0,
0.005, 0, 15,
0, 1, 800,
-0.005, 0, 1015,
0.005, 0, 1015
DEL 1



FOR HI=1 TO gs_resol

IF gs_resol/4-INT(gs_resol/4)=0 THEN rk=1
ROTX 180/gs_resol*rk
ADD 0.205, 0, 0.045*COS(180/gs_resol)
ROTX 90
MULY COS(180/gs_resol)
CUTPOLYA 4, 1, 0,
0.005, 0, 79,
0, 1, 800,
-0.005, 0, 1079,
0.005, 0, 1079
DEL 4

ROTX 360/gs_resol
NEXT HI
DEL gs_resol

FOR HJ=1 TO 2
ROTX 45
ADD 0.205-0.004, -0.0015, -0.045*COS(180/gs_resol)
BLOCK 0.008, 0.003, 0.09*COS(180/gs_resol)
DEL 2
ROTX 90
NEXT HJ
DEL 2

FOR HI=1 TO gs_resol
CUTEND
NEXT HI


CUTEND

RESOL 6
REVOLVE 2, 360, 1+2+4+8+16+32+64,
0.02, 0.05, 0,
0, 0.05, 0
DEL 1

RESOL gs_resol*2
ADDZ zzyzx-0.05
ROTY 90
CUTPOLYA 4, 1, 0,
0.04, 0, 79,
0, 1, 800,
-0.04, 0, 1079,
0.04, 0, 1079
DEL 2

ADD 0.05, 0, zzyzx-0.11
CYLIND 0.06, 0.03
DEL 1

CUTEND

DEL 2

!! End of connection !!


!! Reel !!

!! Hose !!

RESOL gs_resol
MATERIAL squirt_mat

ADD a/2+0.045-0.05, 0, zzyzx-0.14
CYLIND 0.03, 0.05
DEL 1

ADD a/2+0.045-0.05, 0, zzyzx-0.17
CYLIND 0.03, 0.035
DEL 1


MATERIAL hose_mat

ADD a/2-0.045+0.09-0.082, 0, zzyzx-0.17
ROTZ -90
RULED 17, 16,
0.006243, 0.000615, 1,
0.017778, 0.005393, 1,
0.026607, 0.014222, 1,
0.031385, 0.025757, 1,
0.031385, 0.038243, 1,
0.026607, 0.049778, 1,
0.017778, 0.058607, 1,
0.006243, 0.063385, 1,
-0.006243, 0.063385, 1,
-0.017778, 0.058607, 1,
-0.026607, 0.049778, 1,
-0.031385, 0.038243, 1,
-0.031385, 0.025757, 1,
-0.026607, 0.014222, 1,
-0.017778, 0.005393, 1,
-0.006243, 0.000615, 1,
0.006243, 0.000615, 1,

0.006243, 0, -0.13,
0.017778, 0, -0.13,
hth/2, 0, -0.13,
hth/2, 0, -0.13,
hth/2, 0.0082, -0.13,
hth/2, 0.0082, -0.13,
0.017778, 0.0082, -0.13,
0.006243, 0.0082, -0.13,
-0.006243, 0.0082, -0.13,
-0.017778, 0.0082, -0.13,
-hth/2, 0.0082, -0.13,
-hth/2, 0.0082, -0.13,
-hth/2, 0, -0.13,
-hth/2, 0, -0.13,
-0.017778, 0, -0.13,
-0.006243, 0, -0.13,
0.006243, 0, -0.13
DEL 2


ADDZ a/2-0.045
ROTX 90

szi=70
fi=15
ADDZ -hth/2
PRISM_ 14, hth,
-(a/2-0.045)+0.055, 0, 79,
0, -1, 800,
(a/2-0.045)-0.055, 0, 1079,
a/2-0.045+0.1, -fi, 2079,
a/2-0.045+0.09-0.0738, zzyzx-0.3-(a/2-0.045), 8,
a/2-0.045+0.09-0.082, zzyzx-0.3-(a/2-0.045), 13,
a-0.09+0.045-(a/2-0.045+0.108)*COS(fi), (a/2-0.045+0.108)*SIN(fi), 79,
-1, -TAN(90-fi), 800,
(a/2-0.045)-0.055-0.008, 0, 1079,
0, 1, 800,
-((a/2-0.045)-0.055)*SIN(90-szi), ((a/2-0.045)-0.055)*SIN(szi), 1008,
-((a/2-0.045)-0.055-0.008)*COS(szi), ((a/2-0.045)-0.055-0.008)*SIN(szi), 79,
-1, -TAN(90-szi), 800,
-(a/2-0.045)+0.055, 0, 1079
DEL 1


ADD -((a/2-0.045)-0.055-0.008)*COS(szi),
((a/2-0.045)-0.055-0.008)*SIN(szi), 0

ROTZ 90-szi
ADD -0.1, hth/2, 0

ROTY -90
RULED 17, 16,
0.003902, -0.019616, 1,
0.011111, -0.016629, 1,
0.016629, -0.011111, 1,
0.019616, -0.003902, 1,
0.019616, 0.003902, 1,
0.016629, 0.011111, 1,
0.011111, 0.016629, 1,
0.003902, 0.019616, 1,
-0.003902, 0.019616, 1,
-0.011111, 0.016629, 1,
-0.016629, 0.011111, 1,
-0.019616, 0.003902, 1,
-0.019616, -0.003902, 1,
-0.016629, -0.011111, 1,
-0.011111, -0.016629, 1,
-0.003902, -0.019616, 1,
0.003902, -0.019616, -1,

0.003902, -hth/2, -0.1,
0.011111, -hth/2, -0.1,
0.016629, -hth/2, -0.1,
hth/2, -hth/2, -0.1,
hth/2, -hth/2+0.008, -0.1,
0.016629, -hth/2+0.008, -0.1,
0.011111, -hth/2+0.008, -0.1,
0.003902, -hth/2+0.008, -0.1,
-0.003902, -hth/2+0.008, -0.1,
-0.011111, -hth/2+0.008, -0.1,
-0.016629, -hth/2+0.008, -0.1,
-hth/2, -hth/2+0.008, -0.1,
-hth/2, -hth/2, -0.1,
-0.016629, -hth/2, -0.1,
-0.011111, -hth/2, -0.1,
-0.003902, -hth/2, -0.1,
0.003902, -hth/2, -0.1
DEL 4



MATERIAL squirt_mat

ADD -((a/2-0.045)-0.055-0.008)*COS(szi),
((a/2-0.045)-0.055-0.008)*SIN(szi), 0
ROTZ 90-szi
ADD 0, 0.02, 0
ROTY -90

ADD 0, 0, 0.1
CYLIND 0.03, 0.022
DEL 1

ADD 0, 0, 0.13
CYLIND 0.03, 0.0275
DEL 1

ADD 0, 0, 0.16
CYLIND 0.1, 0.02
DEL 1

ADD 0, 0, 0.26
CONE 0.03, 0.02, 0.0275, 90, 90
DEL 1

DEL 4

DEL 2

ENDIF

DEL 1

END
3 ANTWORTEN 3
bjoern1
Newcomer
Und zwar soll oben der Zusperrhahn weiter nach innen rücken, sodass das ganze Model nur noch 16 cm breit ist.
poeik
Virtuoso
Da du (wie ich auch) keine grosse Ahnung hast von GDL, kann ich dir nur raten: lass es sein. Der Zusperrhahn ist in einem verknüpften Makro namens MEP_m_ConnectionsACL_4 und wird auch in anderen Objekten verwendet. Das 3D-Script des Makros ist für mich absolut unverständlich.

Gruss, poeik
ArchiCAD CHE 5 - 27 - Windows 10
bjoern1
Newcomer
Ja, ich lasse es auch sein, werde es mittels 2D Strichen vollenden ,-))