// Token: 0x060001BE RID: 446 RVA: 0x0000BF44 File Offset: 0x0000A144
        private static double GetRotZ(WireItem wire)
        {
            ItGeVector3d vec = wire.EndPoint - wire.StartPoint;
            double       num = ItGeVector3d.kXAxis.angleTo(vec, ItGeVector3d.kZAxis);

            num = SteelGroupElement.FixAngleRange(num, false);
            return(ItAngle.toDegree(num));
        }
        // Token: 0x0600022E RID: 558 RVA: 0x0000F4DC File Offset: 0x0000D6DC
        protected short GetUnitechnikAngleOfFreeForm(ItGeCurve3d first, out ItGeVector3d normal)
        {
            ItGeVector3d directionFromCurve = SteelGroupElementRebarBase.GetDirectionFromCurve(first);
            double       num = ItGeVector3d.kXAxis.angleTo(directionFromCurve, ItGeVector3d.kZAxis);

            normal = ItGeVector3d.kYAxis.rotateBy(num, ItGeVector3d.kZAxis);
            num    = SteelGroupElement.FixAngleRange(num, false);
            num    = ItAngle.toDegree(num);
            return((short)Math.Round(num, 0));
        }
        // Token: 0x0600021A RID: 538 RVA: 0x0000EC24 File Offset: 0x0000CE24
        private static double FixRotX(double angle, ref bool flipFutureYs)
        {
            angle = SteelGroupElement.FixAngleRange(angle, false);
            bool flag = Math.Abs(angle).Gt(1.5707963267948966, -1.0);

            if (flag)
            {
                angle       -= (double)Math.Sign(angle) * 3.1415926535897931;
                flipFutureYs = !flipFutureYs;
            }
            return(angle);
        }
        // Token: 0x0600020E RID: 526 RVA: 0x0000E48C File Offset: 0x0000C68C
        private void GetRotationsSimple(ItGeVector3d rebarPlaneNormal, ItSegment prevSegment, ItGeVector3d direction, ref bool flipFutureYs, out double rotX, out double bendY)
        {
            ItGeVector3d xvector = prevSegment.XVector;
            ItGeVector3d yvector = prevSegment.YVector;

            rotX = yvector.angleTo(rebarPlaneNormal, xvector);
            rotX = SteelGroupElementRebarBase.FixRotX(rotX, ref flipFutureYs);
            ItGeVector3d refVec = new ItGeVector3d(yvector).rotateBy(rotX, xvector);

            bendY = xvector.angleTo(direction, refVec);
            bendY = SteelGroupElement.FixAngleRange(bendY, flipFutureYs);
        }
        // Token: 0x0600020D RID: 525 RVA: 0x0000E42C File Offset: 0x0000C62C
        private void GetRotationComplex(ItGeVector3d rebarPlaneNormal, ItSegment prevSegment, ItGeVector3d direction, ref bool flipFutureYs, out double rotX, out double bendY)
        {
            ItGeVector3d xvector       = prevSegment.XVector;
            ItGeVector3d yvector       = prevSegment.YVector;
            ItGeVector3d itGeVector3d  = yvector.orthoProject(rebarPlaneNormal);
            ItGeVector3d itGeVector3d2 = direction.crossProduct(rebarPlaneNormal);

            rotX  = itGeVector3d.angleTo(itGeVector3d2, xvector);
            rotX  = SteelGroupElementRebarBase.FixRotX(rotX, ref flipFutureYs);
            bendY = xvector.angleTo(direction, itGeVector3d2);
            bendY = SteelGroupElement.FixAngleRange(bendY, flipFutureYs);
        }
예제 #6
0
        // Token: 0x060001D9 RID: 473 RVA: 0x0000CC6C File Offset: 0x0000AE6C
        private short GetUnitechnikAngleOfNextSegment(ItGeCurve3d thisCurve, ItGeCurve3d nextCurve, ItGeVector3d normal)
        {
            bool  flag = nextCurve == null;
            short result;

            if (flag)
            {
                result = 0;
            }
            else
            {
                ItGeVector3d directionFromCurve  = SteelGroupElementRebarBase.GetDirectionFromCurve(thisCurve);
                ItGeVector3d directionFromCurve2 = SteelGroupElementRebarBase.GetDirectionFromCurve(nextCurve);
                double       num = directionFromCurve.angleTo(directionFromCurve2, normal);
                num = SteelGroupElement.FixAngleRange(num, false);
                num = ItAngle.toDegree(num);
                short num2 = (short)Math.Round(num, 0);
                result = num2;
            }
            return(result);
        }