Пример #1
0
        private void ValidateCollection(ConnectionInfo key, Line secondary)
        {
            var pos   = key.Primary.ObjSource.Position.Rotation.ToString();
            var axis  = secondary.Type;
            var pair1 = new ConnectionSetting
            {
                IsChecked          = true,
                IsSingleConnection = true,
                PrimaryObject      = key.Primary.ObjSource,
                PrimaryId          = key.PrimaryId,
                SecondaryObject    = secondary.ObjSource,
                SecondaryId        = secondary.Id,
                SecondaryObjects   = null,
                ConnectingObjects  = GetConnectedObjects(key.PrimaryId.ToString(), secondary.Id.ToString())
            };

            //AddToCollection(key.PrimaryType, pair1);
            if (key.PrimaryType == "BEAM")
            {
                pair1.ConnectionType = "B2BW";
                BeamToBeamWebColl.Add(pair1);
            }
            else
            {
                if ((axis == LineType.Vertical && pos == "TOP") || (axis == LineType.Horizontal && pos == "FRONT"))
                {
                    pair1.ConnectionType = "B2CW";
                    BeamToColumnWebColl.Add(pair1);
                }
                else
                {
                    pair1.ConnectionType = "B2CF";
                    BeamToColumnFlangeColl.Add(pair1);
                }
                //pair1.ConnectionType = "B2CF";
                //BeamToColumnFlangeColl.Add(pair1);
            }
        }
Пример #2
0
        private void ValidateCollection(ConnectionInfo key, ArrayList arr)
        {
            var multiCon = new ConnectionSetting
            {
                IsChecked          = true,
                IsSingleConnection = false,
                PrimaryObject      = key.Primary.ObjSource,
                PrimaryId          = key.PrimaryId,
                SecondaryIds       = ParseSecondaryIds(arr),
                SecondaryObject    = null,
                SecondaryObjects   = arr,
                ConnectingObjects  = GetConnectedObjects(key.PrimaryId.ToString(), $"{((Beam)arr[0]).Identifier.ID.ToString()} >>> {((Beam)arr[1]).Identifier.ID.ToString()}")
            };

            var pair1 = new ConnectionSetting
            {
                IsChecked          = true,
                IsSingleConnection = true,
                PrimaryObject      = key.Primary.ObjSource,
                PrimaryId          = key.PrimaryId,
                SecondaryObject    = arr[0],
                SecondaryId        = ((Beam)arr[0]).Identifier.ID,
                SecondaryObjects   = null,
                ConnectingObjects  = GetConnectedObjects(key.PrimaryId.ToString(), ((Beam)arr[0]).Identifier.ID.ToString())
            };

            var pair2 = new ConnectionSetting
            {
                IsChecked          = true,
                IsSingleConnection = true,
                PrimaryObject      = key.Primary.ObjSource,
                PrimaryId          = key.PrimaryId,
                SecondaryObject    = arr[1],
                SecondaryId        = ((Beam)arr[1]).Identifier.ID,
                SecondaryObjects   = null,
                ConnectingObjects  = GetConnectedObjects(key.PrimaryId.ToString(), ((Beam)arr[1]).Identifier.ID.ToString())
            };

            //AddToCollection(key.PrimaryType, multiCon, pair1, pair2);

            if (key.PrimaryType == "BEAM")
            {
                //multiCon.ConnectionType = "B2BW";
                //BeamToBeamWebColl.Add(multiCon);

                multiCon.ConnectionType = "B2BWD";
                BeamToBeamWebDoubleColl.Add(multiCon);

                pair1.ConnectionType = "B2BW";
                BeamToBeamWebColl.Add(pair1);

                pair2.ConnectionType = "B2BW";
                BeamToBeamWebColl.Add(pair2);
            }
            else
            {
                //multiCon.ConnectionType = "B2CW";
                //BeamToColumnWebColl.Add(multiCon);

                multiCon.ConnectionType = "B2CWD";
                BeamToColumnWebDoubleColl.Add(multiCon);

                pair1.ConnectionType = "B2CW";
                BeamToColumnWebColl.Add(pair1);

                pair2.ConnectionType = "B2CW";
                BeamToColumnWebColl.Add(pair2);
            }
        }