protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rhino.Geometry.Brep brep = null;
            if (!DA.GetData("Surface", ref brep))
            {
                return;
            }

            string identifier = "D";

            if (!DA.GetData("Identifier", ref identifier))
            {
                // pass
            }

            // Convert geometry
            Geometry.Region region = brep.FromRhino();

            ModellingTools.Diaphragm obj = new ModellingTools.Diaphragm(region, identifier);
            DA.SetData("Diaphragm", obj);
        }
Example #2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Rhino.Geometry.Brep brep = null;
            if (!DA.GetData(0, ref brep))
            {
                return;
            }

            ModellingTools.StiffnessMatrix4Type d = null;
            if (!DA.GetData(1, ref d))
            {
                return;
            }

            ModellingTools.StiffnessMatrix4Type k = null;
            if (!DA.GetData(2, ref k))
            {
                return;
            }

            ModellingTools.StiffnessMatrix2Type h = null;
            if (!DA.GetData(3, ref h))
            {
                return;
            }

            double density = 1;

            if (!DA.GetData(4, ref density))
            {
                // pass
            }

            double t1 = 0.1;

            if (!DA.GetData(5, ref t1))
            {
                // pass
            }

            double t2 = 0.1;

            if (!DA.GetData(6, ref t2))
            {
                // pass
            }

            double alpha1 = 0.00001;

            if (!DA.GetData(7, ref alpha1))
            {
                // pass
            }

            double alpha2 = 0.00001;

            if (!DA.GetData(8, ref alpha2))
            {
                // pass
            }

            bool ignore = false;

            if (!DA.GetData(9, ref ignore))
            {
                // pass
            }

            Shells.EdgeConnection edgeConnection = Shells.EdgeConnection.GetDefault();
            if (!DA.GetData(10, ref edgeConnection))
            {
                // pass
            }

            Rhino.Geometry.Vector3d x = Vector3d.Zero;
            if (!DA.GetData(11, ref x))
            {
                // pass
            }

            Rhino.Geometry.Vector3d z = Vector3d.Zero;
            if (!DA.GetData(12, ref z))
            {
                // pass
            }

            double mesh = 0;

            if (!DA.GetData(13, ref mesh))
            {
                // pass
            }

            string identifier = "FS";

            if (!DA.GetData(14, ref identifier))
            {
                // pass
            }

            // convert geometry
            Geometry.Region region = brep.FromRhino();

            // add edge connection
            region.SetEdgeConnections(edgeConnection);

            //
            ModellingTools.FictitiousShell obj = new ModellingTools.FictitiousShell(region, d, k, h, density, t1, t2, alpha1, alpha2, ignore, mesh, identifier);

            // set local x-axis
            if (!x.Equals(Vector3d.Zero))
            {
                obj.LocalX = x.FromRhino();
            }

            // set local z-axis
            if (!z.Equals(Vector3d.Zero))
            {
                obj.LocalZ = z.FromRhino();
            }

            // return
            DA.SetData(0, obj);
        }