Пример #1
0
 public BeamProperties(WR_Material mat, string section, WR_ReleaseBeam3d stRel, WR_ReleaseBeam3d enRel)
 {
     _mat = mat;
     _stRel = stRel;
     _enRel = enRel;
     _section = CrossSectionFormString(section);
 }
Пример #2
0
 public BeamProperties()
 {
     _section = null;
     _stRel   = null;
     _enRel   = null;
     _mat     = null;
 }
Пример #3
0
 public BeamProperties()
 {
     _section = null;
     _stRel = null;
     _enRel = null;
     _mat = null;
 }
Пример #4
0
        /// <summary>
        /// Checks the releases so that at least one end is restrained in x-, y-, z- and xx.
        /// </summary>
        /// <param name="sr"></param>
        /// <param name="er"></param>
        /// <returns>True if check is ok, false if errors exist</returns>
        private bool CheckReleases(WR_ReleaseBeam3d sr, WR_ReleaseBeam3d er)
        {
            bool b = true;

            string log = "Error, one of the ends must be restrained. Both ends unrestrained in:\n";

            if (sr.GetX() == 0 && er.GetX() == 0)
            {
                log += "X-dir\n";
                b    = false;
            }
            if (sr.GetY() == 0 && er.GetY() == 0)
            {
                log += "Y-dir\n";
                b    = false;
            }
            if (sr.GetZ() == 0 && er.GetZ() == 0)
            {
                log += "Z-dir\n";
                b    = false;
            }
            if (sr.GetXX() == 0 && er.GetXX() == 0)
            {
                log += "Torsion\n";
                b    = false;
            }

            if (!b)
            {
                AddRuntimeMessage(GH_RuntimeMessageLevel.Error, log);
            }

            return(b);
        }
Пример #5
0
        static void Main(string[] args)
        {
            WR_Structure structure = new WR_Structure();

            WR_XSecRect rect = new WR_XSecRect(0.1, 0.1);

            WR_ReleaseBeam3d rel = new WR_ReleaseBeam3d(true, true, true, true, true, true);

            WR_XYZ x1 = new WR_XYZ(0, 0, 0);
            WR_XYZ x2 = new WR_XYZ(0, 1, 0);
            WR_XYZ x3 = new WR_XYZ(1, 1, 0);
            WR_XYZ x4 = new WR_XYZ(1, 0, 0);

            WR_Elem3dRcp rcp1 = new WR_Elem3dRcp(x1, x2, rel, rel, rect, 210000000000, 0.1, new WR_Vector(0, 1, 0));
            WR_Elem3dRcp rcp2 = new WR_Elem3dRcp(x2, x3, rel, rel, rect, 210000000000, 0.1, new WR_Vector(0, 1, 0));
            WR_Elem3dRcp rcp3 = new WR_Elem3dRcp(x3, x4, rel, rel, rect, 210000000000, 0.1, new WR_Vector(0, 1, 0));

            WR_Node3d n1 = new WR_Node3d(0, 0, 0);
            WR_Node3d n2 = new WR_Node3d(0, 1, 0);
            WR_Node3d n3 = new WR_Node3d(1, 1, 0);
            WR_Node3d n4 = new WR_Node3d(1, 0, 0);


            structure.AddNode(n1);
            structure.AddNode(n2);
            structure.AddNode(n3);
            structure.AddNode(n4);

            structure.AddElementRcp(rcp1);
            structure.AddElementRcp(rcp2);
            structure.AddElementRcp(rcp3);

            structure.Solve();
        }
Пример #6
0
 public BeamProperties(WR_Material mat, string section, WR_ReleaseBeam3d stRel, WR_ReleaseBeam3d enRel)
 {
     _mat     = mat;
     _stRel   = stRel;
     _enRel   = enRel;
     _section = CrossSectionFormString(section);
 }
Пример #7
0
 //public BeamProperties(double matStiff, double poison, string section, WR_ReleaseBeam3d stRel, WR_ReleaseBeam3d enRel)
 //{
 //
 //           _stRel = stRel;
 //           _enRel = enRel;
 //           _section = CrossSectionFormString(section);
 //       }
 public BeamProperties(BeamProperties other)
 {
     _mat = other._mat.Copy();
     _section = other._section;
     _stRel = other._stRel.Copy();
     _enRel = other._enRel.Copy();
 }
