rendered paste body// Persistence of Vision Ray Tracer Include File// File: bricks.inc// Vers: 3.6// Desc: LEGO Parts// Auth: Nicolas Alvarez// Last mod: 21-6-2005#ifdef(View_POV_Include_Stack) #debug " Bricks\n"#end//------------------------------------------AddPart("3005 Brick 1 x 1")#declare p3005=Join(){ difference { bBrick(1,1) object { stdSmallHole } } object { stdTop }}AddPart("3004 Brick 1 x 2")#declare p3004=Join(){ difference { bBrick(2,1) Studs(stdSmallHole, 2, 1) } Studs(stdTop, 2, 1) object { stdBottomThin }}AddPart("3622 Brick 1 x 3")#declare p3622=Join(){ difference { bBrick(3,1) Studs(stdSmallHole, 3, 1) } Studs(stdTop, 3, 1) Studs(stdBottomThin,2,1)}AddPart("3010 Brick 1 x 4")#declare p3010=Join(){ difference { bBrick(4,1) Studs(stdSmallHole, 4, 1) } Studs(stdTop, 4, 1) Studs(stdBottomThin,3,1)}AddPart("3009 Brick 1 x 6")#declare p3009=Join(){ difference { bBrick(6,1) Studs(stdSmallHole, 6, 1) } Studs(stdTop, 6, 1) Studs(stdBottomThin,5,1)}AddPart("3008 Brick 1 x 8")#declare p3008=Join(){ difference { bBrick(8,1) Studs(stdSmallHole, 8, 1) } Studs(stdTop, 8, 1) Studs(stdBottomThin,7,1)}AddPart("3003 Brick 2 x 2")#declare p3003=Join(){ difference { bBrick(2,2) Studs(stdSmallHole, 2, 2) } Studs(stdTop, 2, 2) object { stdBottomOpen }}AddPart("3002 Brick 2 x 3")#declare p3002=Join(){ difference { bBrick(3,2) Studs(stdSmallHole, 3, 2) } Studs(stdTop, 3, 2) Studs(stdBottomOpen, 2, 1)}AddPart("3001 Brick 2 x 4")#declare p3001=Join(){ difference { bBrick(4,2) Studs(stdSmallHole, 4, 2) } Studs(stdTop, 4, 2) Studs(stdBottomOpen, 3, 1) object { Div1 }}AddPart("2456 Brick 2 x 6")#declare p2456=Join(){ difference { bBrick(6,2) Studs(stdSmallHole, 6, 2) } Studs(stdTop, 6, 2) Studs(stdBottomOpen, 5, 1) object { Div1 translate -x*5 } object { Div1 translate x*5 }}AddPart("3007 Brick 2 x 8")#declare p3007=Join(){ difference { bBrick(8,2) Studs(stdSmallHole, 8, 2) } Studs(stdTop, 8, 2) Studs(stdBottomOpen, 7, 1) object { Div1 } object { Div1 translate -x*10 } object { Div1 translate x*10 }}AddPart("3006 Brick 2 x 10")#declare p3006=Join(){ difference { bBrick(10,2) Studs(stdSmallHole, 10, 2) } Studs(stdTop, 10, 2) Studs(stdBottomOpen, 9, 1) //!important: Check if Div1 is needed for this part}AddPart("2357 Brick 2 x 2 Corner")#declare p2357=Join(){ difference { difference { object { aBrick(2,2) } object { aBrick(1,1) Tb(0.5,1e-5,0.5) scale 1.001 } } object { hBrick(2,1) Tb(0,0,-0.5) } object { hBrick(1,2) Tb(-0.5,0,0) scale 1+1e-5 } StudsV(stdSmallHole, 2, 2,array[1]{<1,1>}) } StudsV(stdTop, 2, 2,array[1]{<1,1>}) Join() { object{stdBottomThin} box { <-2,-0.1,-0.05> < 2,-4.0, 0.05> } Tb(-0.5,0,0) } Join() { object{stdBottomThin} box { <-0.05,-0.1,-2> < 0.05,-4.0, 2> } Tb(0,0,-0.5) } Tb(0.5,0,0.5)}AddPart("3065 Brick 1 x 2 without Centre Studs")#declare p3065=Join(){ difference { bBrick(2,1) Studs(stdSmallHole, 2, 1) } Studs(stdTop, 2, 1)}AddPart("3067 Brick 1 x 6 without Centre Studs")#declare p3067=Join(){ difference { bBrick(6,1) Studs(stdSmallHole, 6, 1) } Studs(stdTop, 6, 1)}AddPart("3040 Slope Brick 45 2 x 1")#local unnamed1=plane { y,0 rotate -x*45 }#declare p3040=Join(){ difference { intersection { aBrick(1,2) object { unnamed1 translate <0,-Brk.y+1,-Plt.z> } } intersection { hBrick(1,2) object { unnamed1 translate <0,-Brk.y+1,-Plt.z+1> } } object{stdSmallHole translate Brk*z/2} } object{stdTop translate Brk*z/2} intersection { object{stdBottomThin} object { unnamed1 translate <0,-Brk.y+1,-Plt.z+1> } } translate -Brk*z/2}