MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / Main

Method Main

source/MRDotNet2Test/src/Main.cs:8–31  ·  view source on GitHub ↗
(string[] args)

Source from the content-addressed store, hash-verified

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}

Callers 1

loadModelStructureMethod · 0.45

Calls 4

makeUVSphereFunction · 0.85
booleanFunction · 0.85
translationMethod · 0.80
transformMethod · 0.45

Tested by

no test coverage detected