Usuario:
function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],\'A24\',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],\'A24\',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24\',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],\'A24\',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],\'A24\',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25',0]); data.push([1,[A012],[],'A012',0]); data.push([1,[A011],[],'A011',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25',0]); data.push([1,[A012],[],'A012',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25',0]); data.push([1,[A012],[],'A012',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],\'A25\',0]); data.push([1,[A012],[],\'A012\',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; } function setDesign(labels,floors,extern,data){ var s = 0.2; var d = 10*s; var h = 280*s; var l = 500*s; var L = l*Math.cos(Math.PI/6); var D = l*Math.sin(Math.PI/6); var H = 250*s; var y = 200*s; var A01 = [l/2,y+L,0], A02 = [-l/2,y+L,0], A03 = [-l/2-D,y+2*L,0], A04 = [-l/2,y+3*L,0], A05 = [l/2,y+3*L,0], A06 = [l/2+D,y+2*L,0]; var A11 = [l/2,y+L,h], A12 = [-l/2,y+L,h], A13 = [-l/2-D,y+2*L,h], A14 = [-l/2,y+3*L,h], A15 = [l/2,y+3*L,h], A16 = [l/2+D,y+2*L,h]; var A23 = [-l/2-D,y+2*L,h+H], A26 = [l/2+D,y+2*L,h+H], A24 = setCoord(getMean(A02,A04,0.5),2,h+H), A25 = setCoord(getMean(A01,A05,0.5),2,h+H); var A012 = getMean(A01,A02,1/3), A011 = getMean(A01,A02,2/3), A112 = getMean(A11,A12,1/3), A111 = getMean(A11,A12,2/3), A022 = getMean(A02,A03,1/3), A021 = getMean(A02,A03,2/3), A122 = getMean(A12,A13,1/3), A121 = getMean(A12,A13,2/3), A032 = getMean(A03,A04,1/3), A031 = getMean(A03,A04,2/3), A132 = getMean(A13,A14,1/3), A131 = getMean(A13,A14,2/3), A042 = getMean(A04,A05,1/3), A041 = getMean(A04,A05,2/3), A142 = getMean(A14,A15,1/3), A141 = getMean(A14,A15,2/3), A052 = getMean(A05,A06,1/3), A051 = getMean(A05,A06,2/3), A152 = getMean(A15,A16,1/3), A151 = getMean(A15,A16,2/3), A062 = getMean(A06,A01,1/3), A061 = getMean(A06,A01,2/3), A162 = getMean(A16,A11,1/3), A161 = getMean(A16,A11,2/3), A211 = getMean(A12,A23,1/3), A212 = getMean(A12,A23,2/3), A411 = getMean(A14,A23,1/3), A412 = getMean(A14,A23,2/3), A511 = getMean(A15,A26,1/3), A512 = getMean(A15,A26,2/3), A611 = getMean(A11,A26,1/3), A612 = getMean(A11,A26,2/3), A201 = getMean(A24,A25,1/2); if(labels == 1){ data.push([1,[A01],[],'A01',0]); data.push([1,[A02],[],'A02',0]); data.push([1,[A03],[],'A03',0]); data.push([1,[A04],[],'A04',0]); data.push([1,[A05],[],'A05',0]); data.push([1,[A06],[],'A06',0]); data.push([1,[A11],[],'A11',0]); data.push([1,[A12],[],'A12',0]); data.push([1,[A13],[],'A13',0]); data.push([1,[A14],[],'A14',0]); data.push([1,[A15],[],'A15',0]); data.push([1,[A16],[],'A16',0]); data.push([1,[A23],[],'A23',0]); data.push([1,[A26],[],'A26',0]); data.push([1,[A24],[],'A24',0]); data.push([1,[A25],[],'A25',0]); data.push([1,[A012],[],'A012',0]); data.push([1,[A011],[],\'A011\',0]); data.push([1,[A112],[],\'A112\',0]); data.push([1,[A111],[],\'A111\',0]); data.push([1,[A022],[],\'A022\',0]); data.push([1,[A021],[],\'A021\',0]); data.push([1,[A122],[],\'A122\',0]); data.push([1,[A121],[],\'A121\',0]); data.push([1,[A032],[],\'A032\',0]); data.push([1,[A031],[],\'A031\',0]); data.push([1,[A132],[],\'A132\',0]); data.push([1,[A131],[],\'A131\',0]); data.push([1,[A042],[],\'A042\',0]); data.push([1,[A041],[],\'A041\',0]); data.push([1,[A142],[],\'A142\',0]); data.push([1,[A141],[],\'A141\',0]); data.push([1,[A052],[],\'A052\',0]); data.push([1,[A051],[],\'A051\',0]); data.push([1,[A152],[],\'A152\',0]); data.push([1,[A151],[],\'A151\',0]); data.push([1,[A062],[],\'A062\',0]); data.push([1,[A061],[],\'A061\',0]); data.push([1,[A162],[],\'A162\',0]); data.push([1,[A161],[],\'A161\',0]); data.push([1,[A211],[],\'A211\',0]); data.push([1,[A212],[],\'A212\',0]); data.push([1,[A411],[],\'A411\',0]); data.push([1,[A412],[],\'A412\',0]); data.push([1,[A511],[],\'A511\',0]); data.push([1,[A512],[],\'A512\',0]); data.push([1,[A611],[],\'A611\',0]); data.push([1,[A612],[],\'A612\',0]); data.push([1,[A201],[],\'A201\',0]); } if(floors == 1 || extern == 1){ data.push([3,[A01,A02,A03],[],\'\',2]); data.push([3,[A03,A04,A05],[],\'\',2]); data.push([3,[A05,A06,A01],[],\'\',2]); data.push([3,[A01,A03,A05],[],\'\',2]); } if(extern == 1){ data.push([3,[A14,A24,A23],[],\'\',1]); data.push([3,[A14,A25,A24],[],\'\',1]); data.push([3,[A15,A25,A14],[],\'\',1]); data.push([3,[A15,A26,A25],[],\'\',1]); data.push([3,[A23,A24,A12],[],\'\',1]); data.push([3,[A24,A25,A11],[],\'\',1]); data.push([3,[A11,A12,A24],[],\'\',1]); data.push([3,[A25,A26,A11],[],\'\',1]); data.push([3,[A26,A15,A16],[],\'\',2]); data.push([3,[A23,A13,A14],[],\'\',2]); } var B01 = [-l/2-D,y,0], B02 = [-3*l/2-D,y,0], B03 = [-3*l/2-2*D,y+L,0], B04 = [-3*l/2-D,y+2*L,0]; var B11 = [-l/2-D,y,h], B12 = [-3*l/2-D,y,h], B13 = [-3*l/2-2*D,y+L,h], B14 = [-3*l/2-D,y+2*L,h]; var B22 = [-3*l/2-D,y,h+H], B23 = setCoord(getMean(B01,B03,0.5),2,h+H), B24 = setCoord(getMean(A02,B04,0.5),2,h+H); var B012 = getMean(A02,B01,1/3), B011 = getMean(A02,B01,2/3), B112 = getMean(A12,B11,1/3), B111 = getMean(A12,B11,2/3), B022 = getMean(B02,B03,1/3), B021 = getMean(B02,B03,2/3), B122 = getMean(B12,B13,1/3), B121 = getMean(B12,B13,2/3), B032 = getMean(B03,B04,1/3), B031 = getMean(B03,B04,2/3), B132 = getMean(B13,B14,1/3), B131 = getMean(B13,B14,2/3), B042 = getMean(B04,A03,1/3), B041 = getMean(B04,A03,2/3), B142 = getMean(B14,A13,1/3), B141 = getMean(B14,A13,2/3), B201 = getMean(B23,B24,1/3), B202 = getMean(B23,B24,2/3), B000 = getMean(B02,A03,1/2), B100 = getMean(B12,A13,1/2), B241 = getMean(B14,A23,1/3), B242 = getMean(B14,A23,2/3), B221 = getMean(B13,B22,1/3), B222 = getMean(B13,B22,2/3), B211 = getMean(B11,B22,1/3), B212 = getMean(B11,B22,2/3); if(labels == 1){ data.push([1,[B01],[],\'B01\',0]); data.push([1,[B02],[],\'B02\',0]); data.push([1,[B03],[],\'B03\',0]); data.push([1,[B04],[],\'B04\',0]); data.push([1,[B11],[],\'B11\',0]); data.push([1,[B12],[],\'B12\',0]); data.push([1,[B13],[],\'B13\',0]); data.push([1,[B14],[],\'B14\',0]); data.push([1,[B22],[],\'B22\',0]); data.push([1,[B23],[],\'B23\',0]); data.push([1,[B24],[],\'B24\',0]); data.push([1,[B012],[],\'B012\',0]); data.push([1,[B011],[],\'B011\',0]); data.push([1,[B112],[],\'B112\',0]); data.push([1,[B111],[],\'B111\',0]); data.push([1,[B022],[],\'B022\',0]); data.push([1,[B021],[],\'B021\',0]); data.push([1,[B122],[],\'B122\',0]); data.push([1,[B121],[],\'B121\',0]); data.push([1,[B032],[],\'B032\',0]); data.push([1,[B031],[],\'B031\',0]); data.push([1,[B132],[],\'B132\',0]); data.push([1,[B131],[],\'B131\',0]); data.push([1,[B042],[],\'B042\',0]); data.push([1,[B041],[],\'B041\',0]); data.push([1,[B142],[],\'B142\',0]); data.push([1,[B141],[],\'B141\',0]); data.push([1,[B201],[],\'B201\',0]); data.push([1,[B202],[],\'B202\',0]); data.push([1,[B000],[],\'B000\',0]); data.push([1,[B100],[],\'B100\',0]); data.push([1,[B241],[],\'B241\',0]); data.push([1,[B242],[],\'B242\',0]); data.push([1,[B221],[],\'B221\',0]); data.push([1,[B222],[],\'B222\',0]); data.push([1,[B211],[],\'B211\',0]); data.push([1,[B212],[],\'B212\',0]); } if(floors == 1 || extern == 1){ data.push([3,[B01,B02,B03],[],\'\',2]); data.push([3,[B03,B04,A03],[],\'\',2]); data.push([3,[A03,A02,B01],[],\'\',2]); data.push([3,[B01,B03,A03],[],\'\',2]); data.push([3,[B11,B12,B13],[],\'\',2]); data.push([3,[B13,B14,A13],[],\'\',2]); data.push([3,[A13,A12,B11],[],\'\',2]); data.push([3,[B11,B13,A13],[],\'\',2]); } if(extern == 1){ data.push([3,[B13,B23,B22],[],\'\',1]); data.push([3,[B13,B24,B23],[],\'\',1]); data.push([3,[B14,B24,B13],[],\'\',1]); data.push([3,[B14,A23,B24],[],\'\',1]); data.push([3,[B22,B23,B11],[],\'\',1]); data.push([3,[B23,B24,A12],[],\'\',1]); data.push([3,[A12,B11,B23],[],\'\',1]); data.push([3,[B24,A23,A12],[],\'\',1]); data.push([3,[A23,B14,A13],[],\'\',2]); data.push([3,[B22,B12,B13],[],\'\',2]); data.push([3,[B14,B13,B03],[],\'\',2]); data.push([3,[B03,B04,B14],[],\'\',2]); data.push([3,[B13,B12,B02],[],\'\',2]); data.push([3,[B02,B03,B13],[],\'\',2]); } var C01 = [l/2+D,y,0], C02 = [3*l/2+D,y,0], C03 = [3*l/2+2*D,y+L,0], C04 = [3*l/2+D,y+2*L,0]; var C11 = [l/2+D,y,h], C12 = [3*l/2+D,y,h], C13 = [3*l/2+2*D,y+L,h], C14 = [3*l/2+D,y+2*L,h]; var C22 = [3*l/2+D,y,h+H], C23 = setCoord(getMean(C01,C03,0.5),2,h+H), C24 = setCoord(getMean(A01,C04,0.5),2,h+H); var C012 = getMean(A01,C01,1/3), C011 = getMean(A01,C01,2/3), C112 = getMean(A11,C11,1/3), C111 = getMean(A11,C11,2/3), C022 = getMean(C01,C02,1/3), C021 = getMean(C01,C02,2/3), C122 = getMean(C11,C12,1/3), C121 = getMean(C11,C12,2/3), C032 = getMean(C02,C03,1/3), C031 = getMean(C02,C03,2/3), C132 = getMean(C12,C13,1/3), C131 = getMean(C12,C13,2/3), C042 = getMean(C03,C04,1/3), C041 = getMean(C03,C04,2/3), C142 = getMean(C13,C14,1/3), C141 = getMean(C13,C14,2/3), C052 = getMean(C04,A06,1/3), C051 = getMean(C04,A06,2/3), C152 = getMean(C14,A16,1/3), C151 = getMean(C14,A16,2/3), C201 = getMean(C23,C24,1/3), C202 = getMean(C23,C24,2/3), C000 = getMean(A06,C02,1/2), C100 = getMean(A16,C12,1/2), C221 = getMean(C11,C22,1/3), C222 = getMean(C11,C22,2/3), C321 = getMean(C13,C22,1/3), C322 = getMean(C13,C22,2/3), C521 = getMean(C14,A26,1/3), C522 = getMean(C14,A26,2/3); if(labels == 1){ data.push([1,[C01],[],\'C01\',0]); data.push([1,[C02],[],\'C02\',0]); data.push([1,[C03],[],\'C03\',0]); data.push([1,[C04],[],\'C04\',0]); data.push([1,[C11],[],\'C11\',0]); data.push([1,[C12],[],\'C12\',0]); data.push([1,[C13],[],\'C13\',0]); data.push([1,[C14],[],\'C14\',0]); data.push([1,[C22],[],\'C22\',0]); data.push([1,[C23],[],\'C23\',0]); data.push([1,[C24],[],\'C24\',0]); data.push([1,[C012],[],\'C012\',0]); data.push([1,[C011],[],\'C011\',0]); data.push([1,[C112],[],\'C112\',0]); data.push([1,[C111],[],\'C111\',0]); data.push([1,[C022],[],\'C022\',0]); data.push([1,[C021],[],\'C021\',0]); data.push([1,[C122],[],\'C122\',0]); data.push([1,[C121],[],\'C121\',0]); data.push([1,[C032],[],\'C032\',0]); data.push([1,[C031],[],\'C031\',0]); data.push([1,[C132],[],\'C132\',0]); data.push([1,[C131],[],\'C131\',0]); data.push([1,[C042],[],\'C042\',0]); data.push([1,[C041],[],\'C041\',0]); data.push([1,[C142],[],\'C142\',0]); data.push([1,[C141],[],\'C141\',0]); data.push([1,[C052],[],\'C052\',0]); data.push([1,[C051],[],\'C051\',0]); data.push([1,[C152],[],\'C152\',0]); data.push([1,[C151],[],\'C151\',0]); data.push([1,[C201],[],\'C201\',0]); data.push([1,[C202],[],\'C202\',0]); data.push([1,[C000],[],\'C000\',0]); data.push([1,[C100],[],\'C100\',0]); data.push([1,[C221],[],\'C221\',0]); data.push([1,[C222],[],\'C222\',0]); data.push([1,[C321],[],\'C321\',0]); data.push([1,[C322],[],\'C322\',0]); data.push([1,[C521],[],\'C521\',0]); data.push([1,[C522],[],\'C522\',0]); } if(floors == 1 || extern == 1){ data.push([3,[C03,C02,C01],[],\'\',2]); data.push([3,[A06,C04,C03],[],\'\',2]); data.push([3,[C01,A01,A06],[],\'\',2]); data.push([3,[A06,C03,C01],[],\'\',2]); data.push([3,[C13,C12,C11],[],\'\',2]); data.push([3,[A16,C14,C13],[],\'\',2]); data.push([3,[C11,A11,A16],[],\'\',2]); data.push([3,[A16,C13,C11],[],\'\',2]); } if(extern == 1){ data.push([3,[A26,C24,A11],[],\'\',1]); data.push([3,[C24,C23,C11],[],\'\',1]); data.push([3,[C11,A11,C24],[],\'\',1]); data.push([3,[C23,C22,C11],[],\'\',1]); data.push([3,[C14,C24,A26],[],\'\',1]); data.push([3,[C14,C23,C24],[],\'\',1]); data.push([3,[C13,C23,C14],[],\'\',1]); data.push([3,[C13,C22,C23],[],\'\',1]); data.push([3,[C14,A26,A16],[],\'\',2]); data.push([3,[C22,C13,C12],[],\'\',2]); data.push([3,[C22,C12,C11],[],\'\',2]); data.push([3,[A11,C11,A01],[],\'\',2]); data.push([3,[C11,C01,A01],[],\'\',2]); data.push([3,[C01,C11,C02],[],\'\',2]); data.push([3,[C11,C12,C02],[],\'\',2]); data.push([3,[C12,C13,C03],[],\'\',2]); data.push([3,[C02,C12,C03],[],\'\',2]); data.push([3,[C13,C14,C04],[],\'\',2]); data.push([3,[C04,C03,C13],[],\'\',2]); } var D01 = [-l/2,-L+y,0], D02 = [-l/2-D,-2*L+y,0], D03 = [-3*l/2-D,-2*L+y,0], D04 = [-3*l/2-2*D,-L+y,0]; var D11 = [-l/2,-L+y,h], D12 = [-l/2-D,-2*L+y,h], D13 = [-3*l/2-D,-2*L+y,h], D14 = [-3*l/2-2*D,-L+y,h]; var D22 = [-l/2-D,-2*L+y,h+H], D23 = setCoord(getMean(D01,D03,0.5),2,h+H), D24 = setCoord(getMean(B01,D04,0.5),2,h+H); var D012 = getMean(B01,D01,1/3), D011 = getMean(B01,D01,2/3), D112 = getMean(B11,D11,1/3), D111 = getMean(B11,D11,2/3), D022 = getMean(D01,D02,1/3), D021 = getMean(D01,D02,2/3), D122 = getMean(D11,D12,1/3), D121 = getMean(D11,D12,2/3), D032 = getMean(D02,D03,1/3), D031 = getMean(D02,D03,2/3), D132 = getMean(D12,D13,1/3), D131 = getMean(D12,D13,2/3), D042 = getMean(D03,D04,1/3), D041 = getMean(D03,D04,2/3), D142 = getMean(D13,D14,1/3), D141 = getMean(D13,D14,2/3), D052 = getMean(D04,B02,1/3), D051 = getMean(D04,B02,2/3), D152 = getMean(D14,B12,1/3), D151 = getMean(D14,B12,2/3), D062 = getMean(B01,B02,1/3), D061 = getMean(B01,B02,2/3), D162 = getMean(B11,B12,1/3), D161 = getMean(B11,B12,2/3), D201 = getMean(D23,D24,1/3), D202 = getMean(D23,D24,2/3), D000 = getMean(B02,D02,1/2), D100 = getMean(B12,D12,1/2), D251 = getMean(D14,B22,1/3), D252 = getMean(D14,B22,2/3), D231 = getMean(D13,D22,1/3), D232 = getMean(D13,D22,2/3), D221 = getMean(D11,D22,1/3), D222 = getMean(D11,D22,2/3); if(labels == 1){ data.push([1,[D01],[],\'D01\',0]); data.push([1,[D02],[],\'D02\',0]); data.push([1,[D03],[],\'D03\',0]); data.push([1,[D04],[],\'D04\',0]); data.push([1,[D11],[],\'D11\',0]); data.push([1,[D12],[],\'D12\',0]); data.push([1,[D13],[],\'D13\',0]); data.push([1,[D14],[],\'D14\',0]); data.push([1,[D22],[],\'D22\',0]); data.push([1,[D23],[],\'D23\',0]); data.push([1,[D24],[],\'D24\',0]); data.push([1,[D012],[],\'D012\',0]); data.push([1,[D011],[],\'D011\',0]); data.push([1,[D112],[],\'D112\',0]); data.push([1,[D111],[],\'D111\',0]); data.push([1,[D022],[],\'D022\',0]); data.push([1,[D021],[],\'D021\',0]); data.push([1,[D122],[],\'D122\',0]); data.push([1,[D121],[],\'D121\',0]); data.push([1,[D032],[],\'D032\',0]); data.push([1,[D031],[],\'D031\',0]); data.push([1,[D132],[],\'D132\',0]); data.push([1,[D131],[],\'D131\',0]); data.push([1,[D042],[],\'D042\',0]); data.push([1,[D041],[],\'D041\',0]); data.push([1,[D142],[],\'D142\',0]); data.push([1,[D141],[],\'D141\',0]); data.push([1,[D052],[],\'D052\',0]); data.push([1,[D051],[],\'D051\',0]); data.push([1,[D152],[],\'D152\',0]); data.push([1,[D151],[],\'D151\',0]); data.push([1,[D062],[],\'D062\',0]); data.push([1,[D061],[],\'D061\',0]); data.push([1,[D162],[],\'D162\',0]); data.push([1,[D161],[],\'D161\',0]); data.push([1,[D201],[],\'D201\',0]); data.push([1,[D202],[],\'D202\',0]); data.push([1,[D000],[],\'D000\',0]); data.push([1,[D100],[],\'D100\',0]); data.push([1,[D251],[],\'D251\',0]); data.push([1,[D252],[],\'D252\',0]); data.push([1,[D231],[],\'D231\',0]); data.push([1,[D232],[],\'D232\',0]); data.push([1,[D221],[],\'D221\',0]); data.push([1,[D222],[],\'D222\',0]); } if(floors == 1 || extern == 1){ data.push([3,[D01,D02,D03],[],\'\',2]); data.push([3,[D03,D04,B02],[],\'\',2]); data.push([3,[B02,B01,D01],[],\'\',2]); data.push([3,[D01,D03,B02],[],\'\',2]); data.push([3,[D11,D12,D13],[],\'\',2]); data.push([3,[D13,D14,B12],[],\'\',2]); data.push([3,[B12,B11,D11],[],\'\',2]); data.push([3,[D11,D13,B12],[],\'\',2]); } if(extern == 1){ data.push([3,[D22,D23,D11],[],\'\',1]); data.push([3,[D23,D24,B11],[],\'\',1]); data.push([3,[B11,D11,D23],[],\'\',1]); data.push([3,[D24,B22,B11],[],\'\',1]); data.push([3,[D13,D23,D22],[],\'\',1]); data.push([3,[D13,D24,D23],[],\'\',1]); data.push([3,[D14,D24,D13],[],\'\',1]); data.push([3,[D14,B22,D24],[],\'\',1]); data.push([3,[B22,D14,B12],[],\'\',2]); data.push([3,[D22,D12,D13],[],\'\',2]); data.push([3,[D11,D12,D22],[],\'\',2]); data.push([3,[D14,D04,B12],[],\'\',2]); data.push([3,[B12,D04,B02],[],\'\',2]); data.push([3,[D14,D13,D03],[],\'\',2]); data.push([3,[D03,D04,D14],[],\'\',2]); data.push([3,[D13,D12,D02],[],\'\',2]); data.push([3,[D02,D03,D13],[],\'\',2]); data.push([3,[D12,D11,D01],[],\'\',2]); data.push([3,[D01,D02,D12],[],\'\',2]); data.push([3,[D11,B11,B01],[],\'\',2]); data.push([3,[B01,D01,D11],[],\'\',2]); } // A base data.push([2,[A01,A02],[d,d],\'\',1]); data.push([2,[A02,A03],[d,d],\'\',1]); data.push([2,[A03,A04],[d,d],\'\',1]); data.push([2,[A04,A05],[d,d],\'\',1]); data.push([2,[A05,A06],[d,d],\'\',1]); data.push([2,[A06,A01],[d,d],\'\',1]); // A support data.push([2,[A01,A11],[d,d],\'\',1]); data.push([2,[A02,A12],[d,d],\'\',1]); data.push([2,[A03,A13],[d,d],\'\',1]); data.push([2,[A04,A14],[d,d],\'\',1]); data.push([2,[A05,A15],[d,d],\'\',1]); data.push([2,[A06,A16],[d,d],\'\',1]); // A hight data.push([2,[A11,A12],[d,d],\'\',1]); data.push([2,[A12,A13],[d,d],\'\',1]); data.push([2,[A13,A14],[d,d],\'\',1]); data.push([2,[A14,A15],[d,d],\'\',1]); data.push([2,[A15,A16],[d,d],\'\',1]); data.push([2,[A16,A11],[d,d],\'\',1]); // A roof data.push([2,[A13,A23],[d,d],\'\',1]); data.push([2,[A16,A26],[d,d],\'\',1]); data.push([2,[A23,A26],[d,d],\'\',1]); data.push([2,[A11,A26],[d,d],\'\',1]); data.push([2,[A15,A26],[d,d],\'\',1]); data.push([2,[A12,A23],[d,d],\'\',1]); data.push([2,[A14,A23],[d,d],\'\',1]); data.push([2,[A11,A25],[d,d],\'\',1]); data.push([2,[A15,A25],[d,d],\'\',1]); data.push([2,[A12,A24],[d,d],\'\',1]); data.push([2,[A14,A24],[d,d],\'\',1]); // A intern data.push([2,[A201,A14],[d,d],\'\',1]); data.push([2,[A201,A15],[d,d],\'\',1]); data.push([2,[A201,A11],[d,d],\'\',1]); data.push([2,[A201,A12],[d,d],\'\',1]); data.push([2,[A011,A111],[d,d],\'\',1]); data.push([2,[A012,A112],[d,d],\'\',1]); data.push([2,[A021,A121],[d,d],\'\',1]); data.push([2,[A022,A122],[d,d],\'\',1]); data.push([2,[A031,A131],[d,d],\'\',1]); data.push([2,[A032,A132],[d,d],\'\',1]); data.push([2,[A041,A141],[d,d],\'\',1]); data.push([2,[A042,A142],[d,d],\'\',1]); data.push([2,[A051,A151],[d,d],\'\',1]); data.push([2,[A052,A152],[d,d],\'\',1]); data.push([2,[A061,A161],[d,d],\'\',1]); data.push([2,[A062,A162],[d,d],\'\',1]); data.push([2,[A03,A06],[d,d],\'\',2]); data.push([2,[A04,A02],[d,d],\'\',2]); data.push([2,[A012,A041],[d,d],\'\',2]); data.push([2,[A011,A042],[d,d],\'\',2]); data.push([2,[A05,A01],[d,d],\'\',2]); data.push([2,[A021,A062],[d,d],\'\',2]); data.push([2,[A022,A061],[d,d],\'\',2]); data.push([2,[A031,A052],[d,d],\'\',2]); data.push([2,[A032,A051],[d,d],\'\',2]); data.push([2,[A151,A512],[d,d],\'\',1]); data.push([2,[A152,A511],[d,d],\'\',1]); data.push([2,[A131,A411],[d,d],\'\',1]); data.push([2,[A132,A412],[d,d],\'\',1]); data.push([2,[A121,A212],[d,d],\'\',1]); data.push([2,[A122,A211],[d,d],\'\',1]); data.push([2,[A161,A611],[d,d],\'\',1]); data.push([2,[A162,A612],[d,d],\'\',1]); data.push([2,[A411,A511],[d,d],\'\',1]); data.push([2,[A412,A512],[d,d],\'\',1]); data.push([2,[A211,A611],[d,d],\'\',1]); data.push([2,[A212,A612],[d,d],\'\',1]); // B base data.push([2,[A02,B01],[d,d],\'\',1]); data.push([2,[B01,B02],[d,d],\'\',1]); data.push([2,[B02,B03],[d,d],\'\',1]); data.push([2,[B03,B04],[d,d],\'\',1]); data.push([2,[B04,A03],[d,d],\'\',1]); // B support data.push([2,[B01,B11],[d,d],\'\',1]); data.push([2,[B02,B12],[d,d],\'\',1]); data.push([2,[B03,B13],[d,d],\'\',1]); data.push([2,[B04,B14],[d,d],\'\',1]); // B hight data.push([2,[A12,B11],[d,d],\'\',1]); data.push([2,[B11,B12],[d,d],\'\',1]); data.push([2,[B12,B13],[d,d],\'\',1]); data.push([2,[B13,B14],[d,d],\'\',1]); data.push([2,[B14,A13],[d,d],\'\',1]); // B roof data.push([2,[B12,B22],[d,d],\'\',1]); data.push([2,[A23,B22],[d,d],\'\',1]); data.push([2,[B11,B22],[d,d],\'\',1]); data.push([2,[B13,B22],[d,d],\'\',1]); data.push([2,[B11,B23],[d,d],\'\',1]); data.push([2,[B13,B23],[d,d],\'\',1]); data.push([2,[B14,B24],[d,d],\'\',1]); data.push([2,[A12,B24],[d,d],\'\',1]); data.push([2,[A23,B14],[d,d],\'\',1]); // B structure data.push([2,[B011,B111],[d,d],\'\',1]); data.push([2,[B012,B112],[d,d],\'\',1]); data.push([2,[B021,B121],[d,d],\'\',1]); data.push([2,[B022,B122],[d,d],\'\',1]); data.push([2,[B031,B131],[d,d],\'\',1]); data.push([2,[B032,B132],[d,d],\'\',1]); data.push([2,[B041,B141],[d,d],\'\',1]); data.push([2,[B042,B142],[d,d],\'\',1]); data.push([2,[B112,B202],[d,d],\'\',1]); data.push([2,[B131,B202],[d,d],\'\',1]); data.push([2,[B111,B201],[d,d],\'\',1]); data.push([2,[B132,B201],[d,d],\'\',1]); // B intern data.push([2,[A03,B02],[d,d],\'\',1]); data.push([2,[A13,B12],[d,d],\'\',1]); data.push([2,[B01,B03],[d,d],\'\',2]); data.push([2,[A02,B04],[d,d],\'\',2]); data.push([2,[B012,B031],[d,d],\'\',2]); data.push([2,[B011,B032],[d,d],\'\',2]); data.push([2,[B11,B13],[d,d],\'\',2]); data.push([2,[A12,B14],[d,d],\'\',2]); data.push([2,[B112,B131],[d,d],\'\',2]); data.push([2,[B111,B132],[d,d],\'\',2]); data.push([2,[D061,A021],[d,d],\'\',2]); data.push([2,[D062,A022],[d,d],\'\',2]); data.push([2,[B021,B042],[d,d],\'\',2]); data.push([2,[B022,B041],[d,d],\'\',2]); data.push([2,[D161,A121],[d,d],\'\',2]); data.push([2,[D162,A122],[d,d],\'\',2]); data.push([2,[B121,B142],[d,d],\'\',2]); data.push([2,[B122,B141],[d,d],\'\',2]); data.push([2,[B000,B100],[d,d],\'\',1]); data.push([2,[B141,B242],[d,d],\'\',1]); data.push([2,[B142,B241],[d,d],\'\',1]); data.push([2,[B121,B221],[d,d],\'\',1]); data.push([2,[B122,B222],[d,d],\'\',1]); data.push([2,[D162,B211],[d,d],\'\',1]); data.push([2,[D161,B212],[d,d],\'\',1]); data.push([2,[B221,B241],[d,d],\'\',1]); data.push([2,[B222,B242],[d,d],\'\',1]); data.push([2,[A211,B211],[d,d],\'\',1]); data.push([2,[A212,B212],[d,d],\'\',1]); // C base data.push([2,[A01,C01],[d,d],\'\',1]); data.push([2,[C01,C02],[d,d],\'\',1]); data.push([2,[C02,C03],[d,d],\'\',1]); data.push([2,[C03,C04],[d,d],\'\',1]); data.push([2,[C04,A06],[d,d],\'\',1]); // C support data.push([2,[C01,C11],[d,d],\'\',1]); data.push([2,[C02,C12],[d,d],\'\',1]); data.push([2,[C03,C13],[d,d],\'\',1]); data.push([2,[C04,C14],[d,d],\'\',1]); // C hight data.push([2,[A11,C11],[d,d],\'\',1]); data.push([2,[C11,C12],[d,d],\'\',1]); data.push([2,[C12,C13],[d,d],\'\',1]); data.push([2,[C13,C14],[d,d],\'\',1]); data.push([2,[C14,A16],[d,d],\'\',1]); // C roof data.push([2,[C12,C22],[d,d],\'\',1]); data.push([2,[A26,C22],[d,d],\'\',1]); data.push([2,[C11,C22],[d,d],\'\',1]); data.push([2,[C13,C22],[d,d],\'\',1]); data.push([2,[C11,C23],[d,d],\'\',1]); data.push([2,[C13,C23],[d,d],\'\',1]); data.push([2,[C14,C24],[d,d],\'\',1]); data.push([2,[A11,C24],[d,d],\'\',1]); data.push([2,[A26,C14],[d,d],\'\',1]); data.push([2,[C121,C222],[d,d],\'\',1]); data.push([2,[C122,C221],[d,d],\'\',1]); data.push([2,[C131,C321],[d,d],\'\',1]); data.push([2,[C132,C322],[d,d],\'\',1]); data.push([2,[C151,C522],[d,d],\'\',1]); data.push([2,[C152,C521],[d,d],\'\',1]); data.push([2,[A612,C222],[d,d],\'\',1]); data.push([2,[A611,C221],[d,d],\'\',1]); data.push([2,[C321,C521],[d,d],\'\',1]); data.push([2,[C322,C522],[d,d],\'\',1]); // C structure data.push([2,[C201,C111],[d,d],\'\',1]); data.push([2,[C201,C142],[d,d],\'\',1]); data.push([2,[C202,C112],[d,d],\'\',1]); data.push([2,[C202,C141],[d,d],\'\',1]); data.push([2,[C011,C111],[d,d],\'\',1]); data.push([2,[C012,C112],[d,d],\'\',1]); data.push([2,[C021,C121],[d,d],\'\',1]); data.push([2,[C022,C122],[d,d],\'\',1]); data.push([2,[C031,C131],[d,d],\'\',1]); data.push([2,[C032,C132],[d,d],\'\',1]); data.push([2,[C041,C141],[d,d],\'\',1]); data.push([2,[C042,C142],[d,d],\'\',1]); data.push([2,[C051,C151],[d,d],\'\',1]); data.push([2,[C052,C152],[d,d],\'\',1]); // C intern data.push([2,[C02,A06],[d,d],\'\',1]); data.push([2,[C12,A16],[d,d],\'\',1]); data.push([2,[A01,C04],[d,d],\'\',2]); data.push([2,[C011,C042],[d,d],\'\',2]); data.push([2,[C012,C041],[d,d],\'\',2]); data.push([2,[C03,C01],[d,d],\'\',2]); data.push([2,[A11,C14],[d,d],\'\',2]); data.push([2,[C111,C142],[d,d],\'\',2]); data.push([2,[C112,C141],[d,d],\'\',2]); data.push([2,[C13,C11],[d,d],\'\',2]); data.push([2,[A062,C021],[d,d],\'\',2]); data.push([2,[A061,C022],[d,d],\'\',2]); data.push([2,[C052,C031],[d,d],\'\',2]); data.push([2,[C051,C032],[d,d],\'\',2]); data.push([2,[A162,C121],[d,d],\'\',2]); data.push([2,[A161,C122],[d,d],\'\',2]); data.push([2,[C152,C131],[d,d],\'\',2]); data.push([2,[C151,C132],[d,d],\'\',2]); data.push([2,[C000,C100],[d,d],\'\',1]); // D base data.push([2,[B01,D01],[d,d],\'\',1]); data.push([2,[D01,D02],[d,d],\'\',1]); data.push([2,[D02,D03],[d,d],\'\',1]); data.push([2,[D03,D04],[d,d],\'\',1]); data.push([2,[D04,B02],[d,d],\'\',1]); // D support data.push([2,[D01,D11],[d,d],\'\',1]); data.push([2,[D02,D12],[d,d],\'\',1]); data.push([2,[D03,D13],[d,d],\'\',1]); data.push([2,[D04,D14],[d,d],\'\',1]); // D hight data.push([2,[B11,D11],[d,d],\'\',1]); data.push([2,[D11,D12],[d,d],\'\',1]); data.push([2,[D12,D13],[d,d],\'\',1]); data.push([2,[D13,D14],[d,d],\'\',1]); data.push([2,[D14,B12],[d,d],\'\',1]); // D roof data.push([2,[D12,D22],[d,d],\'\',1]); data.push([2,[D11,D22],[d,d],\'\',1]); data.push([2,[D13,D22],[d,d],\'\',1]); data.push([2,[D11,D23],[d,d],\'\',1]); data.push([2,[D13,D23],[d,d],\'\',1]); data.push([2,[D14,B22],[d,d],\'\',1]); data.push([2,[D14,D24],[d,d],\'\',1]); data.push([2,[B11,D24],[d,d],\'\',1]); data.push([2,[D22,B22],[d,d],\'\',1]); // D structure data.push([2,[D201,D111],[d,d],\'\',1]); data.push([2,[D201,D142],[d,d],\'\',1]); data.push([2,[D202,D112],[d,d],\'\',1]); data.push([2,[D202,D141],[d,d],\'\',1]); data.push([2,[D011,D111],[d,d],\'\',1]); data.push([2,[D012,D112],[d,d],\'\',1]); data.push([2,[D021,D121],[d,d],\'\',1]); data.push([2,[D022,D122],[d,d],\'\',1]); data.push([2,[D031,D131],[d,d],\'\',1]); data.push([2,[D032,D132],[d,d],\'\',1]); data.push([2,[D041,D141],[d,d],\'\',1]); data.push([2,[D042,D142],[d,d],\'\',1]); data.push([2,[D051,D151],[d,d],\'\',1]); data.push([2,[D052,D152],[d,d],\'\',1]); // D intern data.push([2,[D02,B02],[d,d],\'\',1]); data.push([2,[D12,B12],[d,d],\'\',1]); data.push([2,[D01,D03],[d,d],\'\',2]); data.push([2,[B01,D04],[d,d],\'\',2]); data.push([2,[D012,D041],[d,d],\'\',2]); data.push([2,[D011,D042],[d,d],\'\',2]); data.push([2,[D11,D13],[d,d],\'\',2]); data.push([2,[B11,D14],[d,d],\'\',2]); data.push([2,[D112,D141],[d,d],\'\',2]); data.push([2,[D111,D142],[d,d],\'\',2]); data.push([2,[D021,D061],[d,d],\'\',2]); data.push([2,[D022,D062],[d,d],\'\',2]); data.push([2,[D031,D052],[d,d],\'\',2]); data.push([2,[D032,D051],[d,d],\'\',2]); data.push([2,[D121,D161],[d,d],\'\',2]); data.push([2,[D122,D162],[d,d],\'\',2]); data.push([2,[D131,D152],[d,d],\'\',2]); data.push([2,[D132,D151],[d,d],\'\',2]); data.push([2,[D061,D161],[d,d],\'\',2]); data.push([2,[D062,D162],[d,d],\'\',2]); data.push([2,[D000,D100],[d,d],\'\',1]); data.push([2,[D151,D252],[d,d],\'\',1]); data.push([2,[D152,D251],[d,d],\'\',1]); data.push([2,[D131,D231],[d,d],\'\',1]); data.push([2,[D132,D232],[d,d],\'\',1]); data.push([2,[D121,D222],[d,d],\'\',1]); data.push([2,[D122,D221],[d,d],\'\',1]); data.push([2,[D231,D251],[d,d],\'\',1]); data.push([2,[D232,D252],[d,d],\'\',1]); data.push([2,[D221,B211],[d,d],\'\',1]); data.push([2,[D222,B212],[d,d],\'\',1]); return data; } function getMean(point_1, point_2, weight){ var mean = []; for(var i = 0;i < 3;i++){ mean.push(weight*point_1[i]+(1-weight)*point_2[i]); } return mean; } function setCoord(point,n,value){ point[n] = value; return point; }


Muralla de contención

Storyboard

En muchas ocasiones, se observan movimientos de tierra alrededor de una vivienda, lo que puede ocasionar la formación de laderas potencialmente inestables, necesitando así la instalación de muros de contención. En ciertos escenarios, el desafío no reside tanto en asegurar la estabilidad de dichas laderas, sino en proporcionar una solución que prevenga futuros desprendimientos, los cuales podrían dificultar el tránsito en áreas adyacentes.

>Modelo

ID:(112, 0)



Necesidad de contención

Concepto

>Top


En este caso, en el lado sur del terraplén, hay una ladera que se forma a partir de la creación de este, la cual fue modelada con un ángulo de pendiente de la pared desde la horizontal ($\alpha$) y contiene el suelo propio de la ladera, que tiene un ángulo de pendiente de relleno ($\beta$).



Con el objetivo de obtener un acabado más refinado y minimizar el deterioro progresivo de la ladera, se está considerando la construcción de una muralla de contención de una altura del muro ($H$) y la profundidad del muro ($d$).

ID:(733, 0)



Principio de la inestabilidad

Concepto

>Top


La pared de contención retiene el suelo que se encuentra con un ángulo superior a el ángulo de fricción entre el suelo y la pared. ($\varphi$) o ángulo de reposo, es decir, el ángulo bajo el cual el suelo reposa y no se desliza. Si se removiera la pared de contención, sería el segmento de suelo con el mayor ángulo el que se deslizaría:



La mecánica completa para contener el suelo se reduce a las medidas necesarias para retener el suelo que se deslizaría sin ella y que se encuentra entre el ángulo de fricción entre el suelo y la pared. ($\varphi$) y el ángulo de pendiente de la pared desde la horizontal ($\alpha$).

ID:(752, 0)



Fuerza activa por largo

Concepto

>Top


Sobre el elemento que puede deslizarse actúa una fuerza que llamaremos la fuerza activa por largo aplicada al muro ($f_A$). Esta fuerza tiene componentes la fuerza horizontal por largo del suelo aplicada al muro ($f_H$)

$ f_H = f_A \cos \varphi $



y la fuerza vertical por largo del suelo aplicada al muro ($f_V$) con

$ f_V = f_A \sin \varphi $



que son proyecciones en el ángulo de fricción entre el suelo y la pared. ($\varphi$):



Además, es necesario considerar el peso total del muro por largo ($w$), ya que contribuye a estabilizar la pared de contención.

Estas componentes pueden causar desplazamiento, hundimiento y vuelco de la pared de contención, lo que lleva a factores de seguridad que deben cumplirse para garantizar que el diseño sea estable.

ID:(753, 0)



Construcción de la muralla de contención

Concepto

>Top


Una forma sencilla de construir una pared de contención es utilizando ladrillos de una profundidad del muro ($d$) de longitud y que alcanzan una altura del muro ($H$) de altura:

Este tipo de pared se basa en su propio peso para retener eficazmente el suelo contenido por ella. Por lo tanto, la masa de la pared es crucial.

ID:(735, 0)



Alternativa de ladrillo

Concepto

>Top


Una alternativa son los bloques de concreto Graublock GST-20, que tienen una altura de 19 cm, un ancho de 39 cm y una profundidad de 19 cm.



Dado que el ángulo de la muralla sería de el ángulo de pendiente de la pared desde la horizontal ($\alpha$) de 60°, los bloques deben apilarse con un desfase de 11 cm.

Con una apertura de 12.6 cm de ancho, cada borde sobresaldría 3.2 cm, dejando una apertura de 7.8 cm donde se pueden plantar vegetación. Esta pared recibiría algo de luz solar (parcialmente cubierta por la casa) y estaría más protegida del viento, creando una especie de jardín vertical.

Para mantener una altura masiva y aprovechar ópticamente la pared, los espacios entre los ladrillos pueden llenarse con tierra y plantar algún tipo de vegetación. En este caso, cada ladrillo tiene un espacio de $6\times 10^{-3} m^3$ que permite agregar aproximadamente 9 kg de suelo, lo que aumenta la masa del ladrillo a 26 kg.

ID:(734, 0)



Deslizando

Concepto

>Top


El peso total del muro por largo ($w$) y la fuerza vertical por largo del suelo aplicada al muro ($f_V$) generan, a través de el ángulo de fricción interna del suelo ($\phi$), una fuerza por largo que resiste el deslizamiento ($f_R$), que se puede calcular mediante:

$ f_R = ( w + f_V )\tan \phi $



y que puede evitar que la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) desplace la pared de contención, desestabilizando el sistema:



