// 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);
        }
        // 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: 0x06000226 RID: 550 RVA: 0x0000F1DC File Offset: 0x0000D3DC
        private static double GetDistributionDirectionSign(ItGeVector3d distributionDirection, short angle)
        {
            bool   flag = distributionDirection.isCodirectionalTo(ItGeVector3d.kXAxis, null) || distributionDirection.isCodirectionalTo(ItGeVector3d.kYAxis, null);
            double num;

            if (flag)
            {
                num = 1.0;
            }
            else
            {
                bool flag2 = distributionDirection.isCodirectionalTo(-ItGeVector3d.kXAxis, null) || distributionDirection.isCodirectionalTo(-ItGeVector3d.kYAxis, null);
                if (flag2)
                {
                    num = -1.0;
                }
                else
                {
                    num = 0.0;
                }
            }
            return(num * ((angle == 0) ? 1.0 : ((double)Math.Sign(angle))));
        }
        // 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);
        }
        // Token: 0x060001DC RID: 476 RVA: 0x0000CDC8 File Offset: 0x0000AFC8
        private bool HasZDistribution()
        {
            bool result = false;
            bool flag   = this.Rebar.Element.LayoutRule > 0;

            if (flag)
            {
                RebarShapeDrivenAccessor rebarShapeDrivenAccessor = null;
                bool flag2 = !this.Rebar.Element.GetShapeAccessor(out rebarShapeDrivenAccessor);
                if (flag2)
                {
                    return(result);
                }
                ItGeVector3d itGeVector3d = rebarShapeDrivenAccessor.GetDistributionPath().Direction.asVector();
                itGeVector3d.transformBy(base.MatWcsToPalette);
                double dX    = itGeVector3d.dotProduct(ItGeVector3d.kZAxis);
                bool   flag3 = dX.Ne(0.0, -1.0);
                if (flag3)
                {
                    result = true;
                }
            }
            return(result);
        }
 // 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);
 }
Esempio n. 8
0
        // Token: 0x060001A9 RID: 425 RVA: 0x0000BC54 File Offset: 0x00009E54
        private ItGePoint3d TransformToPalette(ItGePoint3d point)
        {
            ItGeVector3d vec = base.PosPalette.asVector();

            return(point + vec);
        }
Esempio n. 9
0
        // Token: 0x0600019B RID: 411 RVA: 0x0000B580 File Offset: 0x00009780
        private static bool getDirections(List <WireItem> wireItemsMajor, List <WireItem> wireItemsMinor, out ItGeVector3d xVector, out ItGeVector3d yVector, out ItGeVector3d normal)
        {
            xVector = ItGeVector3d.kOrigin;
            yVector = ItGeVector3d.kOrigin;
            normal  = ItGeVector3d.kOrigin;
            bool flag = wireItemsMajor.none <WireItem>() || wireItemsMinor.none <WireItem>();
            bool result;

            if (flag)
            {
                result = false;
            }
            else
            {
                ItGePoint3d startPoint  = wireItemsMajor[0].StartPoint;
                ItGePoint3d endPoint    = wireItemsMajor[0].EndPoint;
                ItGePoint3d startPoint2 = wireItemsMinor[0].StartPoint;
                ItGePoint3d endPoint2   = wireItemsMinor[0].EndPoint;
                xVector = (endPoint2 - startPoint2).normalize();
                yVector = (endPoint - startPoint).normalize();
                normal  = xVector.crossProduct(yVector);
                result  = true;
            }
            return(result);
        }
