// 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: 0x06000203 RID: 515 RVA: 0x0000DE84 File Offset: 0x0000C084 private ItBar CreateBarElement(ItGePoint3d startPoint, double rotZ) { return(new ItBar { ShapeMode = ShapeMode.realistic, ReinforcementType = base.CNCReinfTypeValue, SteelQuality = SteelGroupElementRebarBase.GetSteelQuality(this.RebarBarType), PieceCount = 1, Diameter = this.RebarBarType.BarDiameter, X = startPoint.x, Y = startPoint.y, Z = startPoint.z, RotZ = rotZ, CurrentNormal = ItGeVector3d.kYAxis }); }
// 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; } } } } }