Beispiel #1
0
        private void create_all_A()
        {
            List <G.Edge> emptyEdges = allEdges.Where(x => !setEdges.Keys.Contains(x)).ToList();

            emptyEdges = emptyEdges.OrderBy(b => b.Line.Length()).Reverse().ToList();

            foreach (G.Edge e in emptyEdges)
            {
                if (narrow_denier(e))
                {
                    continue;
                }

                G.Line main = e.edgeOffset(_V_.X_CONCRETE_COVER_1, _V_.X_CONCRETE_COVER_1, _V_.X_CONCRETE_COVER_1);

                if (e.StartCorner.Angle > Math.PI)
                {
                    main = main.extendStart(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH);
                }

                if (e.EndCorner.Angle > Math.PI)
                {
                    main = main.extendEnd(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH);
                }

                A_handler(main.Start, main.End, e, null, _V_.X_REINFORCEMENT_MAIN_DIAMETER);
            }
        }
Beispiel #2
0
        private void create_trimmed_short_A()
        {
            List <G.Edge> emptyEdges = allEdges.Where(x => !setEdges.Keys.Contains(x)).ToList();

            emptyEdges = emptyEdges.OrderBy(b => b.Line.Length()).ToList();

            foreach (G.Edge e in emptyEdges)
            {
                if (setEdges.Keys.Contains(e))
                {
                    continue;
                }
                if (narrow_denier(e))
                {
                    continue;
                }


                G.Edge temp = null;
                G.Line main = e.edgeOffset(_V_.X_CONCRETE_COVER_1, _V_.X_CONCRETE_COVER_1, _V_.X_CONCRETE_COVER_1);
                main = trimLine_baseline(main, main.Copy(), _V_.X_CONCRETE_COVER_2, e, ref temp);


                bool   startTrimmed     = false;
                G.Edge startTrimmerEdge = null;
                if (e.StartCorner.Angle > Math.PI)
                {
                    G.Line extended = main.extendStart(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH);
                    G.Line trimmed  = trimLine_basepoint(extended, main.End, _V_.X_CONCRETE_COVER_2, e, ref startTrimmerEdge);
                    if (trimmed.Length() < main.Length() + _V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * _V_.M_TRIM_TOLERANCE)
                    {
                        startTrimmed = true;
                    }
                    main = trimmed;
                }


                bool   endTrimmed     = false;
                G.Edge endTrimmerEdge = null;
                if (e.EndCorner.Angle > Math.PI)
                {
                    G.Line extended = main.extendEnd(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH);
                    G.Line trimmed  = trimLine_basepoint(extended, main.Start, _V_.X_CONCRETE_COVER_2, e, ref endTrimmerEdge);
                    if (trimmed.Length() < main.Length() + _V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * _V_.M_TRIM_TOLERANCE)
                    {
                        endTrimmed = true;
                    }
                    main = trimmed;
                }


                if (main.Length() <= _V_.Y_REINFORCEMENT_MAIN_MIN_LENGTH)
                {
                    if (startTrimmed && endTrimmed)
                    {
                        bool got_D = define_D(e, startTrimmerEdge, endTrimmerEdge);

                        if (got_D == false)
                        {
                            G.Vector v1 = main.getOffsetVector();
                            G.Vector v2 = startTrimmerEdge.Line.getCoolVector(v1);
                            G.Vector v3 = endTrimmerEdge.Line.getCoolVector(v1);

                            G.Point side1Point = main.Start.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.05, v2);
                            G.Point side2Point = main.End.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.05, v3);

                            G.Line side1 = new G.Line(side1Point, main.Start);
                            G.Line side2 = new G.Line(main.End, side2Point);

                            if (denier(side1) && denier(side2))
                            {
                                G.Point AP     = main.Start.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.5, v2);
                                G.Line  b_line = new G.Line(main.Start, AP);

                                G.Edge side1TrimmerEdge = null;
                                G.Line side1Main        = trimLine_basepoint(b_line, main.Start, _V_.X_CONCRETE_COVER_2, e, ref side1TrimmerEdge);

                                G.Point AP2     = main.End.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.5, v3);
                                G.Line  b_line2 = new G.Line(main.End, AP2);

                                G.Edge side2TrimmerEdge = null;
                                G.Line side2Main        = trimLine_basepoint(b_line2, main.End, _V_.X_CONCRETE_COVER_2, e, ref side2TrimmerEdge);

                                A_handler(main.Start, main.End, e, null, _V_.X_REINFORCEMENT_MAIN_DIAMETER);
                                define_D(startTrimmerEdge, side1TrimmerEdge, e);
                                define_D(endTrimmerEdge, e, side2TrimmerEdge);
                            }
                            else if (denier(side1))
                            {
                                G.Point AP     = main.Start.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.5, v2);
                                G.Line  b_line = new G.Line(main.Start, AP);

                                G.Edge sideTrimmerEdge = null;
                                G.Line newMain         = trimLine_basepoint(b_line, main.Start, _V_.X_CONCRETE_COVER_2, e, ref sideTrimmerEdge);

                                B_vs_C_handler(main.End, side2Point, main.Start, e, null);
                                define_D(startTrimmerEdge, sideTrimmerEdge, e);
                            }
                            else if (denier(side2))
                            {
                                G.Point AP     = main.End.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.5, v2);
                                G.Line  b_line = new G.Line(main.End, AP);

                                G.Edge sideTrimmerEdge = null;
                                G.Line newMain         = trimLine_basepoint(b_line, main.End, _V_.X_CONCRETE_COVER_2, e, ref sideTrimmerEdge);

                                define_D(endTrimmerEdge, e, sideTrimmerEdge);
                                B_vs_C_handler(main.Start, main.End, side1Point, e, null);
                            }
                        }
                    }
                    else if (startTrimmed)
                    {
                        bool got_B = define_B(e, startTrimmerEdge);

                        if (got_B == false)
                        {
                            G.Vector v1 = e.Line.getOffsetVector();
                            G.Vector v2 = startTrimmerEdge.Line.getCoolVector(v1);

                            G.Point AP     = main.Start.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 2, v2);
                            G.Line  b_line = new G.Line(main.Start, AP);

                            G.Edge sideTrimmerEdge = null;
                            G.Line newMain         = trimLine_basepoint(b_line, main.Start, _V_.X_CONCRETE_COVER_2, e, ref sideTrimmerEdge);

                            if (sideTrimmerEdge != null)
                            {
                                bool got_D = define_D(startTrimmerEdge, sideTrimmerEdge, e);
                                if (got_D)
                                {
                                    A_handler(main.Start, main.End, e, null, _V_.X_REINFORCEMENT_MAIN_DIAMETER);
                                }
                            }
                            else
                            {
                                G.Corner ec = e.EndCorner;
                                if (ec.Angle < Math.PI)
                                {
                                    G.Edge otherEdge = ec.getOtherEdge(e);
                                    define_D(e, startTrimmerEdge, otherEdge);
                                }
                            }
                        }
                    }
                    else if (endTrimmed)
                    {
                        bool got_B = define_B(endTrimmerEdge, e);

                        if (got_B == false)
                        {
                            G.Vector v1 = e.Line.getOffsetVector();
                            G.Vector v2 = endTrimmerEdge.Line.getCoolVector(v1);

                            G.Point AP     = main.End.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 2, v2);
                            G.Line  b_line = new G.Line(main.End, AP);

                            G.Edge sideTrimmerEdge = null;
                            G.Line newMain         = trimLine_basepoint(b_line, main.End, _V_.X_CONCRETE_COVER_2, e, ref sideTrimmerEdge);

                            if (sideTrimmerEdge != null)
                            {
                                bool got_D = define_D(endTrimmerEdge, e, sideTrimmerEdge);
                                if (got_D)
                                {
                                    A_handler(main.Start, main.End, e, null, _V_.X_REINFORCEMENT_MAIN_DIAMETER);
                                }
                            }
                            else
                            {
                                G.Corner sc = e.StartCorner;
                                if (sc.Angle < Math.PI)
                                {
                                    G.Edge otherEdge = sc.getOtherEdge(e);
                                    define_D(e, otherEdge, endTrimmerEdge);
                                }
                            }
                        }
                    }
                }
            }
        }