Para asegurar que la pared de contención no se desplace, se exige que la relación entre ambas fuerzas, expresada en el factor de seguridad contra deslizamiento ($SFS$), sea por seguridad superior a 2.0.

ID:(736, 0)



Apoyo

Concepto

>Top


El peso total del muro por largo ($w$) y la fuerza vertical por largo del suelo aplicada al muro ($f_V$) generan, a través de la profundidad del muro ($d$), una fuerza de una presión debajo de la base del bloque ($\sigma_W$), que puede calcularse mediante:

$ \sigma_W = \displaystyle\frac{1}{ d }( w + f_V )$



Esta fuerza puede superar a la capacidad de carga ($\sigma_S$), lo que llevaría a un hundimiento de la pared de contención:



Para asegurar que la pared de contención no se desplace, se exige que la relación entre ambas tensiones, expresada en el factor de seguridad para soporte ($FSB$), sea por seguridad superior a 2.0.

ID:(737, 0)



Vuelco

Concepto

>Top


La muralla de contención se puede ser volcada si el troque que genera la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) supera el que generan el peso total del muro por largo ($w$) y la fuerza vertical por largo del suelo aplicada al muro ($f_V$) que tiende a asentar la pared sobre su base:

ID:(738, 0)



Estabilidad ante vuelco

