Exemplo n.º 1
0
 // Token: 0x06000113 RID: 275 RVA: 0x00009B5C File Offset: 0x00007D5C
 internal static void AddFreeFormRodstock(ItUniWrapperImpl.RodstockData data, IEnumerable <ItUniWrapperImpl.FreeFormSegment> segments)
 {
     ItDebug.assert(segments.any <ItUniWrapperImpl.FreeFormSegment>(), "Can not handle empty List of FreeFormSegments");
     ItUniWrapperImpl.FreeFormSegment[] array = segments.ToArray <ItUniWrapperImpl.FreeFormSegment>();
     data.numberOfFreeFormSegments = (ushort)array.Length;
     ItUniWrapperImpl.addFreeFormRodstock(data, array);
 }
Exemplo n.º 2
0
        // Token: 0x060001D8 RID: 472 RVA: 0x0000CA88 File Offset: 0x0000AC88
        private void UnitechnikWriteRebarAsFreeForm()
        {
            ItDebug.assert(base.IronSetsSchematic.any <List <ItGeCurve3d> >() && base.IronSetsSchematic[0].Count > 1, "Do not call this method for anything but bending forms.");
            ItUniWrapperImpl.RodstockData data = default(ItUniWrapperImpl.RodstockData);
            List <ItGeCurve3d>            list = base.IronSetsSchematic[0];
            ItGeVector3d normal;
            short        unitechnikAngleOfFreeForm = base.GetUnitechnikAngleOfFreeForm(list[0], out normal);
            int          num;
            double       dValue;

            this.GetSpacingAndCountForUnitechnik(unitechnikAngleOfFreeForm, out num, out dValue);
            int         freeFormLength = SteelGroupElementRebar.GetFreeFormLength(list);
            ItGePoint3d startPoint     = base.GetStartPoint(base.IronSetsSchematic);

            data.length              = (uint)freeFormLength;
            data.startAngle          = unitechnikAngleOfFreeForm;
            data.artNr               = string.Empty;
            data.autoProd            = 0;
            data.diameter            = (ushort)CNCDataBase.convertToMM(base.RebarBarType.BarDiameter);
            data.flexFormNumber      = 0;
            data.formType            = 2;
            data.hasSpacers          = 0;
            data.hasWielding         = 0;
            data.installationHeight  = (uint)CNCDataBase.convertToMM(startPoint.z);
            data.number              = (ushort)num;
            data.pitch               = CNCDataBase.convertToMM(dValue);
            data.pitchSpacer         = 0u;
            data.startingPointSpacer = 0u;
            data.reinfType           = (byte)base.CNCReinfTypeValue;
            data.steelQuality        = SteelGroupElementRebarBase.GetSteelQuality(base.RebarBarType);
            data.xcoord              = CNCDataBase.convertToMM(startPoint.x);
            data.ycoord              = CNCDataBase.convertToMM(startPoint.y);
            List <ItUniWrapperImpl.FreeFormSegment> list2 = new List <ItUniWrapperImpl.FreeFormSegment>();
            int num2;

            for (int i = 0; i < list.Count; i = num2 + 1)
            {
                ItGeCurve3d itGeCurve3d = list[i];
                ItGeCurve3d nextCurve   = list.ElementAtOrDefault(i + 1);
                short       unitechnikAngleOfNextSegment = this.GetUnitechnikAngleOfNextSegment(itGeCurve3d, nextCurve, normal);
                list2.Add(new ItUniWrapperImpl.FreeFormSegment
                {
                    length = (uint)CNCDataBase.convertToMM(itGeCurve3d.len),
                    angle  = unitechnikAngleOfNextSegment
                });
                num2 = i;
            }
            ItUniWrapperImpl.AddFreeFormRodstock(data, list2);
        }
        // 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;
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
 private static extern void addStraightRodstock(ItUniWrapperImpl.RodstockData rsData);
Exemplo n.º 5
0
 private static extern int addFreeFormRodstock(ItUniWrapperImpl.RodstockData data, ItUniWrapperImpl.FreeFormSegment[] segments);
Exemplo n.º 6
0
 // Token: 0x06000116 RID: 278 RVA: 0x00009C06 File Offset: 0x00007E06
 internal static void AddStraightRodstock(ItUniWrapperImpl.RodstockData data)
 {
     ItUniWrapperImpl.addStraightRodstock(data);
 }