Esempio n. 1
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Brep    surface = null;
            Motions motions = null;
            MotionsPlasticLimits motionsPlasticLimit = null;

            Rhino.Geometry.Vector3d x = Vector3d.Zero;
            Rhino.Geometry.Vector3d z = Vector3d.Zero;
            string identifier         = "S";

            if (!DA.GetData(0, ref surface))
            {
                return;
            }
            if (!DA.GetData(1, ref motions))
            {
                return;
            }
            DA.GetData(2, ref motionsPlasticLimit);
            DA.GetData(3, ref x);
            DA.GetData(4, ref z);
            DA.GetData(5, ref identifier);

            if (surface == null || motions == null || identifier == null)
            {
                return;
            }

            Geometry.Region         region = surface.FromRhino();
            Supports.SurfaceSupport obj    = new Supports.SurfaceSupport(region, motions, motionsPlasticLimit, identifier);

            // Set local x-axis
            if (!x.Equals(Vector3d.Zero))
            {
                obj.CoordinateSystem.SetXAroundZ(x.FromRhino());
            }

            // Set local z-axis
            if (!z.Equals(Vector3d.Zero))
            {
                obj.CoordinateSystem.SetZAroundX(z.FromRhino());
            }

            DA.SetData(0, obj);
        }
Esempio n. 2
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get input
            Brep surface = null;

            if (!DA.GetData(0, ref surface))
            {
                return;
            }

            double thickness = 0;

            if (!DA.GetData(1, ref thickness))
            {
                return;
            }

            FemDesign.Materials.Material material = null;
            if (!DA.GetData(2, ref material))
            {
                return;
            }

            FemDesign.Shells.ShellEccentricity eccentricity = FemDesign.Shells.ShellEccentricity.GetDefault();
            if (!DA.GetData(3, ref eccentricity))
            {
                // pass
            }

            FemDesign.Shells.ShellOrthotropy orthotropy = FemDesign.Shells.ShellOrthotropy.GetDefault();
            if (!DA.GetData(4, ref orthotropy))
            {
                // pass
            }

            FemDesign.Shells.EdgeConnection edgeConnection = FemDesign.Shells.EdgeConnection.GetRigid();
            if (!DA.GetData(5, ref edgeConnection))
            {
                // pass
            }

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

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

            string identifier = "P";

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

            if (surface == null || material == null || eccentricity == null || orthotropy == null || edgeConnection == null || identifier == null)
            {
                return;
            }

            //
            FemDesign.Geometry.Region region = surface.FromRhino();

            //
            List <FemDesign.Shells.Thickness> thicknessObj = new List <FemDesign.Shells.Thickness>();

            thicknessObj.Add(new FemDesign.Shells.Thickness(region.CoordinateSystem.Origin, thickness));

            //
            FemDesign.Shells.Slab obj = FemDesign.Shells.Slab.Plate(identifier, material, region, edgeConnection, eccentricity, orthotropy, thicknessObj);

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

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

            // return
            DA.SetData(0, obj);
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get input
            Brep surface = null;

            if (!DA.GetData("Surface", ref surface))
            {
                return;
            }

            Materials.TimberPanelType timberPlateMaterialData = null;
            if (!DA.GetData("TimberPlateMaterial", ref timberPlateMaterialData))
            {
                return;
            }

            Vector3d spanDirection = new Vector3d();

            if (!DA.GetData("SpanDirection", ref spanDirection))
            {
                return;
            }

            double panelWidth = 1.5;

            DA.GetData("PanelWidth", ref panelWidth);

            Shells.ShellEccentricity eccentricity = Shells.ShellEccentricity.GetDefault();
            DA.GetData("ShellEccentricity", ref eccentricity);

            Shells.EdgeConnection edgeConnection = Shells.EdgeConnection.GetHinged();
            DA.GetData("BorderEdgeConnection", ref edgeConnection);

            Rhino.Geometry.Vector3d x = Vector3d.Zero;
            DA.GetData("LocalX", ref x);

            Rhino.Geometry.Vector3d z = Vector3d.Zero;
            DA.GetData("LocalZ", ref z);

            double meshSize = 0;

            DA.GetData("AvgMeshSize", ref meshSize);

            string identifier = "PP";

            DA.GetData("Identifier", ref identifier);

            if (surface == null || timberPlateMaterialData == null || eccentricity == null || edgeConnection == null || identifier == null)
            {
                return;
            }


            Geometry.Region     region = surface.FromRhino();
            Geometry.FdVector3d dir    = spanDirection.FromRhino();
            Shells.Panel        obj    = Shells.Panel.DefaultTimberContinuous(region, timberPlateMaterialData, dir, edgeConnection, identifier, eccentricity, panelWidth);

            // 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();
            }

            // set uniform average mesh size
            obj.UniformAvgMeshSize = meshSize;

            // return
            DA.SetData(0, obj);
        }