Concepto

>Top


El riesgo de que la muralla de contención se vuelque proviene del hecho que la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) crea con la altura del muro ($H$) Un momento de volcamiento por largo ($m_O$)

$ m_O = \displaystyle\frac{1}{3} H f_H $



a rotar la pared hacia adelante. Como contra peso el peso total del muro por largo ($w$) y la fuerza vertical por largo del suelo aplicada al muro ($f_V$) generan con la profundidad del muro ($d$), el ángulo de pendiente de la pared desde la horizontal ($\alpha$) y el ángulo de fricción entre el suelo y la pared. ($\varphi$) Un momento de resistencia por largo ($m_R$)

$ m_R = \displaystyle\frac{1}{2}\left( d + H \text{cot} \alpha \right) w + \left( d + \displaystyle\frac{1}{3} H \text{cot} \varphi \right) f_V $



opuesto que tiende a asentar la pared sobre su base.



De primar el primero la pared invariablemente rotara y se desplomara por lo que es importante estimar la proproción de el momento de resistencia por largo ($m_R$) con respecto a el momento de volcamiento por largo ($m_O$) definido como el factor de seguridad contra volcamiento ($SFO$) y velar que este este a lo menos sobre 1.5.

ID:(739, 0)



Mecanismos

Concepto

>Top


