protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get input
            FemDesign.ModellingTools.FictitiousShell fictShell           = null;
            FemDesign.Shells.EdgeConnection          shellEdgeConnection = null;
            List <int> indices = new List <int>();

            if (!DA.GetData(0, ref fictShell))
            {
                return;
            }
            if (!DA.GetData(1, ref shellEdgeConnection))
            {
                return;
            }
            if (!DA.GetDataList(2, indices))
            {
                return;
            }
            if (fictShell == null)
            {
                return;
            }

            //
            FemDesign.ModellingTools.FictitiousShell obj = FemDesign.ModellingTools.FictitiousShell.UpdateEdgeConnection(fictShell, shellEdgeConnection, indices);

            //
            DA.SetData(0, obj);
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            FemDesign.Shells.Panel panel = null;
            if (!DA.GetData(0, ref panel))
            {
                return;
            }

            FemDesign.Shells.EdgeConnection shellEdgeConnection = null;
            if (!DA.GetData(1, ref shellEdgeConnection))
            {
                return;
            }

            List <int> indices = new List <int>();

            if (!DA.GetDataList(2, indices))
            {
                return;
            }
            if (panel == null)
            {
                return;
            }

            // clone
            FemDesign.Shells.Panel panelClone = panel.DeepClone();

            // set edge connections
            panelClone.SetExternalEdgeConnectionsForContinuousAnalyticalModel(shellEdgeConnection, indices);

            //
            DA.SetData(0, panelClone);
        }
Пример #3
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            //
            FemDesign.Shells.EdgeConnection obj = FemDesign.Shells.EdgeConnection.GetRigid();

            // return
            DA.SetData(0, obj);
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get input
            FemDesign.Shells.EdgeConnection obj = null;
            if (!DA.GetData(0, ref obj))
            {
                return;
            }
            if (obj == null)
            {
                return;
            }

            // return
            DA.SetData(0, obj.Guid);
            DA.SetData(1, obj.Name);

            // catch pre-defined rigidity
            if (obj.Rigidity != null)
            {
                DA.SetData(2, null);
                DA.SetData(3, null);
                if (obj.Rigidity._friction == null)
                {
                    DA.SetData(4, null);
                }
                else
                {
                    DA.SetData(4, obj.Rigidity.Friction);
                }
                DA.SetData(5, obj.Rigidity.Motions);
                DA.SetData(6, obj.Rigidity.Rotations);
            }
            else
            {
                DA.SetData(2, obj.PredefRigidity.Name);
                DA.SetData(3, obj.PredefRigidity.Guid);
                if (obj.PredefRigidity.Rigidity._friction == null)
                {
                    DA.SetData(4, null);
                }
                else
                {
                    DA.SetData(4, obj.PredefRigidity.Rigidity.Friction);
                }
                DA.SetData(5, obj.PredefRigidity.Rigidity.Motions);
                DA.SetData(6, obj.PredefRigidity.Rigidity.Rotations);
            }
        }
Пример #5
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // get data
            FemDesign.Releases.Motions   motions   = null;
            FemDesign.Releases.Rotations rotations = null;
            if (!DA.GetData(0, ref motions))
            {
                return;
            }
            if (!DA.GetData(1, ref rotations))
            {
                return;
            }
            if (motions == null || rotations == null)
            {
                return;
            }

            //
            FemDesign.Shells.EdgeConnection obj = new FemDesign.Shells.EdgeConnection(motions, rotations);

            // return
            DA.SetData(0, obj);
        }
Пример #6
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);
        }
Пример #7
0
 public static Dictionary <string, object> EdgeConnectionDeconstruct(FemDesign.Shells.EdgeConnection shellEdgeConnection)
 {
     if (shellEdgeConnection == null)
     {
         return(new Dictionary <string, object>
         {
             { "Guid", null },
             { "AnalyticalID", null },
             { "PredefinedName", null },
             { "PredefinedGuid", null },
             { "Friction", null },
             { "Motions", null },
             { "Rotations", null },
         });
     }
     else
     {
         if (shellEdgeConnection.Rigidity != null && shellEdgeConnection.Rigidity._friction == null)
         {
             return(new Dictionary <string, object>
             {
                 { "Guid", shellEdgeConnection.Guid },
                 { "AnalyticalID", shellEdgeConnection.Name },
                 { "PredefinedName", null },
                 { "PredefinedGuid", null },
                 { "Friction", null },
                 { "Motions", shellEdgeConnection.Rigidity.Motions },
                 { "Rotations", shellEdgeConnection.Rigidity.Rotations },
             });
         }
         else if (shellEdgeConnection.Rigidity != null && shellEdgeConnection.Rigidity._friction != null)
         {
             return(new Dictionary <string, object>
             {
                 { "Guid", shellEdgeConnection.Guid },
                 { "AnalyticalID", shellEdgeConnection.Name },
                 { "PredefinedName", null },
                 { "PredefinedGuid", null },
                 { "Friction", shellEdgeConnection.Rigidity.Friction },
                 { "Motions", shellEdgeConnection.Rigidity.Motions },
                 { "Rotations", shellEdgeConnection.Rigidity.Rotations },
             });
         }
         else if (shellEdgeConnection.PredefRigidity != null && shellEdgeConnection.PredefRigidity.Rigidity._friction == null)
         {
             return(new Dictionary <string, object>
             {
                 { "Guid", shellEdgeConnection.Guid },
                 { "AnalyticalID", shellEdgeConnection.Name },
                 { "PredefinedName", shellEdgeConnection.PredefRigidity.Name },
                 { "PredefinedGuid", shellEdgeConnection.PredefRigidity.Guid },
                 { "Friction", null },
                 { "Motions", shellEdgeConnection.PredefRigidity.Rigidity.Motions },
                 { "Rotations", shellEdgeConnection.PredefRigidity.Rigidity.Rotations },
             });
         }
         else if (shellEdgeConnection.PredefRigidity != null && shellEdgeConnection.PredefRigidity.Rigidity._friction != null)
         {
             return(new Dictionary <string, object>
             {
                 { "Guid", shellEdgeConnection.Guid },
                 { "AnalyticalID", shellEdgeConnection.Name },
                 { "PredefinedName", shellEdgeConnection.PredefRigidity.Name },
                 { "PredefinedGuid", shellEdgeConnection.PredefRigidity.Guid },
                 { "Friction", shellEdgeConnection.PredefRigidity.Rigidity.Friction },
                 { "Motions", shellEdgeConnection.PredefRigidity.Rigidity.Motions },
                 { "Rotations", shellEdgeConnection.PredefRigidity.Rigidity.Rotations },
             });
         }
         else
         {
             throw new System.ArgumentException("Unexpected shell edge connection");
         }
     }
 }
Пример #8
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);
        }
Пример #9
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);
        }