Esempio n. 10
0
        // Token: 0x06000199 RID: 409 RVA: 0x0000B458 File Offset: 0x00009658
        private static void addWireToBoundBlock(ref ItGeBoundBlock3d result, WireItem wireItem, ItGeVector3d xVector, ItGeVector3d normal)
        {
            double scl = wireItem.WireDiameter / 2.0;

            ItGePoint3d[] array = new ItGePoint3d[]
            {
                wireItem.StartPoint + xVector * scl,
                wireItem.StartPoint - xVector * scl,
                wireItem.StartPoint + normal * scl,
                wireItem.StartPoint - normal * scl,
                wireItem.EndPoint + xVector * scl,
                wireItem.EndPoint - xVector * scl,
                wireItem.EndPoint + normal * scl,
                wireItem.EndPoint - normal * scl
            };
            foreach (ItGePoint3d point in array)
            {
                SteelGroupElementMeshCFS.addPointToBoundBlock(ref result, point);
            }
        }
        // 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: 0x06000221 RID: 545 RVA: 0x0000EEA0 File Offset: 0x0000D0A0
        protected void UnitechnikAddStraightBars(List <List <ItGeCurve3d> > arrayIrons, ElementId id)
        {
            List <ItGeCurve3d> list = arrayIrons.FirstOrDefault <List <ItGeCurve3d> >();
            bool flag = list == null;

            if (flag)
            {
                ItFailures.PostFailure(ItFailures.CAMObjectWithoutValidGeometry, id);
            }
            else
            {
                ItGeCurve3d itGeCurve3d = list.FirstOrDefault <ItGeCurve3d>();
                bool        flag2       = itGeCurve3d == null;
                if (flag2)
                {
                    ItFailures.PostFailure(ItFailures.CAMObjectWithoutValidGeometry, id);
                }
                else
                {
                    ItGePoint3d itGePoint3d;
                    itGeCurve3d.hasStartPoint(out itGePoint3d);
                    ItGeVector3d itGeVector3d;
                    short        unitechnikAngleOfFreeForm = this.GetUnitechnikAngleOfFreeForm(itGeCurve3d, out itGeVector3d);
                    bool         flag3 = arrayIrons.Count > 1;
                    int          num;
                    double       num2;
                    if (flag3)
                    {
                        this.GetSpacingAndCountForUnitechnik(unitechnikAngleOfFreeForm, out num, out num2);
                    }
                    else
                    {
                        ItGeVector3d kOrigin = ItGeVector3d.kOrigin;
                        num2 = 0.0;
                        num  = 1;
                    }
                    uint length = (uint)CNCDataBase.convertToMM(itGeCurve3d.len);
                    ItUniWrapperImpl.RodstockData data = new ItUniWrapperImpl.RodstockData
                    {
                        length              = length,
                        startAngle          = unitechnikAngleOfFreeForm,
                        artNr               = string.Empty,
                        autoProd            = 0,
                        diameter            = (ushort)CNCDataBase.convertToMM(this.RebarBarType.BarDiameter),
                        flexFormNumber      = 0,
                        formType            = 0,
                        hasSpacers          = 0,
                        hasWielding         = 0,
                        pitchSpacer         = 0u,
                        startingPointSpacer = 0u,
                        reinfType           = (byte)base.CNCReinfTypeValue,
                        steelQuality        = SteelGroupElementRebarBase.GetSteelQuality(this.RebarBarType),
                        xcoord              = CNCDataBase.convertToMM(itGePoint3d.x),
                        ycoord              = CNCDataBase.convertToMM(itGePoint3d.y),
                        installationHeight  = (uint)CNCDataBase.convertToMM(itGePoint3d.z),
                        number              = (ushort)(num2.Ne(0.0, -1.0) ? num : 1),
                        pitch               = CNCDataBase.convertToMM(num2)
                    };
                    ItUniWrapperImpl.AddStraightRodstock(data);
                    bool flag4 = num2.Eq(0.0, -1.0) && num > 1;
                    if (flag4)
                    {
                        int num3;
                        for (int i = 1; i < arrayIrons.Count; i = num3 + 1)
                        {
                            itGeCurve3d = arrayIrons[i].FirstOrDefault <ItGeCurve3d>();
                            bool flag5 = itGeCurve3d == null;
                            if (!flag5)
                            {
                                itGeCurve3d.hasStartPoint(out itGePoint3d);
                                data.xcoord = CNCDataBase.convertToMM(itGePoint3d.x);
                                data.ycoord = CNCDataBase.convertToMM(itGePoint3d.y);
                                ItUniWrapperImpl.AddStraightRodstock(data);
                            }
                            num3 = i;
                        }
                    }
                }
            }
        }
        // Token: 0x06000219 RID: 537 RVA: 0x0000EB58 File Offset: 0x0000CD58
        private void GetAdditionalSegment(ItBar xmlBar, ItSegment prevSegment, out ItSegment additionalSegment, ItGeVector3d startDirection, ref bool flipFutureYs)
        {
            additionalSegment = null;
            bool flag = startDirection.isCodirectionalTo(prevSegment.XVector, null);

            if (!flag)
            {
                double num;
                double num2;
                this.GetRotationsInDegree(xmlBar.CurrentNormal, prevSegment, startDirection, ref flipFutureYs, out num, out num2);
                this.SetCurrentNormal(xmlBar, num, 0.0, prevSegment);
                ItGeVector3d itGeVector3d;
                ItGeVector3d yAxis;
                ItGeVector3d zAxis;
                this.GetNewDirections(num, num2, prevSegment, out itGeVector3d, out yAxis, out zAxis);
                ItDebug.assert(itGeVector3d.isCodirectionalTo(startDirection, null), "Failure in: ");
                double l = 0.0;
                double r = 0.0;
                num  = Math.Round(num, 10);
                num2 = Math.Round(num2, 10);
                ItGeMatrix3d kIdentity = ItGeMatrix3d.kIdentity;
                kIdentity.setCoordSystem(ItGePoint3d.kOrigin, startDirection, yAxis, zAxis);
                additionalSegment = new ItSegment(l, r, num, num2, kIdentity, "normal");
            }
        }
