To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 9132
9131  |  9133
Special: 
[DAT] (requires LDraw-compatible viewer)
Subject: 
(LDS): Make Your on Classic Window Variant!
Newsgroups: 
lugnet.cad
Date: 
Sun, 5 Jan 2003 01:18:53 GMT
Viewed: 
687 times
  
Here's an LDraw script to use if you wish to make a very specific Classic
Window.
By setting the variables, you can decide:
* Thin or thick walls
* Long or short ledge
* With or without glass
* Solid or slotted bottom pins.
See http://home.swipnet.se/simlego/pix/compare3.jpg
You can also set w and h (width and height) to custom values. I love the
look of the non-existing 3x1x1 window. Dear LEGO, please make them... :o)


You'll also need:
The two new bottom pin primitives:
http://news.lugnet.com/cad/dat/parts/primitives/?n=320
http://news.lugnet.com/cad/dat/parts/primitives/?n=321
LDraw Script Compiler (DOS):
http://home.swipnet.se/~w-20413/lds/lds.htm
LDS Shell by Anders Isaksson is also very good to have:
http://user.tninet.se/~hbh828t/dat/ldsshell.zip

w=3
h=2
g=1
' g=1: with glass
' g=0: without glass
o=1
' o=0: no holes on top
' o=1: holes on top
z=-12.5
'z=-10
' z=-12.5: long ledge (older)
' z=-10: ledge cut off (to fit shutters; newer)
a=1
' a=0: thin walls (newer)
' a=1: thick walls (older)
t=0
' t=0: solid pins (older)
' t=1: slotted pins (newer)
if h>1 then g=1
if w<2 then o=0
if g=1 then
? "0 Window  1 x " w " x " h
else
? "0 Window Classic  1 x " w " x " h " without Glass"
end if
' Correct the spaces in .dat file if needed
0 Name: win.dat
' Rename .dat file!
if o=1 then
0 with Holes
else
0 without Holes
end if
0 Author: Tore Eriksson
0 Unofficial Part

x=w*10
y=h*24
z99=-7
for i=4-x to x step 20
2 24 i y -6  i+12 y -6
next i
if w<2 then t=-1
if  t=0 then
for i=20-x to x-20 step 20
  1 16  i y 0  1 0 0  0 1 0  0 0 1  pin1.dat
next i
end if
if t=1 then
for i=20-x to x-20 step 20
  1 16  i y 0  1 0 0  0 1 0  0 0 1  pin2.dat
