Пример #1
0
        /// <summary>
        /// Create a default timber shell with panels using a continuous analytical model.
        /// </summary>
        /// <param name="region">Panel region.</param>
        /// <param name="timberPlateMaterial">Timber material. See <see cref="FemDesign.Materials.TimberPanelType"/>.</param>
        /// <param name="direction">Timber panel span direction.</param>
        /// <param name="externalEdgeConnection"></param>
        /// <param name="identifier">Name of shell.</param>
        /// <param name="eccentricity"></param>
        /// <param name="panelWidth"></param>
        /// <returns></returns>
        public static Panel DefaultTimberContinuous(Geometry.Region region, Materials.TimberPanelType timberPlateMaterial, Geometry.FdVector3d direction, EdgeConnection externalEdgeConnection = null, string identifier = "TP", ShellEccentricity eccentricity = null, double panelWidth = 1.5)
        {
            if (externalEdgeConnection == null)
            {
                externalEdgeConnection = EdgeConnection.GetDefault();
            }

            if (eccentricity == null)
            {
                eccentricity = ShellEccentricity.GetDefault();
            }

            Geometry.FdPoint3d anchorPoint    = region.Contours[0].Edges[0].Points[0];
            InternalPanel      internalPanel  = new InternalPanel(region);
            InternalPanels     internalPanels = new InternalPanels(internalPanel);
            PanelType          type           = PanelType.Timber;
            string             panelName      = "A";
            double             gap            = 0.01;
            double             orthotropy     = 1;
            bool externalMovingLocal          = externalEdgeConnection.MovingLocal;

            var panel = new Panel(region, anchorPoint, internalPanels, timberPlateMaterial, externalEdgeConnection, type, identifier, panelName, gap, orthotropy, eccentricity, externalMovingLocal, panelWidth);

            panel.LocalX = direction; // Set timber panel span direction

            return(panel);
        }
Пример #2
0
        public static Panel ProfiledPlate(Autodesk.DesignScript.Geometry.Surface surface, Materials.Material material, Sections.Section section, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity eccentricity, [DefaultArgument("1")] double orthoRatio, [DefaultArgument("EdgeConnection.Hinged()")] EdgeConnection edgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, [DefaultArgument("0")] double avgMeshSize, string identifier = "PP")
        {
            // convert geometry
            Geometry.Region region = Geometry.Region.FromDynamo(surface);

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

            // set local x-axis
            if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                obj.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX);
            }

            // set local z-axis
            if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                obj.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ);
            }

            // set mesh
            obj.UniformAvgMeshSize = avgMeshSize;

            // return
            return(obj);
        }
Пример #3
0
        public static Slab PlateVariableThickness(Autodesk.DesignScript.Geometry.Surface surface, List <Thickness> thickness, Materials.Material material, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity shellEccentricity, [DefaultArgument("ShellOrthotropy.Default()")] ShellOrthotropy shellOrthotropy, [DefaultArgument("EdgeConnection.Default()")] EdgeConnection shellEdgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, string identifier = "P")
        {
            // create FlatSurface
            Geometry.Region region = Geometry.Region.FromDynamo(surface);

            // check length of thickness
            if (thickness.Count != 3)
            {
                throw new System.ArgumentException("Thickness must contain exactly 3 items.");
            }

            // create shell
            Slab slab = Slab.Plate(identifier, material, region, shellEdgeConnection, shellEccentricity, shellOrthotropy, thickness);

            // set local x-axis
            if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                slab.SlabPart.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX);
            }

            // set local z-axis
            if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                slab.SlabPart.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ);
            }

            return(slab);
        }
Пример #4
0
        public static Slab Plate(Autodesk.DesignScript.Geometry.Surface surface, double thickness, Materials.Material material, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity shellEccentricity, [DefaultArgument("ShellOrthotropy.Default()")] ShellOrthotropy shellOrthotropy, [DefaultArgument("EdgeConnection.Default()")] EdgeConnection shellEdgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, string identifier = "P")
        {
            // create FlatSurface
            Geometry.Region region = Geometry.Region.FromDynamo(surface);

            // create Thickness object
            List <Thickness> _thickness = new List <Thickness>();

            _thickness.Add(new Thickness(region.CoordinateSystem.Origin, thickness));

            // create shell
            Slab slab = Slab.Plate(identifier, material, region, shellEdgeConnection, shellEccentricity, shellOrthotropy, _thickness);

            // set local x-axis
            if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                slab.SlabPart.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX);
            }

            // set local z-axis
            if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                slab.SlabPart.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ);
            }

            return(slab);
        }
