Esempio n. 1
0
        /***************************************************/

        public static Bar SetInsertionPoint(this Bar bar, BarInsertionPoint barInsertionPoint = BarInsertionPoint.Centroid, bool modifyStiffness = true)
        {
            return((Bar)bar.AddFragment(new InsertionPoint()
            {
                BarInsertionPoint = barInsertionPoint, ModifyStiffness = modifyStiffness
            }, true));
        }
Esempio n. 2
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static Bar SetInsertionPoint(this Bar bar, BarInsertionPoint barInsertionPoint = BarInsertionPoint.Centroid)
        {
            Bar clone = (Bar)bar.GetShallowClone();

            clone.CustomData["EtabsInsertionPoint"] = barInsertionPoint;

            return(clone);
        }
Esempio n. 3
0
        /***************************************************/

        private static void FlipInsertionPoint(Bar bar)
        {
            InsertionPoint fragment = bar.FindFragment <InsertionPoint>();

            if (fragment != null)
            {
                BarInsertionPoint insertionPoint = fragment.BarInsertionPoint;

                switch (insertionPoint)
                {
                case BarInsertionPoint.BottomLeft:
                    fragment.BarInsertionPoint = BarInsertionPoint.BottomRight;
                    break;

                case BarInsertionPoint.BottomRight:
                    fragment.BarInsertionPoint = BarInsertionPoint.BottomLeft;
                    break;

                case BarInsertionPoint.MiddleLeft:
                    fragment.BarInsertionPoint = BarInsertionPoint.MiddleRight;
                    break;

                case BarInsertionPoint.MiddleRight:
                    fragment.BarInsertionPoint = BarInsertionPoint.MiddleLeft;
                    break;

                case BarInsertionPoint.TopLeft:
                    fragment.BarInsertionPoint = BarInsertionPoint.TopRight;
                    break;

                case BarInsertionPoint.TopRight:
                    fragment.BarInsertionPoint = BarInsertionPoint.TopLeft;
                    break;

                default:
                    break;
                }
                bar.Fragments.AddOrReplace(fragment);
            }
        }
Esempio n. 4
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static Bar SetInsertionPoint(this Bar bar, BarInsertionPoint barInsertionPoint = BarInsertionPoint.Centroid)
        {
            return(bar.SetInsertionPoint(barInsertionPoint, true));
        }
Esempio n. 5
0
        public static bool BarModifyStiffnessInsertionPoint(this Bar bar)
        {
            BarInsertionPoint o = bar?.FindFragment <BarInsertionPoint>();

            return(o == null ? true : o.ModifyStiffness);
        }
Esempio n. 6
0
        public static BarInsertionPointLocation BarInsertionPoint(this Bar bar)
        {
            BarInsertionPoint o = bar?.FindFragment <BarInsertionPoint>();

            return(o == null ? BarInsertionPointLocation.Centroid : o.InsertionPoint);
        }