예제 #1
0
        public static void makeLoop()
        {
            double outerDiam = Inches.Quarter+ Inches.Sixteenth;
            double height = Inches.Eigth + Inches.Sixteenth;
            double holeSize = Inches.Quarter;
            double paddingSize = Inches.Sixteenth;


            var outer = new Cylinder(holeSize + paddingSize, height, true) { Resolution = 50 };
            var inner = new Cylinder(holeSize, height*2, true) { Resolution = 50 };            

            var bounds = outer.Bounds();
            var bottomDisk = new Cylinder(outerDiam + Inches.Eigth, Inches.Sixteenth / 2, true) { Resolution = 50 }.Translate(0, 0, bounds.ZMin - Inches.Sixteenth / 4);
        

            var whole = ((outer + bottomDisk) - inner);

            whole.ToFile("loop");

            var topDisk = new Cylinder(outerDiam + Inches.Eigth, Inches.Sixteenth / 2, true) - new Cylinder(holeSize + Inches.Sixteenth, Inches.Half, true) { Resolution = 50 };
            topDisk.ToFile("topLoop");
        }