示例#1
0
文件: U_Raud.cs 项目: 15831944/habile
 public bool Equals(U_Raud other)
 {
     if (other == null)
     {
         return(false);
     }
     return(this.A == other.A &&
            this.B == other.B &&
            this.C == other.C &&
            this.Diameter == other.Diameter &&
            this.Materjal == other.Materjal);
 }
        private bool U_side_handler(G.Point start, G.Point end, LineSegment ls)
        {
            G.Line side = new G.Line(start, end);
            if (side.Length() < _V_.Y_REINFORCEMENT_STIRRUP_RADIUS * 2)
            {
                return(false);
            }

            if (denier(side))
            {
                return(false);
            }

            //reinf_geometry_debug.Add(side);

            R.U_Raud cur = new R.U_Raud(side, _V_.Y_ELEMENT_WIDTH_COVER, 1, _V_.X_REINFORCEMENT_STIRRUP_DIAMETER, _V_.X_REINFORCEMENT_MARK);

            int currentIndex = knownArrayReinforcement.Count - 1;

            knownArrayReinforcement[currentIndex].add_one(cur);
            keep_array(cur, ls);

            return(true);
        }
示例#3
0
        private void setBendingBlockParameters(_Db.AttributeReference ar, R.Raud _ALFA_)
        {
            if (ar != null)
            {
                if (ar.Tag == "Teraseklass")
                {
                    ar.TextString = _ALFA_.Materjal.ToString();
                }
                if (ar.Tag == "Positsioon")
                {
                    ar.TextString = _ALFA_.ToStringNoCount();
                }

                if (_ALFA_ is R.A_Raud)
                {
                    R.A_Raud _BETA_ = _ALFA_ as R.A_Raud;
                    if (ar.Tag == "A")
                    {
                        ar.TextString = _BETA_.A.ToString();
                    }
                }

                if (_ALFA_ is R.B_Raud)
                {
                    R.B_Raud _BETA_ = _ALFA_ as R.B_Raud;
                    if (ar.Tag == "A")
                    {
                        ar.TextString = _BETA_.A.ToString();
                    }
                    else if (ar.Tag == "B")
                    {
                        ar.TextString = _BETA_.B.ToString();
                    }
                }

                if (_ALFA_ is R.C_Raud)
                {
                    R.C_Raud _BETA_ = _ALFA_ as R.C_Raud;
                    if (ar.Tag == "A")
                    {
                        ar.TextString = _BETA_.A.ToString();
                    }
                    else if (ar.Tag == "B")
                    {
                        ar.TextString = _BETA_.B.ToString();
                    }
                    else if (ar.Tag == "U")
                    {
                        ar.TextString = ((int)Math.Round(G.Converter.ToDeg(_BETA_.U), 0)).ToString();
                    }
                }

                if (_ALFA_ is R.D_Raud)
                {
                    R.D_Raud _BETA_ = _ALFA_ as R.D_Raud;
                    if (ar.Tag == "A")
                    {
                        ar.TextString = _BETA_.A.ToString();
                    }
                    else if (ar.Tag == "B")
                    {
                        ar.TextString = _BETA_.B2.ToString(); // parand magic
                    }
                    else if (ar.Tag == "C")
                    {
                        ar.TextString = _BETA_.C.ToString();
                    }
                }

                if (_ALFA_ is R.E_Raud)
                {
                    R.E_Raud _BETA_ = _ALFA_ as R.E_Raud;
                    if (ar.Tag == "A")
                    {
                        ar.TextString = _BETA_.A.ToString();
                    }
                    else if (ar.Tag == "B")
                    {
                        ar.TextString = _BETA_.B2.ToString(); // parand magic
                    }
                    else if (ar.Tag == "C")
                    {
                        ar.TextString = _BETA_.C.ToString();
                    }
                    else if (ar.Tag == "U")
                    {
                        ar.TextString = ((int)Math.Round(G.Converter.ToDeg(_BETA_.U), 0)).ToString();
                    }
                    else if (ar.Tag == "V")
                    {
                        ar.TextString = ((int)Math.Round(G.Converter.ToDeg(_BETA_.V), 0)).ToString();
                    }
                    else if (ar.Tag == "X")
                    {
                        ar.TextString = ((int)_BETA_.X).ToString();
                    }
                    else if (ar.Tag == "Y")
                    {
                        ar.TextString = ((int)_BETA_.Y).ToString();
                    }
                }

                if (_ALFA_ is R.U_Raud)
                {
                    R.U_Raud _BETA_ = _ALFA_ as R.U_Raud;
                    if (ar.Tag == "A")
                    {
                        ar.TextString = _BETA_.A.ToString();
                    }
                    else if (ar.Tag == "B")
                    {
                        ar.TextString = _BETA_.B.ToString();
                    }
                    else if (ar.Tag == "C")
                    {
                        ar.TextString = _BETA_.C.ToString();
                    }
                }
            }
        }