La geometría de la muralla de contención se refleja en el coeficiente de presión activa ($K_a$), que junto con la altura del muro ($H$) define la la fuerza activa por largo aplicada al muro ($f_A$), lo que podría llevar a la pared a desestabilizarse. Mediante las componentes la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) y la fuerza vertical por largo del suelo aplicada al muro ($f_V$), podemos estimar los riesgos de desplazamiento (el factor de seguridad contra deslizamiento ($SFS$)) y hundimiento (el factor de seguridad para soporte ($FSB$)), y a través de los torques el momento de volcamiento por largo ($m_O$) y el momento de resistencia por largo ($m_R$), el riesgo de volcamiento (el factor de seguridad contra volcamiento ($SFO$)).

Código
Concepto

Mecanismos

ID:(754, 0)



Coeficiente de presión activa

Ecuación

>Top, >Modelo


En 1776 Charles-Augustin de Coulomb [1] mostro que la fuerza que ejerce suelo tras una pared de contención el coeficiente de presión activa ($K_a$) que depende de el ángulo de pendiente de la pared desde la horizontal ($\alpha$), el ángulo de pendiente de relleno ($\beta$), el ángulo de fricción entre el suelo y la pared. ($\varphi$) y el ángulo de fricción interna del suelo ($\phi$) mediante la ecuación

