Example #1
0
        public void SectionLayoutTest()
        {
            var inputs  = new SectionLayoutInputs(true, 20.0, 20.0, 20.0, 20.0, 2.0, 0.5, "", "", new Dictionary <string, string>(), "", "", "");
            var model   = Model.FromJson(System.IO.File.ReadAllText("../../../../Envelope.json"));
            var outputs = SectionLayout.Execute(new Dictionary <string, Model> {
                { "Envelope", model }
            }, inputs);

            System.IO.File.WriteAllText("../../../../SectionLayout.json", outputs.model.ToJson());
            outputs.model.ToGlTF("../../../../SectionLayout.glb");
        }
Example #2
0
        public async Task InvokeFunction()
        {
            var store = new FileModelStore <SectionLayoutInputs>("./", true);

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

            // 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 <SectionLayoutInputs, SectionLayoutOutputs>(store, SectionLayout.Execute);
            var output = await l.InvokeAsync(input);
        }