Пример #5
0
        public static Slab Wall(Autodesk.DesignScript.Geometry.Surface surface, double thickness, Materials.Material material, [DefaultArgument("ShellEccentricity.Default()")] ShellEccentricity shellEccentricity, [DefaultArgument("ShellOrthotropy.Default()")] ShellOrthotropy shellOrthotropy, [DefaultArgument("EdgeConnection.Default()")] EdgeConnection shellEdgeConnection, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localX, [DefaultArgument("Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0,0,0)")] Autodesk.DesignScript.Geometry.Vector localZ, string identifier = "W")
        {
            // create FlatSurface
            Geometry.Region region = Geometry.Region.FromDynamo(surface);

            // create Thickness object
            List <Thickness> _thickness = new List <Thickness>();

            _thickness.Add(new Thickness(region.CoordinateSystem.Origin, thickness));

            // check if surface is vertical
            if (Math.Abs(region.CoordinateSystem.LocalZ.Z) > FemDesign.Tolerance.Point3d)
            {
                throw new System.ArgumentException("Wall is not vertical! Create plate instead.");
            }

            // create shell
            Slab slab = Slab.Wall(identifier, material, region, shellEdgeConnection, shellEccentricity, shellOrthotropy, _thickness);

            // set local x-axis
            if (!localX.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                slab.SlabPart.LocalX = FemDesign.Geometry.FdVector3d.FromDynamo(localX);
            }

            // set local z-axis
            if (!localZ.Equals(Autodesk.DesignScript.Geometry.Vector.ByCoordinates(0, 0, 0)))
            {
                slab.SlabPart.LocalZ = FemDesign.Geometry.FdVector3d.FromDynamo(localZ);
            }

            return(slab);
        }
Пример #6
0
        public static Slab Wall(string identifier, Materials.Material material, Geometry.Region region, EdgeConnection shellEdgeConnection, ShellEccentricity eccentricity, ShellOrthotropy orthotropy, List <Thickness> thickness)
        {
            // check if surface is vertical
            if (Math.Abs(region.CoordinateSystem.LocalZ.Z) > FemDesign.Tolerance.Point3d)
            {
                throw new System.ArgumentException("Wall is not vertical! Create plate instead.");
            }

            Slab._wallInstance++;
            SlabType type     = SlabType.Wall;
            string   name     = identifier + "." + Slab._wallInstance.ToString() + ".1";
            SlabPart slabPart = SlabPart.Define(name, region, thickness, material, shellEdgeConnection, eccentricity, orthotropy);
            Slab     shell    = new Slab(type, name, slabPart, material);

            return(shell);
        }
Пример #7
0
        public static Slab Plate(string identifier, Materials.Material material, Geometry.Region region, EdgeConnection shellEdgeConnection, ShellEccentricity eccentricity, ShellOrthotropy orthotropy, List <Thickness> thickness)
        {
            Slab._plateInstance++;
            SlabType type     = SlabType.Plate;
            string   name     = identifier + "." + Slab._plateInstance.ToString() + ".1";
            SlabPart slabPart = SlabPart.Define(name, region, thickness, material, shellEdgeConnection, eccentricity, orthotropy);
            Slab     shell    = new Slab(type, name, slabPart, material);

            return(shell);
        }
Пример #8
0
        /// <summary>
        /// Construct SlabPart with EdgeConnections.
        /// </summary>
        public static SlabPart Define(string name, Geometry.Region region, List <Thickness> thickness, Materials.Material material, EdgeConnection shellEdgeConnection, ShellEccentricity eccentricity, ShellOrthotropy orthotropy)
        {
            // add edgeConnections to region
            region.SetEdgeConnections(shellEdgeConnection);

            // construct new slabPart
            SlabPart slabPart = new SlabPart(name, region, thickness, material, eccentricity, orthotropy);

            // return
            return(slabPart);
        }
Пример #9
0
 /// <summary>
 /// Construct SlabPart.
 /// </summary>
 public SlabPart(string name, Geometry.Region region, List <Thickness> thickness, Materials.Material complexMaterial, ShellEccentricity alignment, ShellOrthotropy orthotropy)
 {
     this.EntityCreated();
     this.Name                    = name;
     this.Region                  = region;
     this.ComplexMaterial         = complexMaterial.Guid;
     this.Alignment               = alignment.Alignment;
     this.AlignOffset             = alignment.Eccentricity;
     this.OrthoAlfa               = orthotropy.OrthoAlfa;
     this.OrthoRatio              = orthotropy.OrthoRatio;
     this.EccentricityCalculation = alignment.EccentricityCalculation;
     this.EccentricityByCracking  = alignment.EccentricityByCracking;
     this.Thickness               = thickness;
     this.LocalPos                = region.CoordinateSystem.Origin;
     this._localX                 = region.CoordinateSystem.LocalX;
     this._localY                 = region.CoordinateSystem.LocalY;
     this.End = "";
 }
Пример #10
0
        /// <summary>
        /// Create a default concrete shell with panels using a continuous analytical model.
        /// </summary>
        /// <param name="region">Panel region.</param>
        /// <param name="externalEdgeConnection"></param>
        /// <param name="material"></param>
        /// <param name="section"></param>
        /// <param name="identifier">Name of shell.</param>
        /// <param name="orthotropy"></param>
        /// <param name="ecc"></param>
        /// <returns></returns>
        public static Panel DefaultContreteContinuous(Geometry.Region region, EdgeConnection externalEdgeConnection, Materials.Material material, Sections.Section section, string identifier, double orthotropy, ShellEccentricity ecc)
        {
            Geometry.FdPoint3d anchorPoint    = region.Contours[0].Edges[0].Points[0];
            InternalPanel      internalPanel  = new InternalPanel(region);
            InternalPanels     internalPanels = new InternalPanels(internalPanel);
            PanelType          type           = PanelType.Concrete;
            string             panelName      = "A";
            double             gap            = 0.003;
            bool externalMovingLocal          = externalEdgeConnection.MovingLocal;

            return(new Panel(region, anchorPoint, internalPanels, externalEdgeConnection, type, material, section, identifier, panelName, gap, orthotropy, ecc, externalMovingLocal));
        }