Esempio n. 14
0
        // Token: 0x06000426 RID: 1062 RVA: 0x00012BFC File Offset: 0x00010DFC
        public void Initialize(ItMachineDataBase machineDataBase, AssemblyInstance assemblyInstance, IEnumerable <RevitElement <Part> > partsList, ItGeMatrix3d matTranslateToOrigin, ItGePoint3d startPoint, ItGeVector3d spanDirection, ItGeVector3d shiftingDirection, Parameter paramProdNo)
        {
            double totalThickness = partsList.isNotNull() ? partsList.Sum((RevitElement <Part> part) => machineDataBase.getThickness(part.getLocalExtents(false))) : -1.0;

            startPoint.transformBy(matTranslateToOrigin);
            ItGeBoundBlock3d   buildingExtents    = machineDataBase.getBuildingExtents(assemblyInstance.Document);
            ProjectCoordinates projectCoordinates = new ProjectCoordinates();
            ItGeMatrix3d       mat                = assemblyInstance.ecs();
            ItGeVector3d       spanDirection2     = mat * spanDirection;
            ItGeVector3d       shiftingDirection2 = mat * shiftingDirection;
            ItGePoint3d        startPoint2        = mat * startPoint;

            machineDataBase.setProjectCoordinates(projectCoordinates, startPoint2, buildingExtents, spanDirection2, shiftingDirection2);
            this.ProductType        = machineDataBase.ProductTypeString;
            this.ElementNo          = paramProdNo.AsString();
            this.TotalThickness     = totalThickness;
            this.PieceCount         = assemblyInstance.assemblyType().instances().Count;
            this.ProjectCoordinates = projectCoordinates;
            this.IsInitialized      = true;
        }
        // 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: 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);
        }
