(string[] args)
| 6 | class Program |
| 7 | { |
| 8 | public static int Main(string[] args) |
| 9 | { |
| 10 | // Create a sphere mesh. |
| 11 | Mesh sphere1 = makeUVSphere(radius: 1, horisontalResolution: 64, verticalResolution: 64); |
| 12 | |
| 13 | // Copy it into another mesh. |
| 14 | Mesh sphere2 = new Mesh(sphere1); |
| 15 | // Apply some offset. |
| 16 | sphere2.transform(AffineXf3f.translation(new Vector3f { x = 0.7f })); |
| 17 | |
| 18 | BooleanResult boolean_result = boolean(sphere1, sphere2, BooleanOperation.Intersection); |
| 19 | if (!boolean_result) |
| 20 | { |
| 21 | Console.WriteLine($"Failed to perform boolean: {(string)boolean_result.errorString}"); |
| 22 | Environment.Exit(1); |
| 23 | } |
| 24 | |
| 25 | MeshSave.toAnySupportedFormat(boolean_result.mesh, "out_boolean.stl"); |
| 26 | |
| 27 | /// ... |
| 28 | |
| 29 | Console.WriteLine("Starting tests..."); |
| 30 | return new AutoRun().Execute(args); |
| 31 | } |
| 32 | } |
| 33 | } |
no test coverage detected