/// <summary>
 /// 初期化
 /// </summary>
 protected override void InitSingleton()
 {
     Particle.Create();
     Bone.Create();
     Mesh.Create();
     Team.Create();
     Wind.Create();
     Compute.Create();
 }
Example #2
0
        public void TestComputeRun()
        {
            // Here is the component/function - this will be wrapped in Grasshopper/Dynamo boilerplate
            var outputs = Compute.Create(
                core_input,
                geometryFile,              // Do we need to provide a path here?
                true
                );

            Console.WriteLine($"Got Output: {outputs}");
            // Components should always output json string "out" - this is the core dictoinary
            Assert.IsTrue(outputs != null);

            // We can deserialise the output here and do more assertions
        }
Example #3
0
        private void RunRadiance(string inputJson, List <GH_Mesh> geometry, string cacheKey, bool compute)
        {
            var geometryFile = Export.STLObject(geometry);
            var results      = Compute.Create(
                inputJson,
                geometryFile,
                "Probe",
                compute
                );

            StringCache.setCache(cacheKey, results);
            StringCache.setCache(InstanceGuid.ToString(), "");
            if (compute)
            {
                StringCache.setCache(cacheKey + "create", "true");
            }
        }
Example #4
0
        private void RunCFD(string inputJson, List <GH_Mesh> geometry, string cacheKey, bool compute)
        {
            var geometryFile       = Export.STLObject(geometry);
            var refinementGeometry = Export.RefinementRegionsToSTL(geometry);
            var results            = Compute.Create(
                inputJson,
                geometryFile,
                refinementGeometry,
                compute
                );

            StringCache.setCache(cacheKey, results);
            StringCache.setCache(InstanceGuid.ToString(), "");
            if (compute)
            {
                StringCache.setCache(cacheKey + "create", "true");
            }
        }