private static OSCADObject getEndCover(OSCADObject outer) { var bounds = outer.Bounds(); var endCover = new Cube(Inches.Sixteenth, bounds.Width, bounds.Height, true); var choppedOut = endCover.Clone().Scale(2, (bounds.Width-Inches.Quarter)/ bounds.Width, (bounds.Height - Inches.Half) / bounds.Height); choppedOut = choppedOut.Translate(0, Inches.Quarter, 0); return endCover - choppedOut; }
private static OSCADObject getEndCover(OSCADObject outer) { var bounds = outer.Bounds(); var endCover = new Cube(Inches.Sixteenth, bounds.Width, bounds.Height, true); var choppedOut = endCover.Clone().Scale(2, (bounds.Width - Inches.Quarter) / bounds.Width, (bounds.Height - Inches.Half) / bounds.Height); choppedOut = choppedOut.Translate(0, Inches.Quarter, 0); return(endCover - choppedOut); }
private static OSCADObject makeStandCap() { OSCADObject center = new Cube(Inches.One - Inches.Sixteenth, Inches.Half - Inches.Sixteenth, Inches.Quarter, true); OSCADObject outerColumn = new Cylinder(Inches.One, Inches.One, true).Resize(Inches.One * 1.5, Inches.Half * 1.5, Inches.One); var bnds = center.Bounds(); OSCADObject top = new Cylinder(Inches.One, Inches.One, true) .Resize(Inches.One * 2.25, Inches.Half * 2.25, Inches.Quarter); OSCADObject cutout = new Cylinder(Inches.One, Inches.One, true) .Resize(Inches.One * 2.1, Inches.Half * 2.1, Inches.Quarter); top = top - cutout.Translate(0, 0, Inches.Quarter / 2); OSCADObject brim = top.Clone(); var obj = center + top.Translate(0, 0, bnds.Height / 2 + Inches.Sixteenth / 2); return(obj); }