diff --git a/OSCADSharp/OSCADSharp.ConsoleTests/Program.cs b/OSCADSharp/OSCADSharp.ConsoleTests/Program.cs index 92b3d14..a9dd0b8 100644 --- a/OSCADSharp/OSCADSharp.ConsoleTests/Program.cs +++ b/OSCADSharp/OSCADSharp.ConsoleTests/Program.cs @@ -57,8 +57,15 @@ namespace OSCADSharp.ConsoleTests static void Main(string[] args) { - var img = ImportedImage.FromFile("seahawks coaster.png"); - img.ToFile("seaImg").Open(); + var img = ImportedImage.FromFile("seahawks coaster.png").Scale(1, 1, Inches.Quarter + Inches.Eigth); + var imgPos = img.Position(); + var _base = new Cylinder(img.Bounds().Width + Inches.Quarter, Inches.Quarter); + + var rim = _base.Clone().Scale(1, 1, 1.25) - _base.Clone().Scale(.9, .9, 3.5).Translate(0, 0, -Inches.Eigth); + var coaster = img + _base.Translate(imgPos.X, imgPos.Y, 0) + rim.Translate(imgPos.X, imgPos.Y, Inches.Quarter); ; + + + coaster.ToFile("seaImg").Open(); //makePeg(); diff --git a/OSCADSharp/OSCADSharp/Solids/Imported/CubistImageProcessor.cs b/OSCADSharp/OSCADSharp/Solids/Imported/CubistImageProcessor.cs index 86ec37d..d772bf0 100644 --- a/OSCADSharp/OSCADSharp/Solids/Imported/CubistImageProcessor.cs +++ b/OSCADSharp/OSCADSharp/Solids/Imported/CubistImageProcessor.cs @@ -47,7 +47,7 @@ namespace OSCADSharp.Solids.Imported throw new InvalidOperationException("Cannot process images larger greater than 200x200 pixels"); } - this.ImageBounds = new Bounds(new Vector3(), new Vector3(img.Width, img.Height, 0)); + this.ImageBounds = new Bounds(new Vector3(), new Vector3(img.Width, img.Height, 1)); List cubes = new List(); bool[,] visited = new bool[img.Width, img.Height]; diff --git a/OSCADSharp/OSCADSharp/Solids/Imported/ImportedImage.cs b/OSCADSharp/OSCADSharp/Solids/Imported/ImportedImage.cs index ba16bb9..828411d 100644 --- a/OSCADSharp/OSCADSharp/Solids/Imported/ImportedImage.cs +++ b/OSCADSharp/OSCADSharp/Solids/Imported/ImportedImage.cs @@ -20,6 +20,11 @@ namespace OSCADSharp.Solids.Imported #endregion #region Constructors / Initialization + /// + /// Creates an imported image from the specified file + /// + /// + /// public static ImportedImage FromFile(string imagePath) {