Esempio n. 4
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get input

            Brep surface = null;

            if (!DA.GetData(0, ref surface))
            {
                return;
            }

            List <FemDesign.Shells.Thickness> thickness = new List <FemDesign.Shells.Thickness>();

            if (!DA.GetDataList(1, thickness))
            {
                return;
            }

            FemDesign.Materials.Material material = null;
            if (!DA.GetData(2, ref material))
            {
                return;
            }

            FemDesign.Shells.ShellEccentricity eccentricity = FemDesign.Shells.ShellEccentricity.GetDefault();
            if (!DA.GetData(3, ref eccentricity))
            {
                // pass
            }

            FemDesign.Shells.ShellOrthotropy orthotropy = FemDesign.Shells.ShellOrthotropy.GetDefault();
            if (!DA.GetData(4, ref orthotropy))
            {
                // pass
            }

            FemDesign.Shells.EdgeConnection edgeConnection = FemDesign.Shells.EdgeConnection.GetRigid();
            if (!DA.GetData(5, ref edgeConnection))
            {
                // pass
            }

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

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

            string identifier = "W";

            if (!DA.GetData(8, ref identifier))
            {
                // pass
            }
            if (surface == null || thickness == null || material == null || eccentricity == null || orthotropy == null || edgeConnection == null)
            {
                return;
            }
            if (thickness.Count != 2)
            {
                throw new System.ArgumentException("Thickness must contain exactly 2 items.");
            }

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

            //
            FemDesign.Shells.Slab obj = FemDesign.Shells.Slab.Wall(identifier, material, region, edgeConnection, eccentricity, orthotropy, thickness);

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

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

            // return
            DA.SetData(0, obj);
        }
Esempio n. 5
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get input
            Brep surface = null;

            if (!DA.GetData(0, ref surface))
            {
                return;
            }

            FemDesign.Materials.Material material = null;
            if (!DA.GetData(1, ref material))
            {
                return;
            }

            FemDesign.Sections.Section section = null;
            if (!DA.GetData(2, ref section))
            {
                return;
            }

            FemDesign.Shells.ShellEccentricity eccentricity = FemDesign.Shells.ShellEccentricity.GetDefault();
            if (!DA.GetData(3, ref eccentricity))
            {
                // pass
            }

            double orthoRatio = 1;

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

            FemDesign.Shells.EdgeConnection edgeConnection = FemDesign.Shells.EdgeConnection.GetHinged();
            if (!DA.GetData(5, ref edgeConnection))
            {
                // pass
            }

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

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

            double meshSize = 0;

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

            string identifier = "PP";

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

            if (surface == null || material == null || section == null || eccentricity == null || edgeConnection == null || identifier == null)
            {
                return;
            }


            FemDesign.Geometry.Region region = surface.FromRhino();

            //
            FemDesign.Shells.Panel obj = FemDesign.Shells.Panel.DefaultContreteContinuous(region, edgeConnection, material, section, identifier, orthoRatio, eccentricity);

            // 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();
            }

            // set uniform average mesh size
            obj.UniformAvgMeshSize = meshSize;

            // return
            DA.SetData(0, obj);
        }
Esempio n. 6
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);
        }