Example #1
0
        public void LoadWalls()
        {
            var model  = Model.FromJson(File.ReadAllText("../../../../Walls.json"));
            var inputs = new PanelsFromWallsInputs(6, 6, true, "", "", new Dictionary <string, string>(), "", "", "");
            var output = PanelsFromWalls.Execute(new Dictionary <string, Model> {
                { "Walls", model }
            }, inputs);

            var outModel = output.model.ToJson();

            File.WriteAllText("/Users/andrewheumann/Desktop/color-coded-walls.json", outModel);
        }
Example #2
0
        public async Task InvokeFunction()
        {
            var store = new FileModelStore <PanelsFromWallsInputs>("./", true);

            // Create an input object with default values.
            var input = new PanelsFromWallsInputs();

            // Invoke the function.
            // The function invocation uses a FileModelStore
            // which will write the resulting model to disk.
            // You'll find the model at "./model.gltf"
            var l      = new InvocationWrapper <PanelsFromWallsInputs, PanelsFromWallsOutputs>(store, PanelsFromWalls.Execute);
            var output = await l.InvokeAsync(input);
        }