$ K_a = \displaystyle\frac{\sin^2( \alpha + \phi )}{\sin^2 \alpha \sin( \alpha - \varphi )\left[1+\sqrt{\displaystyle\frac{\sin( \phi + \varphi )\sin( \phi - \beta )}{\sin( \alpha - \varphi )\sin( \alpha + \beta )}}\right]^2}$

$\varphi$
Ángulo de fricción entre el suelo y la pared.
$rad$
65
$\phi$
Ángulo de fricción interna del suelo
$rad$
63
$\alpha$
Ángulo de pendiente de la pared desde la horizontal
$rad$
64
$\beta$
Ángulo de pendiente de relleno
$rad$
62
$K_a$
Coeficiente de presión activa
$-$
57

[1] "Essai sur une application des règles des maximis et minimis à quelques problèmes de statique relatifs à l'architecture." (Ensayo sobre la aplicación de las reglas de los máximos y mínimos a algunos problemas de estática relativos a la arquitectura.), Charles-Augustin de Coulomb, Mémoires de l'Académie Royale des Sciences de Paris, 7, 343-382 (1776)

ID:(740, 0)



Fuerza activa por largo aplicada al muro

Ecuación

>Top, >Modelo


La fuerza activa por largo aplicada al muro ($f_A$), que es una función de la densidad del suelo ($\rho_S$), la aceleración gravitacional ($g$), el coeficiente de presión activa ($K_a$) y la altura del muro ($H$) se calcula según [1] mediante