next i
end if
p1  x y z
p2  x y-1.25 z
p3  x y-6 z99
p4  x 0 z99
p5  x 0 10
p6  x y 10
p8 p4
if h>1 then
p4  x 2 z99
p7  x 2 -10
p8  x 0 -10
end if
if a=1 then
' plain version (old)
p11  x-4 y -6
p12  x11 y-6 -6
p13  x11 y-6 -5
p14  x11 4 -5
p14  x11 3 -5
p15  x11 4 10
p15  x11 3 10
p16  x11 y 10
' /plain version (old)
end if
if a=0 then
p11  x-4 y -6
p12  x11 y-6 -6
p13  x11 y-6 -5
p14  x-3 y-6 -5
p15  x14 3 -5
p16  x14 3 10
p17  x14 y-6 10
p18  x11 y-6 10
p19  x11 y 10
end if
' inner frame
p21  x-5 y-9 -5
p22  x-5 5 -5
if h>1 then y22=7
p31  x21+2 y21+2 -10
p32  x22+2 y22-2 -10
p33  x31 y31 z99
p34  x32 y32 z33
p41  x21 y21 -10
p42  x22 y22 -10
'
'
'
if z<>-10 then y2=y1
if z=-10 then 2 24  p1 p2
for i=1 to 46
p(i+50) 0-x(i) y(i) z(i)
next i
'
mirror x
line
p2
p3
p4
line end
if h>1 then
line
p4
p7
p8
line end
end if
'
line
p8
p5
p6
p1
line end
if a=1 then
' plain version (old)
line
p16
p11
p12
p13
p14
p15
p16
p6
line end
' /plain version (old)
' /not plain version (old)
else
line
p19
p11
p12
p13
p14
p17
p18
p19
p6
line end
line
p14
p15
p16
p17
line end
2 24  p13 p18
'
' /not plain version (old)
end if
mirror off
'ACROSS
2 24  p1 p51
2 24  p3 p53
2 24  p4 p54
2 24  p5 p55
if h>1 then
2 24  p7 p57
2 24  p8 p58
end if
if a=1 then
' plain version (old)
2 24  p14 p64
' /plain version (old)
else
2 24  p16 p66
' /not plain version (old)
end if
2 24  p12 p62
2 24  p13 p63
2 24  p15 p65
'
if z=-10 then
2 24  p2 p52
4 16  p1 p2 p52 p51
4 16  p1 p6 p3 p2
4 16  p51 p52 p53 p56
else
3 16  p1 p6 p3
3 16  p51 p53 p56
end if
'
'POS
4 16  p3 p6 p5 p4
if h>1 then
4 16  p4 p5 p8 p7
end if
if a=1 then
' plain version (old)
4 16  p11 p12 p13 p16
4 16  p13 p14 p15 p16
4 16  p1 p11 p16 p6
4 16  p5 p6 p16 p15
' /plain version (old)
else
4 16  p11 p12 p18 p19
4 16  p13 p14 p17 p18
4 16  p14 p15 p16 p17
4 16  p1 p11 p19 p6
4 16  p6 p19 p18 p17
4 16  p6 p17 p16 p5

end if
'NEG
4 16  p53 p54 p55 p56
'
if h>1 then
4 16  p54 p57 p58 p55
end if
if a=1 then
' plain version (old)
4 16  p51 p56 p66 p61
4 16  p55 p65 p66 p56
4 16  p61 p66 p63 p62
4 16  p63 p66 p65 p64
' /plain version (old)
else
4 16  p61 p69 p68 p62
4 16  p63 p68 p67 p64
4 16  p64 p67 p66 p65
4 16  p51 p56 p69 p61
4 16  p56 p67 p68 p69
4 16  p56 p55 p66 p67
end if
'ACROSS
4 16  p2 p3 p53 p52
4 16  p1 p51 p61 p11
4 16  p12 p62 p63 p13
4 16  p11 p61 p62 p12
if h>1 then
4 16  p4 p7 p57 p54
4 16  p7 p8 p58 p57
end if
'if a=1 then
'' plain version (old)
'4 14  p14 p64 p65 p15
'4 16  p5 p15 p65 p55
'' /plain version (old)
'else
'4 13  p15 p65 p66 p16
'4 16  p5 p16 p66 p55
'end if
'
0 inner frame
'line
' p21
' p22
' p72
' p71
' p21
'line end
'2 24  p21 p41
'2 24  p22 p42
'2 24  p71 p91
'2 24  p72 p92
'line
' p41
' p42
' p92
' p91
' p41
'line end
1 16  0 (y21+y22)/2 -10  x21 0 0  0 0 (y21-y22)/2  0 5 0  box4.dat
if a=0 then
p13 p14
p14 p15
p63 p64
p64 p65
end if
4 16  p13 p21  p22 p14
4 16  p63 p64  p72 p71
4 16  p13 p63 p71 p21
4 16  p14 p22 p72 p64
'2 24  0 14 0 p15
0 outer frame
1 16  0 (y31+y32)/2 -10  0-x31 0 0  0 0 (y31-y32)/2  0 3 0  box4.dat
0 front frame
4 16  p31 p32 p42 p41
4 16  p81 p91 p92 p82
4 16  p31 p41 p91 p81
4 16  p32 p82 p92 p42
4 16  p3 p4 p34 p33
4 16  p53 p83 p84 p54
4 16  p3 p33 p83 p53
4 16  p4 p54 p84 p34
'end
for i=10-x to x-10 step 20
stud2.dat i 0 0
next i
if g=1 then
0 glass
'1 47 0 ((y-7)+y32)/2 -4  x13 0 0  0 0 ((y-7)-y32)/2  0 -1 0  box.dat
1 47 0 ((y-7)+y14)/2 -4  x13 0 0  0 0 ((y-7)-y14)/2  0 -1 0  box.dat
'1 16  0 (y31+y32)/2 -10  0-x31 0 0  0 0 (y31-y32)/2  0 3 0  box4.dat
end if
p4 p8
p54 p58
'
'
if a=0 then
p15 p16
p65 p66
end if
4 16  p5 p15 p65 p55