Beispiel #3
0
        private void create_trimmed_long_A()
        {
            List <G.Edge> emptyEdges = allEdges.Where(x => !setEdges.Keys.Contains(x)).ToList();

            emptyEdges = emptyEdges.OrderBy(b => b.Line.Length()).Reverse().ToList();

            foreach (G.Edge e in emptyEdges)
            {
                if (setEdges.Keys.Contains(e))
                {
                    continue;
                }
                if (narrow_denier(e))
                {
                    continue;
                }

                G.Edge temp = null;
                G.Line main = e.edgeOffset(_V_.X_CONCRETE_COVER_1, _V_.X_CONCRETE_COVER_1, _V_.X_CONCRETE_COVER_1);
                main = trimLine_baseline(main, main.Copy(), _V_.X_CONCRETE_COVER_1, e, ref temp);


                bool   startTrimmed     = false;
                G.Edge startTrimmerEdge = null;
                if (e.StartCorner.Angle > Math.PI)
                {
                    G.Line extended = main.extendStart(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH);
                    G.Line trimmed  = trimLine_basepoint(extended, main.End, _V_.X_CONCRETE_COVER_2, e, ref startTrimmerEdge);
                    if (trimmed.Length() < main.Length() + _V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * _V_.M_TRIM_TOLERANCE)
                    {
                        startTrimmed = true;
                    }
                    main = trimmed;
                }


                bool   endTrimmed     = false;
                G.Edge endTrimmerEdge = null;
                if (e.EndCorner.Angle > Math.PI)
                {
                    G.Line extended = main.extendEnd(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH);
                    G.Line trimmed  = trimLine_basepoint(extended, main.Start, _V_.X_CONCRETE_COVER_2, e, ref endTrimmerEdge);
                    if (trimmed.Length() < main.Length() + _V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * _V_.M_TRIM_TOLERANCE)
                    {
                        endTrimmed = true;
                    }
                    main = trimmed;
                }


                if (main.Length() > _V_.Y_REINFORCEMENT_MAIN_MIN_LENGTH)
                {
                    A_handler(main.Start, main.End, e, null, _V_.X_REINFORCEMENT_MAIN_DIAMETER);

                    if (startTrimmed)
                    {
                        bool got_B = define_simple_B(e, startTrimmerEdge);

                        if (got_B == false)
                        {
                            G.Vector v1 = e.Line.getOffsetVector();
                            G.Vector v2 = startTrimmerEdge.Line.getCoolVector(v1);

                            G.Point AP     = main.Start.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.5, v2);
                            G.Line  b_line = new G.Line(main.Start, AP);

                            G.Edge sideTrimmerEdge = null;
                            G.Line newMain         = trimLine_basepoint(b_line, main.Start, _V_.X_CONCRETE_COVER_2, e, ref sideTrimmerEdge);

                            if (sideTrimmerEdge != null)
                            {
                                define_D(startTrimmerEdge, sideTrimmerEdge, e);
                            }
                        }
                    }

                    if (endTrimmed)
                    {
                        bool got_B = define_simple_B(endTrimmerEdge, e);

                        if (got_B == false)
                        {
                            G.Vector v1 = e.Line.getOffsetVector();
                            G.Vector v2 = endTrimmerEdge.Line.getCoolVector(v1);

                            G.Point AP     = main.End.move(_V_.X_REINFORCEMENT_MAIN_ANCHOR_LENGTH * 1.5, v2);
                            G.Line  b_line = new G.Line(main.End, AP);

                            G.Edge sideTrimmerEdge = null;
                            G.Line newMain         = trimLine_basepoint(b_line, main.End, _V_.X_CONCRETE_COVER_2, e, ref sideTrimmerEdge);

                            if (sideTrimmerEdge != null)
                            {
                                define_D(endTrimmerEdge, e, sideTrimmerEdge);
                            }
                        }
                    }
                }
            }
        }