示例#4
0
        private void setReinforcementBlockParameters(_Db.BlockReference newBlockReference, R.Raud _ALFA_)
        {
            _Db.DynamicBlockReferencePropertyCollection aa = newBlockReference.DynamicBlockReferencePropertyCollection;
            foreach (_Db.DynamicBlockReferenceProperty a in aa)
            {
                if (a != null)
                {
                    if (_ALFA_ is R.A_Raud)
                    {
                        R.A_Raud _BETA_ = _ALFA_ as R.A_Raud;
                        if (a.PropertyName == "A")
                        {
                            a.Value = _BETA_.A;
                        }
                    }

                    else if (_ALFA_ is R.B_Raud)
                    {
                        R.B_Raud _BETA_ = _ALFA_ as R.B_Raud;
                        if (a.PropertyName == "A")
                        {
                            a.Value = _BETA_.A;
                        }
                        else if (a.PropertyName == "B")
                        {
                            a.Value = _BETA_.B;
                        }
                    }

                    else if (_ALFA_ is R.C_Raud)
                    {
                        R.C_Raud _BETA_ = _ALFA_ as R.C_Raud;
                        if (a.PropertyName == "A")
                        {
                            a.Value = _BETA_.A;
                        }
                        else if (a.PropertyName == "B")
                        {
                            a.Value = _BETA_.B;
                        }
                        else if (a.PropertyName == "U")
                        {
                            a.Value = Math.PI - _BETA_.U;                             // HERE
                        }
                    }

                    else if (_ALFA_ is R.D_Raud)
                    {
                        R.D_Raud _BETA_ = _ALFA_ as R.D_Raud;
                        if (a.PropertyName == "A")
                        {
                            a.Value = _BETA_.A;
                        }
                        else if (a.PropertyName == "B")
                        {
                            a.Value = _BETA_.B;
                        }
                        else if (a.PropertyName == "C")
                        {
                            a.Value = _BETA_.C;
                        }

                        else if (a.PropertyName == "A/C")
                        {
                            a.Value = _BETA_.A;
                        }
                    }

                    else if (_ALFA_ is R.E_Raud)
                    {
                        R.E_Raud _BETA_ = _ALFA_ as R.E_Raud;

                        if (a.PropertyName == "A")
                        {
                            a.Value = _BETA_.A;
                        }
                        else if (a.PropertyName == "B")
                        {
                            a.Value = _BETA_.B;
                        }
                        else if (a.PropertyName == "C")
                        {
                            a.Value = _BETA_.C;
                        }
                        else if (a.PropertyName == "U")
                        {
                            a.Value = Math.PI - _BETA_.U;                             // HERE
                        }
                        else if (a.PropertyName == "V")
                        {
                            if (_BETA_.B > 6000)
                            {
                                a.Value = _BETA_.V + Math.PI;
                            }
                            else
                            {
                                a.Value = _BETA_.V;
                            }
                        }
                        else if (a.PropertyName == "X")
                        {
                            a.Value = _BETA_.X;
                        }
                        else if (a.PropertyName == "Y")
                        {
                            a.Value = _BETA_.Y;
                        }
                    }
                    else if (_ALFA_ is R.U_Raud)
                    {
                        R.U_Raud _BETA_ = _ALFA_ as R.U_Raud;
                        if (a.PropertyName == "A")
                        {
                            a.Value = _BETA_.A;
                        }
                        else if (a.PropertyName == "B")
                        {
                            a.Value = _BETA_.B;
                        }
                        else if (a.PropertyName == "C")
                        {
                            a.Value = _BETA_.C;
                        }
                    }
                }
            }
        }