if w>2 then o=o*2
if o=0 then
4 16  p4 p5 p55 p54
4 16  p14 p64 p65 p15
end if
if o=1 then
1 16  0 0 -4  1 0 0  0 1 0  0 0 1  4-4edge.dat
1 16  0 0 -4  1 0 0  0 1 0  0 0 1  4-4ndis.dat
1 16  0 y14 -4  1 0 0  0 1 0  0 0 1  4-4edge.dat
1 16  0 y14 -4  1 0 0  0 1 0  0 0 1  4-4ndis.dat
1 16  0 y14 -4  1 0 0  0 0-y14 0  0 0 1  4-4cyli.dat
4 16  p4 p5  1 0 -3  1 0 -5
4 16  p54 -1 0 -5  -1 0 -3  p55
4 16  p4 1 0 -5  -1 0 -5  p54
4 16  p5 p55  -1 0 -3  1 0 -3
4 16  p14  1 y14 -5  1 y14 -3  p15
4 16  p64 p65 -1 y14 -3  -1 y14 -5
4 16  p15  1 y14 -3  -1 y14 -3  p65
end if
if o=2 then
1 16  x-20 0 -4  1 0 0  0 1 0  0 0 1  4-4edge.dat
1 16  x-20 0 -4  1 0 0  0 1 0  0 0 1  4-4ndis.dat
1 16  x-20 y14 -4  1 0 0  0 1 0  0 0 1  4-4edge.dat
1 16  x-20 y14 -4  -1 0 0  0 1 0  0 0 1  4-4ndis.dat
1 16  x-20 y14 -4  1 0 0  0 0-y14 0  0 0 1  4-4cyli.dat
1 16  20-x 0 -4  1 0 0  0 1 0  0 0 1  4-4edge.dat
1 16  20-x 0 -4  1 0 0  0 1 0  0 0 1  4-4ndis.dat
1 16  20-x y14 -4  1 0 0  0 1 0  0 0 1  4-4edge.dat
1 16  20-x y14 -4  -1 0 0  0 1 0  0 0 1  4-4ndis.dat
1 16  20-x y14 -4  1 0 0  0 0-y14 0  0 0 1  4-4cyli.dat
4 16  p4 p5  x-19 0 -3  x-19 0 -5
4 16  p54 19-x 0 -5  19-x 0 -3  p55
4 16  p4 x-19 0 -5  19-x 0 -5  p54
4 16  p5 p55  19-x 0 -3  x-19 0 -3
4 16  21-x 0 -3  21-x 0 -5  x-21 0 -5  x-21 0 -3
4 16  p14  x-19 y14 -5  x-19 y14 -3  p15
4 16  p64 p65 19-x y14 -3  19-x y14 -5
4 16  p15  x-19 y14 -3  19-x y14 -3  p65
4 16  21-x y14 -3  x-21 y14 -3  x-21 y14 -5  21-x y14 -5
end if
g=g*o
? " 0 " g
if g=1 then
1 47  0 y14 -4  1 0 0  0 -1 0  0 0 1  4-8sphe.dat
end if
if g=2 then
1 47  20-x y14 -4  1 0 0  0 -1 0  0 0 1  4-8sphe.dat
1 47  x-20 y14 -4  1 0 0  0 -1 0  0 0 1  4-8sphe.dat
end if
0

end



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR