//D HANDLE
        private bool D_vs_E_handler(G.Point mainPoint, G.Point mainEnd, G.Point side1Start, G.Point side2End, G.Edge e, G.Corner c1, G.Corner c2, int parand, G.Edge other = null, G.Edge other2 = null)
        {
            G.Line main  = new G.Line(mainPoint, mainEnd);
            G.Line side1 = new G.Line(side1Start, mainPoint);
            G.Line side2 = new G.Line(mainEnd, side2End);

            if (main.Length() < _V_.Y_REINFORCEMENT_MAIN_RADIUS * 1.99)
            {
                return(false);
            }

            //reinf_geometry_debug.Add(main);
            //reinf_geometry_debug.Add(side1);
            //reinf_geometry_debug.Add(side2);

            G.Vector v1 = main.getDirectionVector();
            G.Vector v2 = side1.getDirectionVector();
            G.Vector v3 = side2.getDirectionVector();

            double ang1 = G.Converter.AngleDeltaCW(v1, v2);
            double ang2 = G.Converter.AngleDeltaCW(v1, v3);

            bool d1 = Math.Abs(ang1 - Math.PI / 2) < _V_.M_B_BAR_TOLERANCE;
            bool d2 = Math.Abs(ang2 - 3 * Math.PI / 2) < _V_.M_B_BAR_TOLERANCE;

            if (d1 && d2)
            {
                R.D_Raud reinf = new R.D_Raud(main, side1, side2, _V_.X_REINFORCEMENT_NUMBER, _V_.X_REINFORCEMENT_MAIN_DIAMETER, _V_.X_REINFORCEMENT_MARK, parand);

                if (denier(reinf.makeMainLine()))
                {
                    return(false);
                }
                if (denier(reinf.makeSide1Line()))
                {
                    return(false);
                }
                if (denier(reinf.makeSide2Line()))
                {
                    return(false);
                }

                keep(reinf, e, c1, c2);
                keep_double(reinf, other);
                keep_double(reinf, other2);
            }
            else
            {
                R.E_Raud reinf = new R.E_Raud(main, side1, side2, _V_.X_REINFORCEMENT_NUMBER, _V_.X_REINFORCEMENT_MAIN_DIAMETER, _V_.X_REINFORCEMENT_MARK, parand);

                if (denier(reinf.makeMainLine()))
                {
                    return(false);
                }
                if (denier(reinf.makeSide1Line()))
                {
                    return(false);
                }
                if (denier(reinf.makeSide2Line()))
                {
                    return(false);
                }

                keep(reinf, e, c1, c2);
                keep_double(reinf, other);
                keep_double(reinf, other2);
            }

            return(true);
        }
        private bool C_handler_replace(R.C_Raud a, R.C_Raud b)
        {
            R.E_Raud new_reinf_long = R.C_Raud.mergeTwoRebar_long(a, b);

            bool longD = true;

            if (denier(new_reinf_long.makeMainLine()))
            {
                longD = false;
            }
            if (denier(new_reinf_long.makeSide1Line()))
            {
                longD = false;
            }
            if (denier(new_reinf_long.makeSide2Line()))
            {
                longD = false;
            }

            if (new_reinf_long.A < _V_.Y_REINFORCEMENT_MAIN_RADIUS)
            {
                longD = false;
            }
            if (new_reinf_long.B2 < _V_.Y_REINFORCEMENT_MAIN_RADIUS * 1.99)
            {
                longD = false;
            }
            if (new_reinf_long.C < _V_.Y_REINFORCEMENT_MAIN_RADIUS)
            {
                longD = false;
            }
            if (new_reinf_long.Length > _V_.X_REINFORCEMENT_MAX_D_LENGTH)
            {
                longD = false;
            }

            if (longD == true)
            {
                keep_replace(new_reinf_long, a, b);
                return(true);
            }

            R.E_Raud new_reinf = R.C_Raud.mergeTwoRebar(a, b);

            if (denier(new_reinf.makeMainLine()))
            {
                return(false);
            }
            if (denier(new_reinf.makeSide1Line()))
            {
                return(false);
            }
            if (denier(new_reinf.makeSide2Line()))
            {
                return(false);
            }

            if (new_reinf.A < _V_.Y_REINFORCEMENT_MAIN_RADIUS)
            {
                return(false);
            }
            if (new_reinf.B2 < _V_.Y_REINFORCEMENT_MAIN_RADIUS * 1.99)
            {
                return(false);
            }
            if (new_reinf.C < _V_.Y_REINFORCEMENT_MAIN_RADIUS)
            {
                return(false);
            }
            if (new_reinf_long.Length > _V_.X_REINFORCEMENT_MAX_D_LENGTH)
            {
                return(false);
            }

            keep_replace(new_reinf, a, b);

            return(true);
        }