コード例 #1
0
        // 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);
        }
コード例 #2
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);
        }