# connect_2 # written by John Dannenhoffer # red cube BOX 0 -1 -1 2 2 2 SELECT FACE ATTRIBUTE _color $red # remember the Face to be removed SELECT FACE @nbody 2 SET redFaces @sellist[1] # make a list of the bridging Edges DIMENSION redEdges 4 1 SELECT EDGE @nbody 2 @nbody 3 SET redEdges[1] @sellist[1] SELECT EDGE @nbody 2 @nbody 6 SET redEdges[2] @sellist[1] SELECT EDGE @nbody 2 @nbody 4 SET redEdges[3] @sellist[1] SELECT EDGE @nbody 2 @nbody 5 SET redEdges[4] @sellist[1] # blue prism SKBEG 4 -1 -1 LINSEG 4 0 1 LINSEG 4 1 -1 LINSEG 4 -1 -1 SKEND EXTRUDE 2 0 0 SELECT FACE ATTRIBUTE _color $blue # remember the Face to be removed SELECT FACE @nbody 1 SET blueFaces @sellist[1] # make a list of the bridging Edges DIMENSION blueEdges 4 1 SELECT EDGE @nbody 1 @nbody 5 SET blueEdges[1] @sellist[1] SET blueEdges[2] 0 # degenerate SELECT EDGE @nbody 1 @nbody 4 SET blueEdges[3] @sellist SELECT EDGE @nbody 1 @nbody 3 SET blueEdges[4] @sellist # make the connecting Faces CONNECT redFaces blueFaces redEdges blueEdges END