// Token: 0x060001C9 RID: 457 RVA: 0x0000C14C File Offset: 0x0000A34C
        internal override void WriteToPXML(ItSteel steelBlock, ICollection <ExportReinfData> exportedElements)
        {
            ItBracedGirderData itBracedGirderData = new ItBracedGirderData(this.Girder, base.MatWcsToPalette, 0.0);

            ItBracedGirderData.DataInFeet cncdata = itBracedGirderData.GetCNCData(1, base.MinZ);
            ItGirder itGirder = new ItGirder();

            itGirder.PieceCount   = 1;
            itGirder.X            = steelBlock.OffsetX(cncdata.X);
            itGirder.Y            = steelBlock.OffsetY(cncdata.Y);
            itGirder.Z            = steelBlock.OffsetZ(cncdata.InstallationHeight);
            itGirder.GirderName   = this.Girder.Element.Name;
            itGirder.Length       = cncdata.Length;
            itGirder.AngleToX     = Math.Round(ItAngle.toDegree(cncdata.Angle), 10);
            itGirder.Height       = cncdata.Height;
            itGirder.Weight       = cncdata.Weight;
            itGirder.GirderType   = 0;
            itGirder.MountingType = 0;
            itGirder.Width        = 0.0;
            steelBlock.girderList.Add(itGirder);
            exportedElements.Add(new ExportReinfData
            {
                Id         = this.Girder.Id,
                ExportedAs = ExportReinfData.ExportType.AsGirder
            });
        }
        // Token: 0x06000212 RID: 530 RVA: 0x0000E798 File Offset: 0x0000C998
        private void SetCurrentNormal(ItBar xmlBar, double rotX, double bendY, ItSegment prevSegment)
        {
            rotX  = ItAngle.toRad(rotX);
            bendY = ItAngle.toRad(bendY);
            ItGeVector3d vec = new ItGeVector3d(prevSegment.YVector).rotateBy(rotX, prevSegment.XVector);

            xmlBar.CurrentNormal = xmlBar.CurrentNormal.rotateBy(rotX, prevSegment.XVector).rotateBy(bendY, -1.0 * vec);
        }
        // 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: 0x06000211 RID: 529 RVA: 0x0000E708 File Offset: 0x0000C908
 private void GetNewDirections(double rotX, double bendY, ItSegment prevSegment, out ItGeVector3d newPrevX, out ItGeVector3d newPrevY, out ItGeVector3d newPrevZ)
 {
     rotX     = ItAngle.toRad(rotX);
     bendY    = ItAngle.toRad(bendY);
     newPrevY = new ItGeVector3d(prevSegment.YVector).rotateBy(rotX, prevSegment.XVector);
     newPrevX = new ItGeVector3d(prevSegment.XVector).rotateBy(bendY, -1.0 * newPrevY);
     newPrevZ = new ItGeVector3d(prevSegment.ZVector).rotateBy(rotX, prevSegment.XVector).rotateBy(bendY, -1.0 * newPrevY);
 }
        // 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: 0x0600020A RID: 522 RVA: 0x0000E160 File Offset: 0x0000C360
        private ItSegment GetFirstSegFromCircArc(ItBar xmlBar, ItGeCircArc3d firstCirc, ItGeVector3d xzPlaneNormal, ref bool flipFutureYs, out ItSegment additionalSegment)
        {
            ItGeLine3d itGeLine3d;

            firstCirc.tangent(firstCirc.startPoint(), out itGeLine3d, null);
            ItGeVector3d itGeVector3d = itGeLine3d.direction().negate();
            ItSegment    startSegment = this.GetStartSegment(xmlBar);
            double       num;
            double       num2;

            this.GetRotationsInDegree(xzPlaneNormal, startSegment, itGeVector3d, ref flipFutureYs, out num, out num2);
            ItGeVector3d itGeVector3d2;
            ItGeVector3d yAxis;
            ItGeVector3d zAxis;

            this.GetNewDirections(num, num2, startSegment, out itGeVector3d2, out yAxis, out zAxis);
            this.SetCurrentNormal(xmlBar, num, num2, startSegment);
            ItDebug.assert(itGeVector3d2.isCodirectionalTo(itGeVector3d, null), "Failure in: ");
            double       l         = 0.0;
            double       r         = 0.0;
            double       rotX      = Math.Round(num, 10);
            double       bendY     = Math.Round(num2, 10);
            ItGeMatrix3d kIdentity = ItGeMatrix3d.kIdentity;

            kIdentity.setCoordSystem(ItGePoint3d.kOrigin, itGeVector3d, yAxis, zAxis);
            additionalSegment = new ItSegment(l, r, rotX, bendY, kIdentity, "normal");
            double circleSign = this.GetCircleSign(xmlBar, firstCirc);
            double num3;
            double num4;

            this.GetRotationsInDegree(xzPlaneNormal, additionalSegment, itGeVector3d, ref flipFutureYs, out num3, out num4);
            ItGeVector3d itGeVector3d3;
            ItGeVector3d itGeVector3d4;
            ItGeVector3d itGeVector3d5;

            this.GetNewDirections(num3, 0.0, startSegment, out itGeVector3d3, out itGeVector3d4, out itGeVector3d5);
            this.SetCurrentNormal(xmlBar, num3, 0.0, additionalSegment);
            double num5 = this.GetCentralAngleWithSign(firstCirc, circleSign);

            num5 = ItAngle.toDegree(num5);
            ItGeLine3d itGeLine3d2;

            firstCirc.tangent(firstCirc.startPoint(), out itGeLine3d2, null);
            ItGeVector3d itGeVector3d6 = itGeLine3d2.direction();
            ItGeVector3d zAxis2        = itGeVector3d6.crossProduct(xzPlaneNormal);
            double       l2            = 0.0;
            double       r2            = firstCirc.radius();
            double       rotX2         = Math.Round(num3, 10);
            double       bendY2        = Math.Round(num5, 10);

            kIdentity = ItGeMatrix3d.kIdentity;
            kIdentity.setCoordSystem(ItGePoint3d.kOrigin, itGeVector3d6, xzPlaneNormal, zAxis2);
            return(new ItSegment(l2, r2, rotX2, bendY2, kIdentity, "normal"));
        }
        // Token: 0x0600020C RID: 524 RVA: 0x0000E3B8 File Offset: 0x0000C5B8
        private void GetRotationsInDegree(ItGeVector3d rebarPlaneNormal, ItSegment prevSegment, ItGeVector3d direction, ref bool flipFutureYs, out double rotX, out double bendY)
        {
            double a    = rebarPlaneNormal.dotProduct(prevSegment.XVector);
            bool   flag = a.Eq(0.0, -1.0);

            if (flag)
            {
                this.GetRotationsSimple(rebarPlaneNormal, prevSegment, direction, ref flipFutureYs, out rotX, out bendY);
            }
            else
            {
                this.GetRotationComplex(rebarPlaneNormal, prevSegment, direction, ref flipFutureYs, out rotX, out bendY);
            }
            rotX  = ItAngle.toDegree(rotX);
            bendY = ItAngle.toDegree(bendY);
        }
        // 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);
        }
        // Token: 0x0600020F RID: 527 RVA: 0x0000E4EC File Offset: 0x0000C6EC
        private ItSegment GetSegmentFromCircArc(ItBar xmlBar, ItSegment prevSegment, ItGeCircArc3d circArc, ref bool flipFutureYs, out ItSegment additionalSegment)
        {
            additionalSegment = null;
            ItGeLine3d itGeLine3d  = null;
            ItGeLine3d itGeLine3d2 = null;
            bool       flag        = !circArc.tangent(circArc.endPoint(), out itGeLine3d, null) || !circArc.tangent(circArc.startPoint(), out itGeLine3d2, null);
            ItSegment  result;

            if (flag)
            {
                result = null;
            }
            else
            {
                ItGeVector3d itGeVector3d = (itGeLine3d2 != null) ? itGeLine3d2.direction().negate() : prevSegment.XVector;
                this.GetAdditionalSegment(xmlBar, prevSegment, out additionalSegment, itGeVector3d, ref flipFutureYs);
                ItGeVector3d rebarPlaneNormal = circArc.normal();
                double       num;
                double       num2;
                this.GetRotationsInDegree(rebarPlaneNormal, additionalSegment ?? prevSegment, itGeVector3d, ref flipFutureYs, out num, out num2);
                this.SetCurrentNormal(xmlBar, num, 0.0, additionalSegment ?? prevSegment);
                double circleSign = this.GetCircleSign(xmlBar, circArc);
                double num3       = this.GetCentralAngleWithSign(circArc, circleSign);
                num3 = ItAngle.toDegree(num3);
                ItGeVector3d itGeVector3d2 = -1.0 * itGeLine3d.direction();
                ItGeVector3d itGeVector3d3 = circleSign * circArc.normal();
                ItGeVector3d zAxis         = itGeVector3d2.crossProduct(itGeVector3d3);
                double       l             = 0.0;
                double       r             = circArc.radius();
                num = Math.Round(num, 10);
                double       bendY     = Math.Round(num3, 10);
                ItGeMatrix3d kIdentity = ItGeMatrix3d.kIdentity;
                kIdentity.setCoordSystem(ItGePoint3d.kOrigin, itGeVector3d2, itGeVector3d3, zAxis);
                ItSegment itSegment = new ItSegment(l, r, num, bendY, kIdentity, "normal");
                result = itSegment;
            }
            return(result);
        }
Beispiel #10
0
        // Token: 0x06000044 RID: 68 RVA: 0x00003DE8 File Offset: 0x00001FE8
        public void setParametersForUnitechnik(int[] iParameters, int count, double offset, double x, double y)
        {
            bool flag = iParameters.isNull() || iParameters.Length != 10;

            if (flag)
            {
                ItDebug.assert(false, "Input parameter ");
            }
            else
            {
                ItBracedGirderData.DataInFeet cncdata = this.GetCNCData(count, offset);
                iParameters[0] = cncdata.Count;
                iParameters[1] = CNCDataBase.convertToMM(cncdata.Length);
                iParameters[2] = CNCDataBase.convertToMM(x);
                iParameters[3] = CNCDataBase.convertToMM(y);
                iParameters[4] = CNCDataBase.convertToMM(cncdata.Offset);
                iParameters[5] = (int)ItAngle.toDegree(cncdata.Angle);
                iParameters[6] = CNCDataBase.convertToMM(cncdata.Height);
                iParameters[7] = CNCDataBase.convertToMM(cncdata.Diameter);
                iParameters[8] = (int)(cncdata.Weight * 1000.0);
                iParameters[9] = CNCDataBase.convertToMM(cncdata.InstallationHeight);
            }
        }