Пример #11
0
        /// <summary>
        /// Construct timber panel with "Continuous" analytical model.
        /// </summary>
        /// <param name="region">Region of shell containing panels.</param>
        /// <param name="anchorPoint"></param>
        /// <param name="internalPanels"></param>
        /// <param name="externalEdgeConnection">Default value for shell border EdgeConnections. Can be overwritten by EdgeConnection for each specific edge in Region.</param>
        /// <param name="timberApplicationData"></param>
        /// <param name="type">Type of panel.</param>
        /// <param name="identifier">Name of shell.</param>
        /// <param name="panelName">Name of panel.</param>
        /// <param name="gap">Gap between panels.</param>
        /// <param name="orthotropy">Orthotropy.</param>
        /// <param name="ecc">ShellEccentricity.</param>
        /// <param name="externalMovingLocal">EdgeConnection LCS changes along edge?</param>
        internal Panel(Geometry.Region region, Geometry.FdPoint3d anchorPoint, InternalPanels internalPanels, Materials.TimberPanelType timberApplicationData, EdgeConnection externalEdgeConnection, PanelType type, string identifier, string panelName, double gap, double orthotropy, ShellEccentricity ecc, bool externalMovingLocal, double panelWidth)
        {
            this.EntityCreated();

            // elements
            this.Region           = region;
            this.CoordinateSystem = region.CoordinateSystem;
            this.AnchorPoint      = anchorPoint;
            this.InternalPanels   = internalPanels;
            this.TimberPanelData  = timberApplicationData;

            // set external rigidity
            this.SetExternalEdgeConnections(externalEdgeConnection);

            // set internal rigidity - not relevant for a panel with continuous analytical model

            // attributes
            this.Type                    = type;
            this.Identifier              = identifier;
            this.PanelName               = panelName;
            this.Gap                     = gap;
            this.Alignment               = ecc.Alignment;
            this.AlignOffset             = ecc.Eccentricity;
            this.EccentricityCalculation = ecc.EccentricityCalculation;
            this.EccentricityByCracking  = ecc.EccentricityByCracking;
            this.ExternalMovingLocal     = externalMovingLocal;
            this.PanelWidth              = panelWidth;
        }
Пример #12
0
        /// <summary>
        /// Construct standard panel with "Continuous" analytical model.
        /// </summary>
        /// <param name="region">Region of shell containing panels.</param>
        /// <param name="localX">Direction of panels.</param>
        /// <param name="anchorPoint"></param>
        /// <param name="externalRigidity">Default value for shell border EdgeConnections. Can be overwritten by EdgeConnection for each specific edge in Region.</param>
        /// <param name="type">Type of panel.</param>
        /// <param name="complexMaterial">Guid reference to material.</param>
        /// <param name="complexSection">Guid reference to complex section.</param>
        /// <param name="identifier">Name of shell.</param>
        /// <param name="panelName">Name of panel.</param>
        /// <param name="gap">Gap between panels.</param>
        /// <param name="orthotropy">Orthotropy.</param>
        /// <param name="ecc">ShellEccentricity.</param>
        /// <param name="externalMovingLocal">EdgeConnection LCS changes along edge?</param>
        internal Panel(Geometry.Region region, Geometry.FdPoint3d anchorPoint, InternalPanels internalPanels, EdgeConnection externalEdgeConnection, PanelType type, Materials.Material material, Sections.Section section, string identifier, string panelName, double gap, double orthotropy, ShellEccentricity ecc, bool externalMovingLocal)
        {
            this.EntityCreated();

            // elements
            this.Region           = region;
            this.CoordinateSystem = region.CoordinateSystem;
            this.AnchorPoint      = anchorPoint;
            this.InternalPanels   = internalPanels;
            this.ExternalRigidity = externalEdgeConnection.Rigidity;

            // set edge connections
            this.SetExternalEdgeConnections(externalEdgeConnection);

            // attributes
            this.Type                    = type;
            this.Material                = material; // note that material and section are not added directly to complexMaterial and complexSection fields.
            this.Section                 = section;
            this.Identifier              = identifier;
            this.PanelName               = panelName;
            this.Gap                     = gap;
            this.Orthotropy              = orthotropy;
            this.Alignment               = ecc.Alignment;
            this.AlignOffset             = ecc.Eccentricity;
            this.EccentricityCalculation = ecc.EccentricityCalculation;
            this.EccentricityByCracking  = ecc.EccentricityByCracking;
            this.ExternalMovingLocal     = externalMovingLocal;
        }