public static A_Raud mergeTwoRebar(A_Raud one, A_Raud two) { G.Line a = one.makeLine(); G.Line b = two.makeLine(); G.Line new_line = G.Line.merge(a, b); A_Raud raud = new A_Raud(new_line, one.Number, one.Diameter, one.Materjal); return(raud); }
private bool A_handler_replace(R.A_Raud a, R.A_Raud b) { R.A_Raud new_reinf = R.A_Raud.mergeTwoRebar(a, b); if (denier(new_reinf.makeLine())) { return(false); } keep_replace(new_reinf, a, b); return(true); }
//A HANDLE public bool A_handler(G.Point mainPoint, G.Point mainEnd, G.Edge e, G.Corner c, int d) { G.Line main = new G.Line(mainPoint, mainEnd); //Debugerrint(main.ToString()); //reinf_geometry_debug.Add(main); R.A_Raud reinf = new R.A_Raud(main, _V_.X_REINFORCEMENT_NUMBER, d, _V_.X_REINFORCEMENT_MARK); if (denier(reinf.makeLine())) { return(false); } keep(reinf, e, c, null); return(true); }
private bool AB_handler_replace_main(R.A_Raud a, R.B_Raud b) { G.Line t1 = a.makeLine(); G.Line t2 = b.makeMainLine(); G.Line t3 = b.makeSideLine(); G.Line new_a_line = new G.Line(b.IP, a.EndPoint); G.Point new_b_side_point = t3.Start.move(_V_.Y_CONCRETE_COVER_DELTA, (-1) * t3.getDirectionVector()); G.Point new_b_start = t3.End.move(_V_.Y_CONCRETE_COVER_DELTA, (-1) * t3.getDirectionVector()); G.Point new_b_end = new_b_start.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH, t2.getDirectionVector()); G.Line new_b_side_line = new G.Line(new_b_side_point, new_b_start); G.Line new_b_main_line = new G.Line(new_b_start, new_b_end); R.A_Raud new_A = new R.A_Raud(new_a_line, a.Number, a.Diameter, a.Materjal); R.B_Raud new_B = new R.B_Raud(new_b_main_line, new_b_side_line, b.Number, b.Diameter, b.Materjal); if (denier(new_A.makeLine())) { return(false); } if (denier(new_B.makeSideLine())) { return(false); } if (denier(new_B.makeMainLine())) { return(false); } keep_replace(new_A, new_B, a, b); return(true); }