private void define_side_D(LineSegment seg) { G.Line ln = seg.getLine(); G.Line offsetLine = ln.Offset(_V_.X_CONCRETE_COVER_1); G.Vector d1 = ln.getDirectionVector(); G.Vector o1 = ln.getOffsetVector(); double absX = Math.Abs(o1.X); double absY = Math.Abs(o1.Y); G.Vector absV = new G.Vector(absX, absY); G.Polar p = G.Converter.xy_to_la(absV); int spacing; int distance; int parand; // parand magic if (p.angle < Math.PI / 4) { spacing = _V_.X_REINFORCEMENT_SIDE_D_SPACING; distance = _V_.X_REINFORCEMENT_SIDE_D_ANCHOR_LENGTH; parand = _V_.X_REINFORCEMENT_SIDE_D_FIX; } else { spacing = _V_.X_REINFORCEMENT_TOP_D_SPACING; distance = _V_.X_REINFORCEMENT_TOP_D_ANCHOR_LENGTH; parand = _V_.X_REINFORCEMENT_TOP_D_FIX; } double nearEdge = _V_.X_CONCRETE_COVER_1 * 2.5; double equalSpacer = ((ln.Length() - 2 * nearEdge) % spacing) / 2; double j = nearEdge + equalSpacer; double len = ln.Length(); if ((len - nearEdge * 2) > spacing) { R.Raud_Array rauad = new R.Raud_Array(spacing); knownArrayReinforcement.Add(rauad); while (j < len) { G.Point start = offsetLine.Start.move(j, d1); G.Point end = start.move(distance, o1); D_side_handler(start, end, parand); // parand magic j = j + spacing; } D_side_garbage_collector(); } }
private void define_side_U(LineSegment seg) { G.Line mainLine = seg.getLine(); G.Line otherLine = seg.getOtherLine(); if (setLineSegment.Contains(seg)) { return; } if (isLineRight(mainLine) == false && isLineRight(otherLine) == true) { return; } G.Vector d1 = mainLine.getDirectionVector(); G.Vector o1 = mainLine.getOffsetVector(); int spacing = _V_.X_REINFORCEMENT_STIRRUP_SPACING; double nearEdge = _V_.X_CONCRETE_COVER_1 * 1.2; double equalSpacer = ((mainLine.Length() - 2 * nearEdge) % spacing) / 2; double j = nearEdge + equalSpacer; double len = mainLine.Length(); if ((len - nearEdge * 2) > spacing) { R.Raud_Array rauad = new R.Raud_Array(spacing); knownArrayReinforcement.Add(rauad); while (j < len) { G.Point start = mainLine.Start.move(j, d1); G.Point extended = start.move(_V_.Y_STIRRUP_MAX_LENGTH * 1.1, o1); G.Line temp = new G.Line(start, extended); G.Point end = G.Line.getIntersectionPoint(temp, otherLine); temp = new G.Line(start, end); if (Math.Round(temp.Length(), 0) > _V_.X_CONCRETE_COVER_1 * 2) { temp = temp.extendDouble(-1 * _V_.X_CONCRETE_COVER_1); U_side_handler(temp.Start, temp.End, seg); } j = j + spacing; } U_side_garbage_collector(); } }