Пример #8
0
        //public BeamProperties(double matStiff, double poison, string section, WR_ReleaseBeam3d stRel, WR_ReleaseBeam3d enRel)
        //{
//
//           _stRel = stRel;
//           _enRel = enRel;
//           _section = CrossSectionFormString(section);
//       }

        public BeamProperties(BeamProperties other)
        {
            _mat     = other._mat.Copy();
            _section = other._section;
            _stRel   = other._stRel.Copy();
            _enRel   = other._enRel.Copy();
        }
Пример #9
0
        static void Main(string[] args)
        {
            WR_Structure structure = new WR_Structure();

            WR_XSecRect rect = new WR_XSecRect(0.1, 0.1);

            WR_ReleaseBeam3d rel = new WR_ReleaseBeam3d(true, true, true, true, true, true);

            WR_XYZ x1 = new WR_XYZ(0, 0, 0);
            WR_XYZ x2 = new WR_XYZ(0, 1, 0);
            WR_XYZ x3 = new WR_XYZ(1, 1, 0);
            WR_XYZ x4 = new WR_XYZ(1, 0, 0);

            WR_Elem3dRcp rcp1 = new WR_Elem3dRcp(x1, x2,rel,rel,rect,210000000000,0.1,new WR_Vector(0,1,0));
            WR_Elem3dRcp rcp2 = new WR_Elem3dRcp(x2, x3, rel, rel, rect, 210000000000, 0.1, new WR_Vector(0, 1, 0));
            WR_Elem3dRcp rcp3 = new WR_Elem3dRcp(x3, x4, rel, rel, rect, 210000000000, 0.1, new WR_Vector(0, 1, 0));

            WR_Node3d n1 = new WR_Node3d(0, 0, 0);
            WR_Node3d n2 = new WR_Node3d(0, 1, 0);
            WR_Node3d n3 = new WR_Node3d(1, 1, 0);
            WR_Node3d n4 = new WR_Node3d(1, 0, 0);

            structure.AddNode(n1);
            structure.AddNode(n2);
            structure.AddNode(n3);
            structure.AddNode(n4);

            structure.AddElementRcp(rcp1);
            structure.AddElementRcp(rcp2);
            structure.AddElementRcp(rcp3);

            structure.Solve();
        }
Пример #10
0
 public BeamProperties(WR_Material mat, WR_IXSec section, WR_ReleaseBeam3d stRel, WR_ReleaseBeam3d enRel, WR_Element3dOptProp elemOptProp)
 {
     _mat         = mat;
     _stRel       = stRel;
     _enRel       = enRel;
     _section     = section;
     _elemOptProp = elemOptProp;
 }
Пример #11
0
 public BeamProperties(WR_Material mat, WR_IXSec section, WR_ReleaseBeam3d stRel, WR_ReleaseBeam3d enRel, WR_Element3dOptProp elemOptProp)
 {
     _mat = mat;
     _stRel = stRel;
     _enRel = enRel;
     _section = section;
     _elemOptProp = elemOptProp;
 }
