// Token: 0x0600020F RID: 527 RVA: 0x0000E4EC File Offset: 0x0000C6EC private ItSegment GetSegmentFromCircArc(ItBar xmlBar, ItSegment prevSegment, ItGeCircArc3d circArc, ref bool flipFutureYs, out ItSegment additionalSegment) { additionalSegment = null; ItGeLine3d itGeLine3d = null; ItGeLine3d itGeLine3d2 = null; bool flag = !circArc.tangent(circArc.endPoint(), out itGeLine3d, null) || !circArc.tangent(circArc.startPoint(), out itGeLine3d2, null); ItSegment result; if (flag) { result = null; } else { ItGeVector3d itGeVector3d = (itGeLine3d2 != null) ? itGeLine3d2.direction().negate() : prevSegment.XVector; this.GetAdditionalSegment(xmlBar, prevSegment, out additionalSegment, itGeVector3d, ref flipFutureYs); ItGeVector3d rebarPlaneNormal = circArc.normal(); double num; double num2; this.GetRotationsInDegree(rebarPlaneNormal, additionalSegment ?? prevSegment, itGeVector3d, ref flipFutureYs, out num, out num2); this.SetCurrentNormal(xmlBar, num, 0.0, additionalSegment ?? prevSegment); double circleSign = this.GetCircleSign(xmlBar, circArc); double num3 = this.GetCentralAngleWithSign(circArc, circleSign); num3 = ItAngle.toDegree(num3); ItGeVector3d itGeVector3d2 = -1.0 * itGeLine3d.direction(); ItGeVector3d itGeVector3d3 = circleSign * circArc.normal(); ItGeVector3d zAxis = itGeVector3d2.crossProduct(itGeVector3d3); double l = 0.0; double r = circArc.radius(); num = Math.Round(num, 10); double bendY = Math.Round(num3, 10); ItGeMatrix3d kIdentity = ItGeMatrix3d.kIdentity; kIdentity.setCoordSystem(ItGePoint3d.kOrigin, itGeVector3d2, itGeVector3d3, zAxis); ItSegment itSegment = new ItSegment(l, r, num, bendY, kIdentity, "normal"); result = itSegment; } return(result); }
// Token: 0x06000214 RID: 532 RVA: 0x0000E8A4 File Offset: 0x0000CAA4 public static ItGeVector3d GetNormalFromTwoSegments(ItGeCurve3d firstCurve, ItGeCurve3d nextCurve) { ItGeCircArc3d itGeCircArc3d = firstCurve as ItGeCircArc3d; ItGeLineSeg3d itGeLineSeg3d = firstCurve as ItGeLineSeg3d; bool flag = itGeCircArc3d != null; ItGeVector3d result; if (flag) { result = itGeCircArc3d.normal(); } else { ItGeVector3d itGeVector3d = itGeLineSeg3d.direction(); ItGeCircArc3d itGeCircArc3d2 = nextCurve as ItGeCircArc3d; ItGeLineSeg3d itGeLineSeg3d2 = nextCurve as ItGeLineSeg3d; bool flag2 = itGeCircArc3d2 != null; if (flag2) { ItGeVector3d itGeVector3d2 = itGeCircArc3d2.normal(); ItGePlane itGePlane = new ItGePlane(ItGePoint3d.kOrigin, itGeVector3d2); ItGePoint3d itGePoint3d; bool flag3 = itGePlane.intersectWith(itGeLineSeg3d, out itGePoint3d, null); if (flag3) { result = ItGeVector3d.kYAxis; } else { result = itGeVector3d2; } } else { bool flag4 = itGeLineSeg3d2 != null; if (flag4) { ItGeVector3d vec = itGeLineSeg3d2.direction(); ItGeVector3d itGeVector3d3 = itGeVector3d.crossProduct(vec); bool flag5 = itGeVector3d3.length().Gt(0.0, -1.0); if (flag5) { return(itGeVector3d3); } } result = null; } } return(result); }
// Token: 0x06000217 RID: 535 RVA: 0x0000EAF0 File Offset: 0x0000CCF0 private double GetCircleSign(ItBar xmlBar, ItGeCircArc3d circArc) { ItGeVector3d vec = circArc.normal(); bool flag = xmlBar.CurrentNormal.isCodirectionalTo(vec, null); double result; if (flag) { result = -1.0; } else { result = 1.0; } return(result); }
// 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); }