$ f_A = \displaystyle\frac{1}{2} \rho_S g K_a H ^2$

$g$
Aceleración gravitacional
9.8
$m/s^2$
58
$H$
Altura del muro
$m$
59
$K_a$
Coeficiente de presión activa
$-$
57
$\rho_S$
Densidad del suelo
$kg/m^3$
55
$f_A$
Fuerza activa por largo aplicada al muro
$N/m$
54

[1] "Essai sur une application des règles des maximis et minimis à quelques problèmes de statique relatifs à l'architecture." (Ensayo sobre la aplicación de las reglas de los máximos y mínimos a algunos problemas de estática relativos a la arquitectura.), Charles-Augustin de Coulomb, Mémoires de l'Académie Royale des Sciences de Paris, 7, 343-382 (1776)

ID:(741, 0)



Peso total por largo del muro

Ecuación

>Top, >Modelo


El peso total del muro por largo ($w$) se puede con la densidad del muro ($\rho_W$), la aceleración gravitacional ($g$) y el volumen por largo que se calcula de la altura del muro ($H$) y la profundidad del muro ($d$) siendo:

$ w = \rho_W g H d $

$g$
Aceleración gravitacional
9.8
$m/s^2$
58
$H$
Altura del muro
$m$
59
$\rho_W$
Densidad del muro
$kg/m^3$
56
$w$
Peso total del muro por largo
$N/m$
61
$d$
Profundidad del muro
$m$
60



