mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-11 21:48:34 +00:00
35 lines
1.0 KiB
C#
35 lines
1.0 KiB
C#
using OSCADSharp.Solids;
|
|
using OSCADSharp.Transforms;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace OSCADSharp.ConsoleTests
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
|
|
var obj = new Cube(5, 5, 20)
|
|
.Translate(30, 0, 0).Rotate(0, 90, 0).Resize(2, 2, 2);
|
|
|
|
var pos = obj.Position();
|
|
var cyl1 = new Cylinder(1, 100, true).Translate(pos);
|
|
var cyl2 = new Cylinder(1, 100, true).Rotate(0, 90, 0).Translate(pos);
|
|
var cyl3 = new Cylinder(1, 100, true).Rotate(90, 0, 0).Translate(pos);
|
|
var axisHelper = cyl1.Union(cyl2, cyl3).Color("Red");
|
|
|
|
var topCorner = new Sphere().Translate(obj.Bounds().TopRight);
|
|
var botCorner = new Sphere().Translate(obj.Bounds().BottomLeft);
|
|
|
|
(obj + topCorner + botCorner + axisHelper).ToFile("test.scad");
|
|
|
|
//Console.ReadKey();
|
|
}
|
|
}
|
|
}
|