// Token: 0x06000210 RID: 528 RVA: 0x0000E648 File Offset: 0x0000C848
        private ItSegment GetSegmentFromLineSeg(ItBar xmlBar, ItSegment prevSegment, ItGeLineSeg3d lineSeg, ItGeCurve3d nextCurve, ref bool flipFutureYs)
        {
            ItGeVector3d itGeVector3d  = lineSeg.direction();
            ItGeVector3d xvector       = prevSegment.XVector;
            ItGeVector3d itGeVector3d2 = itGeVector3d.orthoProject(xvector);
            double       num;
            double       num2;

            this.GetRotationsInDegree(xmlBar.CurrentNormal, prevSegment, itGeVector3d, ref flipFutureYs, out num, out num2);
            this.SetCurrentNormal(xmlBar, num, num2, prevSegment);
            ItGeVector3d xAxis;
            ItGeVector3d yAxis;
            ItGeVector3d zAxis;

            this.GetNewDirections(num, num2, prevSegment, out xAxis, out yAxis, out zAxis);
            double len = lineSeg.len;
            double r   = 0.0;

            num  = Math.Round(num, 10);
            num2 = Math.Round(num2, 10);
            ItGeMatrix3d kIdentity = ItGeMatrix3d.kIdentity;

            kIdentity.setCoordSystem(ItGePoint3d.kOrigin, xAxis, yAxis, zAxis);
            ItSegment itSegment = new ItSegment(len, r, num, num2, kIdentity, "normal");

            this.FixSegmentLength(itSegment, nextCurve);
            return(itSegment);
        }
        // Token: 0x06000209 RID: 521 RVA: 0x0000E100 File Offset: 0x0000C300
        private ItSegment CreateSegment(ItBar xmlBar, ItSegment prevSegment, ItGeCurve3d curve, ItGeCurve3d nextCurve, ref bool flipFutureYs, out ItSegment additionalSegment)
        {
            additionalSegment = null;
            ItGeLineSeg3d itGeLineSeg3d = curve as ItGeLineSeg3d;
            ItGeCircArc3d itGeCircArc3d = curve as ItGeCircArc3d;
            bool          flag          = itGeLineSeg3d != null;
            ItSegment     result;

            if (flag)
            {
                result = this.GetSegmentFromLineSeg(xmlBar, prevSegment, itGeLineSeg3d, nextCurve, ref flipFutureYs);
            }
            else
            {
                bool flag2 = itGeCircArc3d != null;
                if (flag2)
                {
                    result = this.GetSegmentFromCircArc(xmlBar, prevSegment, itGeCircArc3d, ref flipFutureYs, out additionalSegment);
                }
                else
                {
                    result = null;
                }
            }
            return(result);
        }
        // Token: 0x06000207 RID: 519 RVA: 0x0000E08C File Offset: 0x0000C28C
        private ItSegment CreateFirstSegment(List <ItGeCurve3d> rebarList, ItBar xmlBar, ItGeCurve3d firstCurve, ItGeCurve3d nextCurve, ref bool flipFutureYs, out ItSegment additionalSegment)
        {
            additionalSegment = null;
            ItGeVector3d  rebarElementNormal         = this.GetRebarElementNormal();
            ItGeVector3d  normalFromFirstTwoSegments = SteelGroupElementRebarBase.GetNormalFromFirstTwoSegments(rebarList, rebarElementNormal);
            ItGeLineSeg3d itGeLineSeg3d = firstCurve as ItGeLineSeg3d;
            ItGeCircArc3d itGeCircArc3d = firstCurve as ItGeCircArc3d;
            bool          flag          = itGeLineSeg3d != null;
            ItSegment     result;

            if (flag)
            {
                result = this.GetFirstSegFromLineSeg(xmlBar, itGeLineSeg3d, normalFromFirstTwoSegments, nextCurve, ref flipFutureYs);
            }
            else
            {
                bool flag2 = itGeCircArc3d != null;
                if (flag2)
                {
                    result = this.GetFirstSegFromCircArc(xmlBar, itGeCircArc3d, normalFromFirstTwoSegments, ref flipFutureYs, out additionalSegment);
                }
                else
                {
                    result = null;
                }
            }
            return(result);
        }
        // Token: 0x06000214 RID: 532 RVA: 0x0000E8A4 File Offset: 0x0000CAA4
        public static ItGeVector3d GetNormalFromTwoSegments(ItGeCurve3d firstCurve, ItGeCurve3d nextCurve)
        {
            ItGeCircArc3d itGeCircArc3d = firstCurve as ItGeCircArc3d;
            ItGeLineSeg3d itGeLineSeg3d = firstCurve as ItGeLineSeg3d;
            bool          flag          = itGeCircArc3d != null;
            ItGeVector3d  result;

            if (flag)
            {
                result = itGeCircArc3d.normal();
            }
            else
            {
                ItGeVector3d  itGeVector3d   = itGeLineSeg3d.direction();
                ItGeCircArc3d itGeCircArc3d2 = nextCurve as ItGeCircArc3d;
                ItGeLineSeg3d itGeLineSeg3d2 = nextCurve as ItGeLineSeg3d;
                bool          flag2          = itGeCircArc3d2 != null;
                if (flag2)
                {
                    ItGeVector3d itGeVector3d2 = itGeCircArc3d2.normal();
                    ItGePlane    itGePlane     = new ItGePlane(ItGePoint3d.kOrigin, itGeVector3d2);
                    ItGePoint3d  itGePoint3d;
                    bool         flag3 = itGePlane.intersectWith(itGeLineSeg3d, out itGePoint3d, null);
                    if (flag3)
                    {
                        result = ItGeVector3d.kYAxis;
                    }
                    else
                    {
                        result = itGeVector3d2;
                    }
                }
                else
                {
                    bool flag4 = itGeLineSeg3d2 != null;
                    if (flag4)
                    {
                        ItGeVector3d vec           = itGeLineSeg3d2.direction();
                        ItGeVector3d itGeVector3d3 = itGeVector3d.crossProduct(vec);
                        bool         flag5         = itGeVector3d3.length().Gt(0.0, -1.0);
                        if (flag5)
                        {
                            return(itGeVector3d3);
                        }
                    }
                    result = null;
                }
            }
            return(result);
        }
        // Token: 0x0600022D RID: 557 RVA: 0x0000F48C File Offset: 0x0000D68C
        protected static ItGeVector3d GetDirectionFromCurve(ItGeCurve3d curve)
        {
            ItGeLineSeg3d itGeLineSeg3d = curve as ItGeLineSeg3d;
            ItGeCircArc3d itGeCircArc3d = curve as ItGeCircArc3d;
            bool          flag          = itGeLineSeg3d != null;
            ItGeVector3d  result;

            if (flag)
            {
                result = itGeLineSeg3d.direction();
            }
            else
            {
                ItGeLine3d itGeLine3d;
                itGeCircArc3d.tangent(itGeCircArc3d.startPoint(), out itGeLine3d, null);
                result = itGeLine3d.direction();
            }
            return(result);
        }
        // Token: 0x0600020B RID: 523 RVA: 0x0000E310 File Offset: 0x0000C510
        private ItSegment GetFirstSegFromLineSeg(ItBar xmlBar, ItGeLineSeg3d firstSeg, ItGeVector3d xzPlaneNormal, ItGeCurve3d nextCurve, ref bool flipFutureYs)
        {
            ItGeVector3d direction    = firstSeg.direction();
            ItSegment    startSegment = this.GetStartSegment(xmlBar);
            double       num;
            double       num2;

            this.GetRotationsInDegree(xzPlaneNormal, startSegment, direction, ref flipFutureYs, out num, out num2);
            this.SetCurrentNormal(xmlBar, num, num2, startSegment);
            ItGeVector3d xAxis;
            ItGeVector3d yAxis;
            ItGeVector3d zAxis;

            this.GetNewDirections(num, num2, startSegment, out xAxis, out yAxis, out zAxis);
            double       len       = firstSeg.len;
            ItGeMatrix3d kIdentity = ItGeMatrix3d.kIdentity;

            kIdentity.setCoordSystem(ItGePoint3d.kOrigin, xAxis, yAxis, zAxis);
            ItSegment itSegment = new ItSegment(len, 0.0, Math.Round(num, 10), Math.Round(num2, 10), kIdentity, "normal");

            this.FixSegmentLength(itSegment, nextCurve);
            return(itSegment);
        }
        // Token: 0x06000213 RID: 531 RVA: 0x0000E800 File Offset: 0x0000CA00
        public static ItGeVector3d GetNormalFromFirstTwoSegments(List <ItGeCurve3d> rebarList, ItGeVector3d defaultValue)
        {
            bool         flag = rebarList.Count < 2;
            ItGeVector3d result;

            if (flag)
            {
                result = defaultValue;
            }
            else
            {
                ItGeCircArc3d itGeCircArc3d = rebarList[0] as ItGeCircArc3d;
                ItGeLineSeg3d firstCurve    = rebarList[0] as ItGeLineSeg3d;
                bool          flag2         = itGeCircArc3d != null;
                if (flag2)
                {
                    result = itGeCircArc3d.normal();
                }
                else
                {
                    int num;
                    for (int i = 1; i < rebarList.Count; i = num + 1)
                    {
                        ItGeCurve3d  nextCurve             = rebarList[i];
                        ItGeVector3d normalFromTwoSegments = SteelGroupElementRebarBase.GetNormalFromTwoSegments(firstCurve, nextCurve);
                        bool         flag3 = normalFromTwoSegments != null;
                        if (flag3)
                        {
                            return(normalFromTwoSegments);
                        }
                        num = i;
                    }
                    result = ItGeVector3d.kYAxis;
                }
            }
            return(result);
        }
Пример #8
0
        // Token: 0x06000046 RID: 70 RVA: 0x00003F84 File Offset: 0x00002184
        public bool isSimilarTypeAs(ItBracedGirderData otherGirderData)
        {
            bool flag = otherGirderData.isNull() || this == otherGirderData;
            bool result;

            if (flag)
            {
                result = false;
            }
            else
            {
                bool flag2 = this.famInst.Element.Symbol.Id != otherGirderData.famInst.Element.Symbol.Id || !this.midline.isParallelTo(otherGirderData.midline, null) || this.midline.length().Ne(otherGirderData.midline.length(), -1.0);
                if (flag2)
                {
                    result = false;
                }
                else
                {
                    ItGeLineSeg3d line = new ItGeLineSeg3d(this.midline.midPoint, otherGirderData.midline.midPoint);
                    result = this.midline.isPerpendicularTo(line, null);
                }
            }
            return(result);
        }