En un muralla de contención que ante todo opera por gravedad es importante que la densidad del muro ($\rho_W$) y/o la profundidad del muro ($d$) sean grandes para generar suficiente roce.

ID:(742, 0)



Fuerza vertical del suelo por largo aplicada al muro

Ecuación

>Top, >Modelo


Dado que la fuerza activa por largo aplicada al muro ($f_A$) tiene un el ángulo de fricción entre el suelo y la pared. ($\varphi$) respecto a la horizontal, su proyección vertical es la fuerza vertical por largo del suelo aplicada al muro ($f_V$) según

$ f_V = f_A \sin \varphi $

$\varphi$
Ángulo de fricción entre el suelo y la pared.
$rad$
65
$f_A$
Fuerza activa por largo aplicada al muro
$N/m$
54
$f_V$
Fuerza vertical por largo del suelo aplicada al muro
$N/m$
66

.

ID:(743, 0)



Fuerza horizontal del suelo por largo aplicada al muro

Ecuación

>Top, >Modelo


Dado que la fuerza activa por largo aplicada al muro ($f_A$) tiene un ángulo de el ángulo de fricción entre el suelo y la pared. ($\varphi$) respecto a la horizontal, su proyección horizontal es de la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) según

$ f_H = f_A \cos \varphi $

$\varphi$
Ángulo de fricción entre el suelo y la pared.
$rad$
65
$f_A$
Fuerza activa por largo aplicada al muro
$N/m$
54
$f_H$
Fuerza horizontal por largo del suelo aplicada al muro
$N/m$
67

.

ID:(744, 0)



Fuerza por largo que resiste deslizamiento

Ecuación

>Top, >Modelo


La resistencia se origina por la fuerza de roce tanto por el peso total del muro por largo ($w$) como la fuerza vertical por largo del suelo aplicada al muro ($f_V$) poderado por la tangente de el ángulo de fricción interna del suelo ($\phi$):

$ f_R = ( w + f_V )\tan \phi $

$\phi$
Ángulo de fricción interna del suelo
$rad$
63
$f_R$
Fuerza por largo que resiste el deslizamiento
$N/m$
68
$f_V$
Fuerza vertical por largo del suelo aplicada al muro
$N/m$
66
$w$
Peso total del muro por largo
$N/m$
61

ID:(745, 0)



Factor de seguridad contra deslizamiento

Ecuación

>Top, >Modelo


Para determinar el peligro que se corre de que la muralla de contensión se desplace por efecto de la fuerza que ejerce el suelo retenido se determina el factor de seguridad contra deslizamiento ($SFS$) dividiendo la fuerza por largo que resiste el deslizamiento ($f_R$) por la fuerza horizontal por largo del suelo aplicada al muro ($f_H$):

$ SFS = \displaystyle\frac{ f_R }{ f_H }$

$SFS$
Factor de seguridad contra deslizamiento
$-$
69
$f_H$
Fuerza horizontal por largo del suelo aplicada al muro
$N/m$
67
$f_R$
Fuerza por largo que resiste el deslizamiento
$N/m$
68



Si el factor de seguridad contra deslizamiento ($SFS$) exide la unidad se tiene una situación en que la fuerza por largo que resiste el deslizamiento ($f_R$) supera a la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) con lo que la muralla no debiese desplazarse. Como los valores son estimados puede arroja un factor superior a la unidad siendo en realidad la fuerza por largo que resiste el deslizamiento ($f_R$) inferior a la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) se exige por seguridad que el factor sea superior a 2.0 para considerar que la muralla no se desplazará.

ID:(746, 0)



Momento de volcamiento por largo

Ecuación

>Top, >Modelo


La distancia entre el punto de aplicación de la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) y el punto de pivote es igual a $H/3$ debido al triángulo de fuerzas en el que esta se incrementa con la profundidad en el suelo detrás de la pared de contención.



Como el torque por longitud es igual a el momento de volcamiento por largo ($m_O$), calculado de la fuerza horizontal por largo del suelo aplicada al muro ($f_H$) por el brazo vertical que corresponde a la altura del muro ($H$) tercios, se tiene:

$ m_O = \displaystyle\frac{1}{3} H f_H $

$H$
Altura del muro
$m$
59
$f_H$
Fuerza horizontal por largo del suelo aplicada al muro
$N/m$
67
$m_O$
Momento de volcamiento por largo
$N$
70

El momento de volcamiento por largo ($m_O$) se obtiene sumando el area del suelo entre el ángulo de fricción interna del suelo ($\phi$) y el ángulo de pendiente de la pared desde la horizontal ($\alpha$) asumiendo que el primero es similar al angulo de reposo del material. A una altura h sobre el suelo el ancho del segmento es de

$h$

ID:(747, 0)



Momento de resistencia al volcamiento

Ecuación

>Top, >Modelo


Para el torque que estabiliza la pared de contención, tanto el peso total del muro por largo ($w$) como la fuerza vertical por largo del suelo aplicada al muro ($f_V$) son considerados. Los brazos necesarios se pueden derivar de la geometría consultando el siguiente diagrama:



