Пример #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);
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            Materials.CltPanelLibraryType cltPanelLibraryType = null;
            if (!DA.GetData("CltPanelLibraryType", ref cltPanelLibraryType))
            {
                return;
            }

            Materials.TimberFactors factors = null;
            if (!DA.GetData("TimberFactors", ref factors))
            {
                return;
            }

            bool shearCoupling = true, gluedNarrowSides = true;

            DA.GetData("ShearCoupling", ref shearCoupling);
            DA.GetData("GluedNarrowSides", ref gluedNarrowSides);

            FemDesign.Materials.TimberPanelType obj = new Materials.TimberPanelType(cltPanelLibraryType, factors, shearCoupling, gluedNarrowSides);

            DA.SetData(0, obj);
        }
Пример #3
0
        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);
        }
Пример #4
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;
        }