// 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: 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);
        }