Esempio n. 18
0
        // Token: 0x060001E0 RID: 480 RVA: 0x0000D164 File Offset: 0x0000B364
        private static bool IsValidBendingFormForUnitechnikFreeForm(List <List <ItGeCurve3d> > arrayIrons)
        {
            bool flag  = arrayIrons.any <List <ItGeCurve3d> >();
            bool flag2 = !flag;
            bool result;

            if (flag2)
            {
                result = false;
            }
            else
            {
                ItGeCurve3d curve;
                flag = arrayIrons.All(delegate(List <ItGeCurve3d> curves)
                {
                    bool result2 = false;
                    if (curves.any <ItGeCurve3d>())
                    {
                        //	result2 = curves.All((ItGeCurve3d curve) => curve is ItGeLineSeg3d);
                    }
                    else
                    {
                        result2 = false;
                    }
                    return(result2);
                });
                bool flag3 = !flag;
                if (flag3)
                {
                    result = false;
                }
                else
                {
                    flag = !SteelGroupElementRebar.IsSingleSegment(arrayIrons);
                    bool flag4 = !flag;
                    if (flag4)
                    {
                        result = false;
                    }
                    else
                    {
                        bool flag5 = arrayIrons.Count > 1;
                        if (flag5)
                        {
                            //SteelGroupElementRebar.<>c__DisplayClass19_1 CS$<>8__locals1 = new SteelGroupElementRebar.<>c__DisplayClass19_1();
                            //List<List<double>> list4 = (from curves in arrayIrons
                            //select (from curve in curves
                            //select curve.len).ToList<double>()).ToList<List<double>>();
                            //CS$<>8__locals1.firstLengths = list4[0];
                            //int j;
                            //int k;
                            //for (k = 0; k < CS$<>8__locals1.firstLengths.Count; k = j + 1)
                            //{
                            //	flag = list4.All((List<double> list) => list[k].Eq(CS$<>8__locals1.firstLengths[k], -1.0));
                            //	bool flag6 = !flag;
                            //	if (flag6)
                            //	{
                            //		return false;
                            //	}
                            //	j = k;
                            //}
                            //List<List<ItGeVector3d>> list2 = (from curves in arrayIrons
                            //select curves.Select(new Func<ItGeCurve3d, ItGeVector3d>(SteelGroupElementRebarBase.GetDirectionFromCurve)).ToList<ItGeVector3d>()).ToList<List<ItGeVector3d>>();
                            //CS$<>8__locals1.firstDirections = list2[0];
                            //int i;
                            //for (i = 0; i < CS$<>8__locals1.firstDirections.Count; i = j + 1)
                            //{
                            //	flag = list2.All((List<ItGeVector3d> list) => list[i].isCodirectionalTo(CS$<>8__locals1.firstDirections[i], null));
                            //	bool flag7 = !flag;
                            //	if (flag7)
                            //	{
                            //		return false;
                            //	}
                            //	j = i;
                            //}
                        }
                        ItGeVector3d itGeVector3d = null;
                        itGeVector3d = SteelGroupElementRebarBase.GetNormalFromFirstTwoSegments(arrayIrons.First <List <ItGeCurve3d> >(), ItGeVector3d.kZAxis);
                        flag         = itGeVector3d.z.Eq(0.0, -1.0);
                        bool flag8 = !flag;
                        if (flag8)
                        {
                            result = false;
                        }
                        else
                        {
                            foreach (List <ItGeCurve3d> list3 in arrayIrons)
                            {
                                ItGeCurve3d firstCurve = list3[0];
                                foreach (ItGeCurve3d itGeCurve3d in list3)
                                {
                                    ItGeCurve3d  itGeCurve3d2          = itGeCurve3d;
                                    ItGeVector3d normalFromTwoSegments = SteelGroupElementRebarBase.GetNormalFromTwoSegments(firstCurve, itGeCurve3d2);
                                    flag = (normalFromTwoSegments == null || normalFromTwoSegments.isParallelTo(itGeVector3d, null));
                                    bool flag9 = !flag;
                                    if (flag9)
                                    {
                                        return(false);
                                    }
                                    firstCurve = itGeCurve3d2;
                                }
                            }
                            curve = arrayIrons[0][0];
                            ItGeVector3d directionFromCurve = SteelGroupElementRebarBase.GetDirectionFromCurve(curve);
                            bool         flag10             = directionFromCurve.dotProduct(ItGeVector3d.kZAxis).Ne(0.0, -1.0);
                            if (flag10)
                            {
                                ItGeCurve3d curve2 = arrayIrons[0].Last <ItGeCurve3d>();
                                directionFromCurve = SteelGroupElementRebarBase.GetDirectionFromCurve(curve2);
                                bool flag11 = directionFromCurve.dotProduct(ItGeVector3d.kZAxis).Ne(0.0, -1.0);
                                if (flag11)
                                {
                                    return(false);
                                }
                                arrayIrons.ForEach(delegate(List <ItGeCurve3d> list)
                                {
                                    list.Reverse();
                                });
                                arrayIrons.ForEach(delegate(List <ItGeCurve3d> list)
                                {
                                    //list.ForEach(delegate(ItGeCurve3d curve)
                                    //{
                                    //	curve.reverseParam();
                                    //});
                                });
                            }
                            result = true;
                        }
                    }
                }
            }
            return(result);
        }
Esempio n. 19
0
		// Token: 0x0600026F RID: 623 RVA: 0x0000FE4C File Offset: 0x0000E04C
		private int getAngle()
		{
			ItGeVector3d vec = this.EndPoint - this.StartPoint;
			double num = ItGeVector3d.kXAxis.angleTo(vec, ItGeVector3d.kZAxis);
			return (int)Math.Round(num * 57.295779513082323);
		}