En este, el brazo de el peso total del muro por largo ($w$) se compone de la mitad de la longitud de la profundidad del muro ($d$) y la distancia desde el centro de masa de la pared de contención, calculada a partir de la altura del muro ($H$) y el ángulo de pendiente de la pared desde la horizontal ($\alpha$):

$\displaystyle\frac{1}{2}d + \displaystyle\frac{1}{2}H \text{cot}\alpha$



Para el caso de la fuerza vertical por largo del suelo aplicada al muro ($f_V$), se debe sumar la profundidad del muro ($d$) a la distancia horizontal desde el punto de aplicación de la fuerza activa por largo aplicada al muro ($f_A$), que se asocia a la altura del muro ($H$) y el ángulo de fricción entre el suelo y la pared. ($\varphi$), mediante:

$d + \displaystyle\frac{1}{3}H \text{cot}\varphi$



Con esto, se obtiene:

$ m_R = \displaystyle\frac{1}{2}\left( d + H \text{cot} \alpha \right) w + \left( d + \displaystyle\frac{1}{3} H \text{cot} \varphi \right) f_V $

$H$
Altura del muro
$m$
59
$\varphi$
Ángulo de fricción entre el suelo y la pared.
$rad$
65
$\alpha$
Ángulo de pendiente de la pared desde la horizontal
$rad$
64
$f_V$
Fuerza vertical por largo del suelo aplicada al muro
$N/m$
66
$m_R$
Momento de resistencia por largo
$N$
71
$w$
Peso total del muro por largo
$N/m$
61
$d$
Profundidad del muro
$m$
60

ID:(748, 0)



Factor de seguridad contra volcamiento

Ecuación

>Top, >Modelo


Para determinar el peligro que se corre de que la muralla de contensión rote se define el factor de seguridad contra volcamiento ($SFO$) en que se divide el momento de resistencia por largo ($m_R$):

$ SFO = \displaystyle\frac{ m_R }{ m_O }$

$SFO$
Factor de seguridad contra volcamiento
$-$
72
$m_R$
Momento de resistencia por largo
$N$
71
$m_O$
Momento de volcamiento por largo
$N$
70

que representa la proproción en que excede el torque de intenta asentar la muralla sobre el que la pretende volcar. Se considera como seguro un diseño en que este factor es superior 1.5.

ID:(749, 0)



Presión aplicada en el suelo debajo de la base del bloque

Ecuación

>Top, >Modelo


La presión debajo del bloque surge de el peso total del muro por largo ($w$) y la fuerza vertical por largo del suelo aplicada al muro ($f_V$), que debe ser dividida por el área a lo largo de la muralla, lo que equivale a la profundidad del muro ($d$). Por lo tanto, se concluye que la presión debajo de la base del bloque ($\sigma_W$) es

$ \sigma_W = \displaystyle\frac{1}{ d }( w + f_V )$

$f_V$
Fuerza vertical por largo del suelo aplicada al muro
$N/m$
66
$w$
Peso total del muro por largo
$N/m$
61
$\sigma_W$
Presión debajo de la base del bloque
$Pa$
73
$d$
Profundidad del muro
$m$
60

.

ID:(750, 0)



Factor de seguridad para soporte

Ecuación

>Top, >Modelo


Para determinar si existe riesgo de que la muralla de contención se hunda en el suelo que la debe soportar, se debe comparar la presión debajo de la base del bloque ($\sigma_W$) con la capacidad de carga ($\sigma_S$), siendo la primera inferior a la segunda.

Así, se puede definir el factor de seguridad para soporte ($FSB$) como la proporción entre la capacidad de carga ($\sigma_S$) y la presión debajo de la base del bloque ($\sigma_W$):

$ FSB = \displaystyle\frac{ \sigma_S }{ \sigma_W }$

$\sigma_S$
Capacidad de carga
$Pa$
74
$FSB$
Factor de seguridad para soporte
$-$
75
$\sigma_W$
Presión debajo de la base del bloque
$Pa$
73

asegurando que por razones de seguridad este factor sea igual o superior a 2.0.

ID:(751, 0)



Modelo

Concepto

>Top



Parámetros

Símbolo
Texto
Variable
Valor
Unidades
Calcule
Valor MKS
Unidades MKS
$g$
g
Aceleración gravitacional
m/s^2
$\varphi$
vphi
Ángulo de fricción entre el suelo y la pared.
rad
$\phi$
phi
Ángulo de fricción interna del suelo
rad
$\beta$
beta
Ángulo de pendiente de relleno
rad
$\sigma_S$
sigma_S
Capacidad de carga
Pa
$\rho_S$
rho_S
Densidad del suelo
kg/m3

Variables

Símbolo
Texto
Variable
Valor
Unidades
Calcule
Valor MKS
Unidades MKS
$H$
H
Altura del muro
m
$\alpha$
alpha
Ángulo de pendiente de la pared desde la horizontal
rad
$K_a$
K_a
Coeficiente de presión activa
-
$\rho_W$
rho_W
Densidad del muro
kg/m3
$SFS$
SFS
Factor de seguridad contra deslizamiento
-
$SFO$
SFO
Factor de seguridad contra volcamiento
-
$FSB$
FSB
Factor de seguridad para soporte
-
$f_A$
f_A
Fuerza activa por largo aplicada al muro
N/m
$f_H$
f_H
Fuerza horizontal por largo del suelo aplicada al muro
N/m
$f_R$
f_R
Fuerza por largo que resiste el deslizamiento
N/m
$f_V$
f_V
Fuerza vertical por largo del suelo aplicada al muro
N/m
$m_R$
m_R
Momento de resistencia por largo
N
$m_O$
m_O
Momento de volcamiento por largo
N
$w$
w
Peso total del muro por largo
N/m
$\sigma_W$
sigma_W
Presión debajo de la base del bloque
Pa
$d$
d
Profundidad del muro
m

Cálculos


Primero, seleccione la ecuación: a , luego, seleccione la variable: a

Cálculos

Símbolo
Ecuación
Resuelto
Traducido

Cálculos

Símbolo
Ecuación
Resuelto
Traducido

Variable Dado Calcule Objetivo : Ecuación A utilizar




Ecuaciones

#
Ecuación

$ FSB = \displaystyle\frac{ \sigma_S }{ \sigma_W }$

FSB = sigma_S / sigma_W


$ f_A = \displaystyle\frac{1}{2} \rho_S g K_a H ^2$

f_A = rho_S * g * K_a * H ^2/2


$ f_H = f_A \cos \varphi $

f_H = f_A * cos( vphi )


$ f_R = ( w + f_V )\tan \phi $

f_R = ( w + f_V )* tan( phi )


$ f_V = f_A \sin \varphi $

f_V = f_A * sin( vphi )


$ K_a = \displaystyle\frac{\sin^2( \alpha + \phi )}{\sin^2 \alpha \sin( \alpha - \varphi )\left[1+\sqrt{\displaystyle\frac{\sin( \phi + \varphi )\sin( \phi - \beta )}{\sin( \alpha - \varphi )\sin( \alpha + \beta )}}\right]^2}$

K_a = sin( alpha + phi )^2/(sin( alpha )^2*sin( alpha - vphi )*[1+sqrt((sin( phi + vphi )*sin( phi - beta ))/(sin( alpha - vphi )*sin( alpha + beta )))]^2)


$ m_O = \displaystyle\frac{1}{3} H f_H $

m_O = H * f_H / 3


$ m_R = \displaystyle\frac{1}{2}\left( d + H \text{cot} \alpha \right) w + \left( d + \displaystyle\frac{1}{3} H \text{cot} \varphi \right) f_V $

m_R = ( d + H * cot( alpha ) ) * w /2 + ( d + H * cot( vphi )/3)* f_V


$ SFO = \displaystyle\frac{ m_R }{ m_O }$

SFO = m_R / m_O


$ SFS = \displaystyle\frac{ f_R }{ f_H }$

SFS = f_R / f_H


$ \sigma_W = \displaystyle\frac{1}{ d }( w + f_V )$

sigma_W = ( w + f_V )/ d


$ w = \rho_W g H d $

w = rho_W * g * H * d

ID:(755, 0)