// Token: 0x060001F1 RID: 497 RVA: 0x0000DBB4 File Offset: 0x0000BDB4 private static Plane GetRebarStartProfilePlane(List <Curve> centerLineCurves) { bool flag = centerLineCurves.none <Curve>(); Plane result; if (flag) { result = null; } else { XYZ endPoint = centerLineCurves[0].GetEndPoint(0); XYZ rebarStartProfilePlaneNormal = SteelGroupElementRebar.GetRebarStartProfilePlaneNormal(centerLineCurves, endPoint); bool flag2 = rebarStartProfilePlaneNormal == null; if (flag2) { result = null; } else { Plane plane = Plane.CreateByNormalAndOrigin(rebarStartProfilePlaneNormal, endPoint); result = plane; } } return(result); }
// Token: 0x060001EB RID: 491 RVA: 0x0000D8A8 File Offset: 0x0000BAA8 public override double GetSteelVolumeInPart(RevitElement <Part> part, ItSolid partSolid) { Rebar element = this.Rebar.Element; double radius = base.RebarBarType.BarDiameter / 2.0; int num; int num2; SteelGroupElementRebar.GetRebarIndices(element, out num, out num2); double num3 = 0.0; int num4; for (int i = num; i < num2; i = num4 + 1) { List <Curve> centerLineCurvesForVolumeCalculation = SteelGroupElementRebar.GetCenterLineCurvesForVolumeCalculation(this.Rebar, i); List <CurveLoop> sweepProfile = SteelGroupElementRebar.GetSweepProfile(centerLineCurvesForVolumeCalculation, radius); bool flag = sweepProfile.none <CurveLoop>(); if (!flag) { Solid solid = SteelGroupElementRebar.GetSolid(centerLineCurvesForVolumeCalculation, sweepProfile); bool flag2 = solid == null; if (!flag2) { Solid solid2 = solid.intersect(partSolid.Solid); bool flag3 = solid2 == null || solid2.Volume.Lt(0.0, -1.0); if (!flag3) { num3 += solid2.Volume; } } } num4 = i; } return(num3); }
// Token: 0x060001EC RID: 492 RVA: 0x0000D9AC File Offset: 0x0000BBAC private static List <CurveLoop> GetSweepProfile(List <Curve> centerlineCurves, double radius) { List <CurveLoop> list = new List <CurveLoop>(); Plane rebarStartProfilePlane = SteelGroupElementRebar.GetRebarStartProfilePlane(centerlineCurves); bool flag = rebarStartProfilePlane == null; List <CurveLoop> result; if (flag) { result = list; } else { CurveLoop rebarSweepProfile = SteelGroupElementRebar.GetRebarSweepProfile(rebarStartProfilePlane, centerlineCurves, radius); bool flag2 = rebarSweepProfile == null; if (flag2) { result = list; } else { list.Add(rebarSweepProfile); result = list; } } return(result); }
// 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: 0x060001E3 RID: 483 RVA: 0x0000D5CC File Offset: 0x0000B7CC private static bool IsStraightBarsInXYPlane(List <List <ItGeCurve3d> > arrayIrons) { List <ItGeCurve3d> list = arrayIrons.First <List <ItGeCurve3d> >(); bool flag = list.none <ItGeCurve3d>(); bool result; if (flag) { result = false; } else { bool flag2 = list.Count > 1; result = (!flag2 && SteelGroupElementRebar.IsSingleIronInXYPlane(list)); } return(result); }
// Token: 0x060001DB RID: 475 RVA: 0x0000CD04 File Offset: 0x0000AF04 private void UnitechnikWriteRebars() { bool flag = SteelGroupElementRebar.HasEqualIrons(base.IronSetsSchematic); bool flag2 = this.HasZDistribution(); bool flag3 = base.IsMainAxis(); bool flag4 = flag && !flag2 && flag3; if (flag4) { base.UnitechnikAddStraightBars(base.IronSetsSchematic, this.Rebar.Id); } else { foreach (List <ItGeCurve3d> item in base.IronSetsSchematic) { List <List <ItGeCurve3d> > arrayIrons = new List <List <ItGeCurve3d> > { item }; base.UnitechnikAddStraightBars(arrayIrons, this.Rebar.Id); } } }
// Token: 0x060001D2 RID: 466 RVA: 0x0000C41C File Offset: 0x0000A61C internal new static SteelGroupElementRebar GetInstance(RevitElement <Rebar> rebar, ItMachineDataBase.CNCElementData cncElementData, ItGeMatrix3d matWcsToPalette, List <SteelGroupElement> existingElements) { bool flag = rebar.IsInvalid() || !SteelGroupElementRebar.CanBeExported(rebar); SteelGroupElementRebar result; if (flag) { result = null; } else { SteelGroupElementRebar steelGroupElementRebar = new SteelGroupElementRebar(cncElementData, matWcsToPalette); steelGroupElementRebar.Rebar = rebar; steelGroupElementRebar.Host = rebar.Element.getHostingPart(); bool flag2 = steelGroupElementRebar.Host == null; if (flag2) { result = null; } else { steelGroupElementRebar.RebarBarType = (rebar.Document.GetElement(rebar.Element.GetTypeId()) as RebarBarType); steelGroupElementRebar.Data = (rebar.load <ItReinforcement>(null, false) ?? SteelGroupElement.GetEmptyData(steelGroupElementRebar)); bool flag3; steelGroupElementRebar.IronSetsSchematic = rebar.Element.getIronSets(out flag3, RebarMode.Schematic, false); steelGroupElementRebar.IronSetsSchematicAreInvalid = flag3; steelGroupElementRebar.IronSetsRealistic = rebar.Element.getIronSets(out flag3, RebarMode.Realistic, false); steelGroupElementRebar.IronSetsRealisticAreInvalid = flag3; steelGroupElementRebar.TransformToPalette(); steelGroupElementRebar.SetMinMaxZ(steelGroupElementRebar.IronSetsRealistic); steelGroupElementRebar.SetGroup(existingElements); result = steelGroupElementRebar; } } 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); }
// Token: 0x060001D7 RID: 471 RVA: 0x0000C80C File Offset: 0x0000AA0C internal override void WriteToUnitechnik(ICollection <ExportReinfData> exportedElements) { bool flag = this.Rebar == null; if (!flag) { bool flag2 = base.IronSetsSchematic.none <List <ItGeCurve3d> >(); if (flag2) { ItFailures.PostFailure(ItFailures.CAMInvalidRebarShape, this.Rebar.Id); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsFailure }); } else { bool ironSetsSchematicAreInvalid = base.IronSetsSchematicAreInvalid; if (ironSetsSchematicAreInvalid) { ItFailures.PostFailure(ItFailures.CAMUnsupportedRebarShapeExportedAsStraightBar, this.Rebar.Id); } bool flag3 = SteelGroupElementRebar.IsMultiplanar(this.Rebar); if (flag3) { this.UnitechnikWriteRebarAsMountPart(); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsMountPart }); } else { bool flag4 = base.IronSetsSchematic.any((List <ItGeCurve3d> ls) => ls.OfType <ItGeCircArc3d>().any <ItGeCircArc3d>()); if (flag4) { this.UnitechnikWriteRebarAsMountPart(); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsMountPart }); } else { bool flag5 = SteelGroupElementRebar.IsStraightBarsInXYPlane(base.IronSetsSchematic); if (flag5) { this.UnitechnikWriteRebars(); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsRodstock }); } else { RebarShape rebarShape = this.Rebar.Document.GetElement(this.Rebar.Element.GetShapeId()) as RebarShape; bool flag6 = rebarShape.RebarStyle == (RebarStyle)1; if (flag6) { this.UnitechnikWriteRebarAsMountPart(); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsMountPart }); } else { bool flag7 = SteelGroupElementRebar.IsValidBendingFormForUnitechnikFreeForm(base.IronSetsSchematic); if (flag7) { this.UnitechnikWriteRebarAsFreeForm(); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsFreeForm }); } else { this.UnitechnikWriteRebarAsMountPart(); exportedElements.Add(new ExportReinfData { Id = this.Rebar.Id, ExportedAs = ExportReinfData.ExportType.AsMountPart }); } } } } } } } }
// Token: 0x06000178 RID: 376 RVA: 0x0000AA58 File Offset: 0x00008C58 internal static SteelGroupElement GetInstance(RevitElement <Rebar> rebar, ItMachineDataBase.CNCElementData cncElementData, ItGeMatrix3d matWcsToPalette, List <SteelGroupElement> steelGroupElements) { return(SteelGroupElementRebar.GetInstance(rebar, cncElementData, matWcsToPalette, steelGroupElements)); }