function drawFace( me, face, horizontal, vertical, planeIdx, line1, line2, drawMinFace, cond2, cond3 ) { var world3D = new Vector( 0,0,0 ); world3D[face] = drawMinFace ? me.Min[face] : me.Max[face]; world3D[horizontal] = me.Min[horizontal]; world3D[vertical] = me.Min[vertical]; var screen2D = me.Parent.ScreenPos( world3D ); // calculate and construct Bbox rectangle path ss = "M " + screen2D.x + " " + screen2D.y + " "; // move to corner 1 world3D[horizontal] = me.Max[horizontal]; screen2D = me.Parent.ScreenPos( world3D ); ss += "L " + screen2D.x + " " + screen2D.y + " "; // line to corner 2 world3D[vertical] = me.Max[vertical]; screen2D = me.Parent.ScreenPos( world3D ); ss += "L " + screen2D.x + " " + screen2D.y + " "; // line to corner 3 world3D[horizontal] = me.Min[horizontal]; screen2D = me.Parent.ScreenPos( world3D ); ss += "L " + screen2D.x + " " + screen2D.y + " z"; // line to corner 4 and close back to corner 1 me.Plane[planeIdx].setAttribute( "d", ss ); // [d]efine the path for this panes Bbox world3D[face] = 1; world3D[horizontal] = 0; world3D[vertical] = 0; // and set its attributes me.Plane[planeIdx].setAttribute( "fill", me.Parent.GetColor( me.FillColor, me.FillColor, world3D, drawMinFace ? me.Min : me.Max ) ); me.Plane[planeIdx].setAttribute( "stroke", me.StrokeColor ); me.Plane[planeIdx].setAttribute( "stroke-width", me.StrokeWeight ); me.Plane[planeIdx].setAttribute( "visibility", "visible" ); world3D[face] = drawMinFace ? me.Min[face] : me.Max[face]; // Draw the horizontal and vertical grid lines on this Bbox face drawGrid( me, face, horizontal, vertical, line1, cond3, world3D ); // horizontal drawGrid( me, face, vertical, horizontal, line2, cond2, world3D ); // vertical }