Пример #12
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            // string crossSection = "";
            WR_IXSec            xSec    = null;
            WR_ReleaseBeam3d    stREl   = null;
            WR_ReleaseBeam3d    enREl   = null;
            WR_Material         mat     = null;
            WR_Element3dOptProp optProp = null;

            if (!DA.GetData(0, ref xSec))
            {
                return;
            }
            if (!DA.GetData(1, ref stREl))
            {
                return;
            }
            if (!DA.GetData(2, ref enREl))
            {
                return;
            }
            if (!DA.GetData(3, ref mat))
            {
                return;
            }

            // Check releases
            if (!CheckReleases(stREl, enREl))
            {
                return;
            }

            BeamProperties beamProp;

            if (!DA.GetData(4, ref optProp))
            {
                beamProp = new BeamProperties(mat, xSec, stREl, enREl);
            }
            else
            {
                beamProp = new BeamProperties(mat, xSec, stREl, enREl, optProp);
            }


            DA.SetData(0, beamProp);
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            double x  = 0;
            double y  = 0;
            double z  = 0;
            double xx = 0;
            double yy = 0;
            double zz = 0;

            if (!DA.GetData(0, ref x))
            {
                return;
            }
            if (!DA.GetData(1, ref y))
            {
                return;
            }
            if (!DA.GetData(2, ref z))
            {
                return;
            }
            if (!DA.GetData(3, ref xx))
            {
                return;
            }
            if (!DA.GetData(4, ref yy))
            {
                return;
            }
            if (!DA.GetData(5, ref zz))
            {
                return;
            }



            WR_ReleaseBeam3d rel = new WR_ReleaseBeam3d(x, y, z, xx, yy, zz);

            DA.SetData(0, rel);
        }
Пример #14
0
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            bool x  = false;
            bool y  = false;
            bool z  = false;
            bool xx = false;
            bool yy = false;
            bool zz = false;

            if (!DA.GetData(0, ref x))
            {
                return;
            }
            if (!DA.GetData(1, ref y))
            {
                return;
            }
            if (!DA.GetData(2, ref z))
            {
                return;
            }
            if (!DA.GetData(3, ref xx))
            {
                return;
            }
            if (!DA.GetData(4, ref yy))
            {
                return;
            }
            if (!DA.GetData(5, ref zz))
            {
                return;
            }

            WR_ReleaseBeam3d rel = new WR_ReleaseBeam3d(x, y, z, xx, yy, zz);

            DA.SetData(0, rel);
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            bool x = false;
            bool y = false;
            bool z = false;
            bool xx = false;
            bool yy = false;
            bool zz = false;

            if (!DA.GetData(0, ref x)) { return; }
            if (!DA.GetData(1, ref y)) { return; }
            if (!DA.GetData(2, ref z)) { return; }
            if (!DA.GetData(3, ref xx)) { return; }
            if (!DA.GetData(4, ref yy)) { return; }
            if (!DA.GetData(5, ref zz)) { return; }

            WR_ReleaseBeam3d rel = new WR_ReleaseBeam3d(x, y, z, xx, yy, zz);

            DA.SetData(0, rel);
        }
        /// <summary>
        /// Checks the releases so that at least one end is restrained in x-, y-, z- and xx.
        /// </summary>
        /// <param name="sr"></param>
        /// <param name="er"></param>
        /// <returns>True if check is ok, false if errors exist</returns>
        private bool CheckReleases(WR_ReleaseBeam3d sr, WR_ReleaseBeam3d er)
        {
            bool b = true;

            string log = "Error, one of the ends must be restrained. Both ends unrestrained in:\n";

            if (sr.GetX() == 0 && er.GetX() == 0)
            {
                log += "X-dir\n";
                b = false;
            }
            if (sr.GetY() == 0 && er.GetY() == 0)
            {
                log += "Y-dir\n";
                b = false;
            }
            if (sr.GetZ() == 0 && er.GetZ() == 0)
            {
                log += "Z-dir\n";
                b = false;
            }
            if (sr.GetXX() == 0 && er.GetXX() == 0)
            {
                log += "Torsion\n";
                b = false;
            }

            if (!b)
                AddRuntimeMessage(GH_RuntimeMessageLevel.Error, log);

            return b;
        }
        protected override void SolveInstance(IGH_DataAccess DA)
        {
            double x = 0;
            double y = 0;
            double z = 0;
            double xx = 0;
            double yy = 0;
            double zz = 0;

            if (!DA.GetData(0, ref x)) { return; }
            if (!DA.GetData(1, ref y)) { return; }
            if (!DA.GetData(2, ref z)) { return; }
            if (!DA.GetData(3, ref xx)) { return; }
            if (!DA.GetData(4, ref yy)) { return; }
            if (!DA.GetData(5, ref zz)) { return; }

            WR_ReleaseBeam3d rel = new WR_ReleaseBeam3d(x, y, z, xx, yy, zz);

            DA.SetData(0, rel);
        }