pcb 4.1.1
An interactive printed circuit board layout editor.
|
Topological Autorouter for PCB. More...
Go to the source code of this file.
Topological Autorouter for PCB.
Topological Autorouter for PCB, interactive printed circuit board design
Copyright (C) 2009 Anthony Blake
Copyright (C) 2009-2011 PCB Contributors (see ChangeLog for details)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Contact addresses for email: Anthony Blake, tonyb33@gmail.com
As the code is experimental, the algorithms and code are likely to change. Which means it isn't documented or optimized. If you would like to learn about Topological Autorouters, the following papers are good starting points:
This file implements a topological autorouter, and uses techniques from the following publications:
Dayan, T. and Dai, W.W.M., "Layer Assignment for a Rubber Band Router" Tech Report UCSC-CRL-92-50, Univ. of California, Santa Cruz, 1992.
Dai, W.W.M and Dayan, T. and Staepelaere, D., "Topological Routing in SURF: Generating a Rubber-Band Sketch" Proc. 28th ACM/IEEE Design Automation Conference, 1991, pp. 39-44.
David Staepelaere, Jeffrey Jue, Tal Dayan, Wayne Wei-Ming Dai, "SURF: Rubber-Band Routing System for Multichip Modules," IEEE Design and Test of Computers ,vol. 10, no. 4, pp. 18-26, October/December, 1993.
Dayan, T., "Rubber-band based topological router" PhD Thesis, Univ. of California, Santa Cruz, 1997.
David Staepelaere, "Geometric transformations for a rubber-band sketch" Master's thesis, Univ. of California, Santa Cruz, September 1992.
Definition in file toporouter.c.
#define ARC_CHECKS | ( | z | ) |
(!(arc1 && arc1->centre == z) && !(arc2 && arc2->centre == z) && \ !(TOPOROUTER_IS_VERTEX(t1) && z == v1) && !(TOPOROUTER_IS_VERTEX(t2) && z == v2))
Referenced by oproute_rubberband_segment().
#define BOARD_EDGE_RESOLUTION MIL_TO_COORD (100.) |
Definition at line 68 of file toporouter.c.
Referenced by create_board_edge().
#define closelist_insert | ( | p | ) | closelist = g_list_prepend(closelist, p) |
Definition at line 2908 of file toporouter.c.
Referenced by route().
#define DEBUG_CLUSTER_FIND 1 |
Definition at line 2829 of file toporouter.c.
#define edge_gradient | ( | e | ) |
(cartesian_gradient(GTS_POINT(GTS_SEGMENT(e)->v1)->x, GTS_POINT(GTS_SEGMENT(e)->v1)->y, \ GTS_POINT(GTS_SEGMENT(e)->v2)->x, GTS_POINT(GTS_SEGMENT(e)->v2)->y))
Definition at line 3054 of file toporouter.c.
Referenced by new_temp_toporoutervertex_in_segment().
#define edge_is_blocked | ( | e | ) | (TOPOROUTER_IS_EDGE(e) ? (e->flags & EDGE_FLAG_DIRECTCONNECTION) : 0) |
Definition at line 3597 of file toporouter.c.
Referenced by all_candidates_on_edge(), triangle_candidate_points_from_edge(), and triangle_candidate_points_from_vertex().
Definition at line 2901 of file toporouter.c.
Referenced by route_heap_cmp().
#define INSERT_ROUTING | ( | x | ) |
x->netlist->routed = g_list_prepend(x->netlist->routed, x); \ r->routednets = g_list_prepend(r->routednets, x); \ r->failednets = g_list_remove(r->failednets, x)
Definition at line 7304 of file toporouter.c.
Referenced by roar_detour_route(), roar_route(), and rubix_router().
#define MARGIN 10.0f |
Definition at line 268 of file toporouter.c.
Referenced by toporouter_draw_edge(), toporouter_draw_surface(), toporouter_draw_vertex(), and toporouter_output_init().
#define REMOVE_ROUTING | ( | x | ) |
x->netlist->routed = g_list_remove(x->netlist->routed, x); \ r->routednets = g_list_remove(r->routednets, x); \ r->failednets = g_list_prepend(r->failednets, x)
Definition at line 7300 of file toporouter.c.
Referenced by roar_detour_route(), and roar_route().
#define ROAR_DETOUR_THRESHOLD MIL_TO_COORD (10.) |
Definition at line 70 of file toporouter.c.
Referenced by detour_router().
#define TEST_AND_INSERT | ( | z | ) | if(d > EPSILON) arcs = g_list_prepend(arcs, new_rubberband_arc(v, z, arcr, d, arcwind, i)); |
Referenced by oproute_rubberband_segment().
#define toporouter_edge_gradient | ( | e | ) | (cartesian_gradient(vx(edge_v1(e)), vy(edge_v1(e)), vx(edge_v2(e)), vy(edge_v2(e)))) |
Definition at line 3231 of file toporouter.c.
Referenced by triangle_interior_capacity().
#define tv_on_layer | ( | v, | |
l | |||
) | (l == TOPOROUTER_BBOX(TOPOROUTER_VERTEX(v)->boxes->data)->layer) |
Definition at line 846 of file toporouter.c.
Definition at line 1787 of file toporouter.c.
#define VIA_COST_AS_DISTANCE MIL_TO_COORD (100.) |
Definition at line 69 of file toporouter.c.
Referenced by toporouter_new().
Definition at line 4657 of file toporouter.c.
Referenced by route().
void acquire_twonets | ( | toporouter_t * | r | ) |
Definition at line 7699 of file toporouter.c.
References PCBType::Data, END_LOOP, import_route(), line, PCB, RAT_LOOP, _toporouter_t::routes, and TEST_FLAG.
Referenced by toporouter().
GList* all_candidates_on_edge | ( | toporouter_edge_t * | e, |
toporouter_route_t * | routedata | ||
) |
Definition at line 3824 of file toporouter.c.
References BOARD, box, candidate_vertices(), constraint_route_test(), _toporouter_route_t::destvertices, edge_is_blocked, edge_routing, _toporouter_vertex_t::flags, new_temp_toporoutervertex_in_segment(), tedge_v1, tedge_v2, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, tvdistance, and VERTEX_FLAG_TEMP.
Referenced by triangle_all_candidate_points_from_edge(), and triangle_all_candidate_points_from_vertex().
static gdouble angle_span | ( | gdouble | a1, |
gdouble | a2 | ||
) | [inline, static] |
Definition at line 2931 of file toporouter.c.
References M_PI.
gint apply_route | ( | GList * | path, |
toporouter_route_t * | routedata | ||
) |
Definition at line 6774 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_vertex_t::flags, _toporouter_vertex_t::parent, _toporouter_vertex_t::route, _toporouter_edge_t::routing, routing_edge_insert(), _toporouter_vertex_t::routingedge, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, and VERTEX_FLAG_ROUTE.
Referenced by netscore_pairwise_calculation().
gdouble arc_angle | ( | toporouter_arc_t * | arc | ) |
Definition at line 5289 of file toporouter.c.
References _toporouter_arc_t::centre, vx, vy, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by export_pcb_drawarc(), oproute_calculate_tof(), and Puller().
void arc_ortho_projections | ( | toporouter_arc_t * | arc, |
toporouter_arc_t * | narc, | ||
gdouble * | b1, | ||
gdouble * | b2 | ||
) |
b1 is the projection in the direction of narc, while b2 is the perpendicular projection.
Definition at line 5391 of file toporouter.c.
References c, _toporouter_arc_t::centre, vx, vy, _toporouter_arc_t::x0, and _toporouter_arc_t::y0.
Referenced by calculate_arc_to_arc().
void build_cdt | ( | toporouter_t * | r, |
toporouter_layer_t * | l | ||
) |
Definition at line 2204 of file toporouter.c.
References _toporouter_vertex_t::bbox, _toporouter_constraint_t::box, buffer, _toporouter_bbox_t::constraints, toporouter_layer_t::constraints, _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, edge_v1, edge_v2, f, FALSE, gts_allow_floating_vertices, gts_delaunay_add_constraint(), gts_delaunay_add_vertex(), GTS_EDGE_CLASS, gts_face_class(), gts_face_new(), GTS_IN, GTS_OBJECT, gts_object_destroy(), GTS_ON, GTS_POINT, GTS_SEGMENT, gts_segments_are_intersecting(), gts_surface_add_face(), gts_surface_class(), gts_surface_foreach_face(), gts_surface_new(), gts_surface_print_stats(), gts_surface_traverse_destroy(), gts_surface_traverse_new(), gts_surface_write(), gts_triangle_class(), gts_triangle_enclosing(), gts_triangle_vertices(), GTS_VERTEX, GTS_VERTEX_CLASS, insert_constraint_edge(), _toporouter_t::layers, list_to_slist(), pick_first_face(), print_constraint(), print_vertex(), toporouter_layer_t::surface, tedge_v1, tedge_v2, TOPOROUTER_CONSTRAINT, toporouter_edge_class(), TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, toporouter_vertex_class(), TRUE, unconstrain(), vertex_between(), vertex_intersect(), toporouter_layer_t::vertices, vx, vy, and vz.
Referenced by import_geometry().
guint calculate_arc_to_arc | ( | toporouter_t * | ar, |
toporouter_arc_t * | parc, | ||
toporouter_arc_t * | arc | ||
) |
Definition at line 5432 of file toporouter.c.
References arc_ortho_projections(), _toporouter_arc_t::centre, coord_wind(), coords_on_line(), _toporouter_arc_t::dir, GTS_POINT, gts_point_distance(), m, perpendicular_gradient(), point_from_point_to_point(), point_gradient(), _toporouter_arc_t::r, vx, vy, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by oproute_check_all_loops(), and oproute_rubberband_segment().
void calculate_serpintine | ( | gdouble | delta, |
gdouble | r, | ||
gdouble | initiala, | ||
gdouble * | a, | ||
guint * | nhalfcycles | ||
) |
Definition at line 5746 of file toporouter.c.
void calculate_term_to_arc | ( | toporouter_vertex_t * | v, |
toporouter_arc_t * | arc, | ||
guint | dir | ||
) |
Definition at line 5341 of file toporouter.c.
References _toporouter_arc_t::centre, coord_wind(), coords_on_line(), _toporouter_arc_t::dir, GTS_POINT, gts_point_distance(), perpendicular_gradient(), point_from_point_to_point(), point_gradient(), _toporouter_arc_t::r, vx, vy, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by oproute_check_all_loops(), and oproute_rubberband_segment().
guint candidate_is_available | ( | toporouter_vertex_t * | pv, |
toporouter_vertex_t * | v | ||
) |
Definition at line 4660 of file toporouter.c.
References _toporouter_vertex_t::parent.
Referenced by route().
GList* candidate_vertices | ( | toporouter_vertex_t * | v1, |
toporouter_vertex_t * | v2, | ||
toporouter_vertex_t * | dest, | ||
toporouter_edge_t * | e | ||
) |
Definition at line 3479 of file toporouter.c.
References coord_move_towards_coord_values(), edge_capacity(), edge_flow(), _toporouter_vertex_t::flags, GTS_POINT, gts_point_distance(), GTS_VERTEX, min_spacing(), new_temp_toporoutervertex(), TOPOROUTER_IS_CONSTRAINT, VERTEX_FLAG_TEMP, vertex_move_towards_vertex_values(), vx, vy, x, and y.
Referenced by all_candidates_on_edge(), triangle_candidate_points_from_edge(), and triangle_candidate_points_from_vertex().
static gdouble cartesian_gradient | ( | gdouble | x0, |
gdouble | y0, | ||
gdouble | x1, | ||
gdouble | y1 | ||
) | [inline, static] |
Returns gradient of segment given by (x0,y0) & (x1,y1).
Definition at line 1321 of file toporouter.c.
References epsilon_equals().
Referenced by check_non_intersect_vertex(), line_line_distance_at_normal(), point_gradient(), read_pads(), segment_gradient(), and vertex_line_normal_intersection().
gdouble check_adj_pushing_vertex | ( | toporouter_oproute_t * | oproute, |
gdouble | x0, | ||
gdouble | y0, | ||
gdouble | x1, | ||
gdouble | y1, | ||
toporouter_vertex_t * | v, | ||
gdouble * | arcr, | ||
gint * | arcwind, | ||
toporouter_vertex_t ** | arc | ||
) |
Definition at line 5979 of file toporouter.c.
References coord_wind(), edge_min_spacing(), edge_routing, GTS_VERTEX, gts_vertex_neighbors(), min_oproute_net_spacing(), min_oproute_vertex_spacing(), n, tedge, tedge_v1, tedge_v2, TOPOROUTER_VERTEX, vertex_line_normal_intersection(), vx, and vy.
guint check_arc_for_loops | ( | gpointer | t1, |
toporouter_arc_t * | arc, | ||
gpointer | t2 | ||
) |
Returns non-zero if arc has loops.
Definition at line 5906 of file toporouter.c.
References coord_intersect_prop(), TOPOROUTER_ARC, TOPOROUTER_IS_VERTEX, TOPOROUTER_VERTEX, vx, vy, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by oproute_check_all_loops().
gdouble check_intersect_vertex | ( | gdouble | x0, |
gdouble | y0, | ||
gdouble | x1, | ||
gdouble | y1, | ||
toporouter_vertex_t * | pathv, | ||
toporouter_vertex_t * | arcv, | ||
toporouter_vertex_t * | opv, | ||
gint | wind, | ||
gint * | arcwind, | ||
gdouble * | arcr, | ||
guint | debug | ||
) |
Definition at line 5866 of file toporouter.c.
References coord_move_towards_coord_values(), edge_min_spacing(), edge_routing, EPSILON, min_spacing(), _toporouter_vertex_t::parent, _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, TOPOROUTER_IS_CONSTRAINT, tvdistance, tvertex_wind(), vertex_line_normal_intersection(), vx, vy, x, and y.
Referenced by oproute_rubberband_segment().
gdouble check_non_intersect_vertex | ( | gdouble | x0, |
gdouble | y0, | ||
gdouble | x1, | ||
gdouble | y1, | ||
toporouter_vertex_t * | pathv, | ||
toporouter_vertex_t * | arcv, | ||
toporouter_vertex_t * | opv, | ||
gint | wind, | ||
gint * | arcwind, | ||
gdouble * | arcr, | ||
guint | debug | ||
) |
Definition at line 5794 of file toporouter.c.
References cartesian_gradient(), _toporouter_vertex_t::child, coord_move_towards_coord_values(), coord_wind(), coords_on_line(), edge_min_spacing(), edge_routing, _toporouter_vertex_t::flags, m, MIL_TO_COORD, min_spacing(), _toporouter_vertex_t::parent, perpendicular_gradient(), _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, TOPOROUTER_IS_CONSTRAINT, tvdistance, tvertex_wind(), VERTEX_FLAG_ROUTE, vertex_line_normal_intersection(), vx, vy, x, and y.
Referenced by oproute_rubberband_segment().
gint check_speccut | ( | toporouter_oproute_t * | oproute, |
toporouter_vertex_t * | v1, | ||
toporouter_vertex_t * | v2, | ||
toporouter_edge_t * | e, | ||
toporouter_edge_t * | e1, | ||
toporouter_edge_t * | e2 | ||
) |
Definition at line 6407 of file toporouter.c.
References edge_routing, flow_from_edge_to_edge(), GTS_EDGE, GTS_EDGE_CLASS, gts_edge_new(), GTS_SEGMENT, gts_triangle_use_edges(), gts_triangle_vertex_opposite(), GTS_VERTEX, opposite_triangle(), _toporouter_edge_t::routing, segment_common_vertex(), speccut_edge_patch_links(), speccut_edge_routing_from_edge(), tedge, tedge_v1, tedge_v2, TOPOROUTER_CONSTRAINT, TOPOROUTER_EDGE, toporouter_edge_class(), TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, triangle_interior_capacity(), tvertex_wind(), vertex_line_normal_intersection(), vx, and vy.
Referenced by oproute_path_speccut().
guint check_triangle_interior_capacity | ( | GtsTriangle * | t, |
toporouter_vertex_t * | v, | ||
toporouter_vertex_t * | curpoint, | ||
toporouter_edge_t * | op_edge, | ||
toporouter_edge_t * | adj_edge1, | ||
toporouter_edge_t * | adj_edge2 | ||
) |
Definition at line 3408 of file toporouter.c.
References flow_from_edge_to_edge(), TOPOROUTER_IS_CONSTRAINT, and triangle_interior_capacity().
Referenced by triangle_all_candidate_points_from_edge(), and triangle_candidate_points_from_edge().
void clean_routing_edges | ( | toporouter_t * | r, |
toporouter_route_t * | data | ||
) |
Definition at line 4336 of file toporouter.c.
References _toporouter_route_t::alltemppoints, and temp_point_clean().
Referenced by route().
void closest_cluster_pair | ( | toporouter_t * | r, |
GList * | src_vertices, | ||
GList * | dest_vertices, | ||
toporouter_vertex_t ** | a, | ||
toporouter_vertex_t ** | b | ||
) |
Definition at line 3153 of file toporouter.c.
References _toporouter_t::flags, min, simple_h_cost(), TOPOROUTER_FLAG_GOFAR, TOPOROUTER_VERTEX, vertex_keepout_test(), and vz.
Referenced by route().
toporouter_vertex_t* closest_dest_vertex | ( | toporouter_t * | r, |
toporouter_vertex_t * | v, | ||
toporouter_route_t * | routedata | ||
) |
Definition at line 3195 of file toporouter.c.
References _toporouter_route_t::destvertices, _toporouter_t::flags, simple_h_cost(), TOPOROUTER_FLAG_GOFAR, TOPOROUTER_VERTEX, vx, vy, and vz.
Referenced by route().
toporouter_cluster_t* cluster_create | ( | toporouter_t * | r, |
toporouter_netlist_t * | netlist | ||
) |
Definition at line 2582 of file toporouter.c.
References _toporouter_cluster_t::boxes, _toporouter_cluster_t::c, c, _toporouter_netlist_t::clusters, malloc(), _toporouter_cluster_t::netlist, and _toporouter_cluster_t::pc.
Referenced by import_clusters().
toporouter_cluster_t* cluster_find | ( | toporouter_t * | r, |
gdouble | x, | ||
gdouble | y, | ||
gdouble | z | ||
) |
Definition at line 2831 of file toporouter.c.
References _toporouter_t::bboxtree, BOARD, box, _toporouter_bbox_t::cluster, coord_wind(), _toporouter_bbox_t::data, EPSILON, gts_bb_tree_stabbed(), GTS_OBJECT, gts_object_destroy(), gts_point_class(), gts_point_locate(), gts_point_new(), _toporouter_bbox_t::layer, line, LINE, print_bbox(), print_cluster(), _toporouter_bbox_t::surface, TOPOROUTER_BBOX, and _toporouter_bbox_t::type.
Referenced by import_route().
void cluster_join_bbox | ( | toporouter_cluster_t * | cluster, |
toporouter_bbox_t * | box | ||
) |
Definition at line 2618 of file toporouter.c.
References _toporouter_cluster_t::boxes, and _toporouter_bbox_t::cluster.
Referenced by import_clusters().
static gdouble cluster_keepaway | ( | toporouter_cluster_t * | cluster | ) | [inline, static] |
Definition at line 354 of file toporouter.c.
References lookup_keepaway(), _toporouter_cluster_t::netlist, and _toporouter_netlist_t::style.
Referenced by flow_from_edge_to_edge(), min_net_net_spacing(), min_oproute_net_spacing(), min_vertex_net_spacing(), and vertex_net_keepaway().
void cluster_merge | ( | toporouter_route_t * | routedata | ) |
Definition at line 7234 of file toporouter.c.
References _toporouter_cluster_t::c, _toporouter_netlist_t::clusters, _toporouter_route_t::dest, FOREACH_CLUSTER, FOREACH_END, _toporouter_route_t::netlist, and _toporouter_route_t::src.
Referenced by netlist_recalculate(), roar_detour_route(), roar_route(), and rubix_router().
static gdouble cluster_thickness | ( | toporouter_cluster_t * | cluster | ) | [inline, static] |
Definition at line 361 of file toporouter.c.
References lookup_thickness(), _toporouter_cluster_t::netlist, and _toporouter_netlist_t::style.
Referenced by flow_from_edge_to_edge(), min_net_net_spacing(), min_oproute_net_spacing(), min_vertex_net_spacing(), and vertex_net_thickness().
GList* cluster_vertices | ( | toporouter_t * | r, |
toporouter_cluster_t * | c | ||
) |
Definition at line 2534 of file toporouter.c.
References box, _toporouter_cluster_t::c, _toporouter_netlist_t::clusters, _toporouter_t::flags, FOREACH_BBOX, FOREACH_CLUSTER, FOREACH_END, LINE, _toporouter_cluster_t::netlist, tedge_v1, tedge_v2, TOPOROUTER_FLAG_AFTERRUBIX, and TOPOROUTER_VERTEX.
Referenced by route().
gint compare_points | ( | gconstpointer | a, |
gconstpointer | b | ||
) |
Definition at line 2808 of file toporouter.c.
References GTS_POINT, _GtsPoint::x, and _GtsPoint::y.
gint compare_routedata_ascending | ( | gconstpointer | a, |
gconstpointer | b | ||
) |
Definition at line 6822 of file toporouter.c.
References _toporouter_route_t::score.
gint compare_rubberband_arcs | ( | toporouter_rubberband_arc_t * | a, |
toporouter_rubberband_arc_t * | b | ||
) |
Definition at line 5943 of file toporouter.c.
References _toporouter_rubberband_arc_t::d.
Referenced by oproute_rubberband_segment().
gint compare_segments | ( | gconstpointer | a, |
gconstpointer | b | ||
) |
Definition at line 2823 of file toporouter.c.
GList* compute_candidate_points | ( | toporouter_t * | tr, |
toporouter_layer_t * | l, | ||
toporouter_vertex_t * | curpoint, | ||
toporouter_route_t * | data, | ||
toporouter_vertex_t ** | closestdest | ||
) |
Definition at line 4223 of file toporouter.c.
References _toporouter_route_t::alltemppoints, _toporouter_cluster_t::c, edge, EDGE_FLAG_DIRECTCONNECTION, _toporouter_t::flags, _toporouter_vertex_t::flags, GTS_EDGE, GTS_SEGMENT, GTS_TRIANGLE, gts_triangle_vertex_opposite(), GTS_VERTEX, gts_vertex_triangles(), gts_vertices_are_connected(), _toporouter_vertex_t::parent, routedata_insert_temppoints(), _toporouter_vertex_t::routingedge, _toporouter_route_t::src, _toporouter_route_t::srcvertices, TOPOROUTER_EDGE, TOPOROUTER_FLAG_LEASTINVALID, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, triangle_all_candidate_points_from_edge(), triangle_all_candidate_points_from_vertex(), triangle_candidate_points_from_edge(), triangle_candidate_points_from_vertex(), vertex_bbox(), VERTEX_FLAG_TEMP, vertex_keepout_test(), and vertex_wind().
Referenced by route().
char* constraint_netlist | ( | toporouter_constraint_t * | c | ) |
Definition at line 602 of file toporouter.c.
References _toporouter_constraint_t::box, box, _toporouter_bbox_t::cluster, _toporouter_netlist_t::netlist, and _toporouter_cluster_t::netlist.
Referenced by triangle_candidate_points_from_vertex().
static gint constraint_route_test | ( | toporouter_constraint_t * | c, |
toporouter_route_t * | routedata | ||
) | [inline, static] |
Definition at line 3815 of file toporouter.c.
References _toporouter_constraint_t::box, _toporouter_cluster_t::c, _toporouter_bbox_t::cluster, _toporouter_route_t::dest, _toporouter_cluster_t::netlist, and _toporouter_route_t::src.
Referenced by all_candidates_on_edge(), and triangle_candidate_points_from_edge().
static double coord_angle | ( | double | ax, |
double | ay, | ||
double | bx, | ||
double | by | ||
) | [static] |
Definition at line 2528 of file toporouter.c.
Referenced by export_pcb_drawarc().
void coord_intersect | ( | gdouble | ax, |
gdouble | ay, | ||
gdouble | bx, | ||
gdouble | by, | ||
gdouble | cx, | ||
gdouble | cy, | ||
gdouble | dx, | ||
gdouble | dy, | ||
gdouble * | rx, | ||
gdouble * | ry | ||
) |
intersection vertex: AB and CD must share a point interior to both segments.
Definition at line 1485 of file toporouter.c.
static bool coord_intersect_prop | ( | double | ax, |
double | ay, | ||
double | bx, | ||
double | by, | ||
double | cx, | ||
double | cy, | ||
double | dx, | ||
double | dy | ||
) | [static] |
Proper intersection: AB and CD must share a point interior to both segments.
Definition at line 1396 of file toporouter.c.
References coord_wind().
Referenced by check_arc_for_loops(), and oproute_rubberband_segment().
static void coord_move_towards_coord_values | ( | double | ax, |
double | ay, | ||
double | px, | ||
double | py, | ||
double | d, | ||
double * | x, | ||
double * | y | ||
) | [static] |
Moves vertex v d units in the direction of vertex p.
Definition at line 819 of file toporouter.c.
Referenced by candidate_vertices(), check_intersect_vertex(), check_non_intersect_vertex(), and create_board_edge().
static gint coord_wind | ( | gdouble | ax, |
gdouble | ay, | ||
gdouble | bx, | ||
gdouble | by, | ||
gdouble | cx, | ||
gdouble | cy | ||
) | [inline, static] |
Definition at line 776 of file toporouter.c.
References EPSILON.
Referenced by calculate_arc_to_arc(), calculate_term_to_arc(), check_adj_pushing_vertex(), check_non_intersect_vertex(), cluster_find(), coord_intersect_prop(), export_pcb_drawarc(), and oproute_rubberband_segment().
static void coords_on_line | ( | double | ax, |
gdouble | ay, | ||
double | m, | ||
double | r, | ||
double * | b0x, | ||
double * | b0y, | ||
double * | b1x, | ||
double * | b1y | ||
) | [static] |
coords_on_line: Given coordinates ax, ay, gradient m, and radius r:
Definition at line 1277 of file toporouter.c.
References c.
Referenced by calculate_arc_to_arc(), calculate_term_to_arc(), and check_non_intersect_vertex().
static void create_board_edge | ( | double | x0, |
double | y0, | ||
double | x1, | ||
double | y1, | ||
int | layer, | ||
GList ** | vlist | ||
) | [static] |
Definition at line 2104 of file toporouter.c.
References BOARD_EDGE_RESOLUTION, coord_move_towards_coord_values(), GTS_VERTEX_CLASS, gts_vertex_new(), MIN, toporouter_vertex_class(), x, and y.
Referenced by read_board_constraints().
void delaunay_create_from_vertices | ( | GList * | vertices, |
GtsSurface ** | surface, | ||
GtsTriangle ** | t | ||
) |
Definition at line 1527 of file toporouter.c.
References f, FALSE, gts_allow_floating_vertices, gts_delaunay_add_vertex(), GTS_EDGE_CLASS, gts_face_class(), gts_face_new(), GTS_OBJECT, gts_object_destroy(), gts_surface_add_face(), gts_surface_class(), gts_surface_new(), gts_triangle_class(), gts_triangle_enclosing(), gts_triangle_vertices(), GTS_VERTEX_CLASS, print_vertex(), toporouter_edge_class(), TOPOROUTER_VERTEX, toporouter_vertex_class(), and TRUE.
Referenced by toporouter_bbox_create().
void delete_route | ( | toporouter_route_t * | routedata, |
guint | destroy | ||
) |
Definition at line 6699 of file toporouter.c.
References _toporouter_route_t::alltemppoints, _toporouter_vertex_t::child, _toporouter_route_t::curpoint, EDGE_FLAG_DIRECTCONNECTION, _toporouter_edge_t::flags, _toporouter_vertex_t::flags, GTS_OBJECT, gts_object_destroy(), GTS_VERTEX, gts_vertices_are_connected(), _toporouter_vertex_t::parent, _toporouter_route_t::path, _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, _toporouter_route_t::score, TOPOROUTER_CONSTRAINT, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, and VERTEX_FLAG_ROUTE.
Referenced by netscore_create(), netscore_pairwise_calculation(), roar_detour_route(), and roar_route().
void delete_vertex | ( | toporouter_vertex_t * | v | ) |
Definition at line 3582 of file toporouter.c.
References _toporouter_vertex_t::flags, GTS_OBJECT, gts_object_destroy(), _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, and VERTEX_FLAG_TEMP.
void detour_router | ( | toporouter_t * | r | ) |
Definition at line 7537 of file toporouter.c.
References _toporouter_route_t::detourscore, _toporouter_t::flags, n, _toporouter_route_t::path, path_score(), roar_detour_route(), ROAR_DETOUR_THRESHOLD, route_detour_compare(), _toporouter_t::routednets, _toporouter_route_t::score, TOPOROUTER_FLAG_DETOUR, TOPOROUTER_ROUTE, and TRUE.
Referenced by hybrid_router().
void edge_adjacent_vertices | ( | toporouter_edge_t * | e, |
toporouter_vertex_t * | v, | ||
toporouter_vertex_t ** | v1, | ||
toporouter_vertex_t ** | v2 | ||
) |
Definition at line 3458 of file toporouter.c.
References edge_routing, edge_routing_next_not_temp(), edge_routing_prev_not_temp(), tedge_v1, and tedge_v2.
Referenced by triangle_candidate_points_from_edge().
gdouble edge_capacity | ( | toporouter_edge_t * | e | ) |
Definition at line 2939 of file toporouter.c.
References edge_v1, edge_v2, GTS_POINT, and gts_point_distance().
Referenced by candidate_vertices().
toporouter_vertex_t* edge_closest_vertex | ( | toporouter_edge_t * | e, |
toporouter_vertex_t * | v | ||
) |
Definition at line 7029 of file toporouter.c.
References edge_routing, GTS_POINT, gts_point_distance2(), _toporouter_vertex_t::routingedge, and TOPOROUTER_VERTEX.
gdouble edge_flow | ( | toporouter_edge_t * | e, |
toporouter_vertex_t * | v1, | ||
toporouter_vertex_t * | v2, | ||
toporouter_vertex_t * | dest | ||
) |
Definition at line 2945 of file toporouter.c.
References edge_routing, min_spacing(), min_vertex_net_spacing(), tedge_v1, tedge_v2, and TOPOROUTER_VERTEX.
Referenced by candidate_vertices().
gdouble edge_min_spacing | ( | GList * | list, |
toporouter_edge_t * | e, | ||
toporouter_vertex_t * | v, | ||
guint | debug | ||
) |
Definition at line 5081 of file toporouter.c.
References edge_routing_next, edge_routing_prev, edge_v1, edge_v2, EPSILON, _toporouter_vertex_t::flags, GTS_POINT, gts_point_distance(), gts_point_distance2(), MIN, min_spacing(), pathvertex_arcing_through_constraint(), _toporouter_vertex_t::route, tedge_v1, tedge_v2, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, VERTEX_FLAG_TEMP, and vertices_connected().
Referenced by check_adj_pushing_vertex(), check_intersect_vertex(), and check_non_intersect_vertex().
GList* edge_routing_first_not_temp | ( | toporouter_edge_t * | e | ) |
Definition at line 3550 of file toporouter.c.
References edge_routing, _toporouter_vertex_t::flags, TOPOROUTER_VERTEX, and VERTEX_FLAG_TEMP.
Referenced by triangle_candidate_points_from_vertex().
GList* edge_routing_last_not_temp | ( | toporouter_edge_t * | e | ) |
Definition at line 3566 of file toporouter.c.
References edge_routing, _toporouter_vertex_t::flags, TOPOROUTER_VERTEX, and VERTEX_FLAG_TEMP.
Referenced by triangle_candidate_points_from_vertex().
toporouter_vertex_t* edge_routing_next_not_temp | ( | toporouter_edge_t * | e, |
GList * | list | ||
) |
Definition at line 3428 of file toporouter.c.
References _toporouter_vertex_t::flags, tedge_v2, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, and VERTEX_FLAG_TEMP.
Referenced by edge_adjacent_vertices(), gcost(), and triangle_candidate_points_from_edge().
toporouter_vertex_t* edge_routing_prev_not_temp | ( | toporouter_edge_t * | e, |
GList * | list | ||
) |
Definition at line 3443 of file toporouter.c.
References _toporouter_vertex_t::flags, tedge_v1, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, and VERTEX_FLAG_TEMP.
Referenced by edge_adjacent_vertices(), gcost(), and triangle_candidate_points_from_edge().
static guint edges_third_edge | ( | GtsSegment * | s1, |
GtsSegment * | s2, | ||
toporouter_vertex_t ** | v1, | ||
toporouter_vertex_t ** | v2 | ||
) | [inline, static] |
Definition at line 3300 of file toporouter.c.
References TOPOROUTER_VERTEX, _GtsSegment::v1, and _GtsSegment::v2.
Referenced by oproute_path_speccut().
static guint epsilon_equals | ( | gdouble | a, |
gdouble | b | ||
) | [inline, static] |
Definition at line 612 of file toporouter.c.
References EPSILON.
Referenced by cartesian_gradient(), new_temp_toporoutervertex(), and triangle_interior_capacity().
Definition at line 7773 of file toporouter.c.
References AddObjectToCreateUndoList(), ALLPAD_LOOP, CreateDrawnLineOnLayer(), CreateNewVia(), CURRENT, PCBType::Data, Draw(), DrawLine(), DrawVia(), END_LOOP, IncrementUndoSerialNumber(), SettingType::Keepaway, line, SettingType::LineThickness, NoFlags, PCB, Settings, TEST_FLAG, SettingType::ViaDrillingHole, and SettingType::ViaThickness.
void export_oproutes | ( | toporouter_t * | ar, |
toporouter_oproute_t * | oproute | ||
) |
Definition at line 5637 of file toporouter.c.
References _toporouter_oproute_t::arcs, arcs, LayerGroupType::Entries, export_pcb_drawarc(), export_pcb_drawline(), layer, _toporouter_oproute_t::layergroup, PCBType::LayerGroups, lookup_keepaway(), lookup_thickness(), PCB, _toporouter_oproute_t::style, _toporouter_oproute_t::term1, _toporouter_oproute_t::term2, thickness, TOPOROUTER_ARC, vx, vy, _toporouter_t::wiring_score, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by toporouter_export().
gdouble export_pcb_drawarc | ( | guint | layer, |
toporouter_arc_t * | a, | ||
guint | thickness, | ||
guint | keepaway | ||
) |
Definition at line 5302 of file toporouter.c.
References AddObjectToCreateUndoList(), arc_angle(), _toporouter_arc_t::centre, coord_angle(), coord_wind(), CreateNewArcOnLayer(), _toporouter_arc_t::dir, LAYER_PTR, M_PI, MakeFlags(), PCB, _toporouter_arc_t::r, TEST_FLAG, vx, vy, wind(), _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by export_oproutes().
gdouble export_pcb_drawline | ( | guint | layer, |
guint | x0, | ||
guint | y0, | ||
guint | x1, | ||
guint | y1, | ||
guint | thickness, | ||
guint | keepaway | ||
) |
Definition at line 5273 of file toporouter.c.
References AddObjectToCreateUndoList(), CreateDrawnLineOnLayer(), LAYER_PTR, line, MakeFlags(), PCB, and TEST_FLAG.
Referenced by export_oproutes().
toporouter_netlist_t* find_netlist_by_name | ( | toporouter_t * | r, |
char * | name | ||
) |
Definition at line 7715 of file toporouter.c.
References FOREACH_END, FOREACH_NETLIST, and _toporouter_t::netlists.
gdouble flow_from_edge_to_edge | ( | GtsTriangle * | t, |
toporouter_edge_t * | e1, | ||
toporouter_edge_t * | e2, | ||
toporouter_vertex_t * | common_v, | ||
toporouter_vertex_t * | curpoint | ||
) |
Returns the flow from e1 to e2, and the flow from the vertex oppisate e1 to e1 and the vertex oppisate e2 to e2.
Definition at line 3331 of file toporouter.c.
References box, _toporouter_bbox_t::cluster, cluster_keepaway(), cluster_thickness(), edge_routing, edge_v1, GTS_SEGMENT, gts_triangle_edge_opposite(), GTS_VERTEX, MAX, min_spacing(), segment_common_vertex(), TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, vertex_bbox(), VERTEX_FLAG_ROUTE, vertex_net_keepaway(), and vertex_net_thickness().
Referenced by check_speccut(), and check_triangle_interior_capacity().
void free_list_elements | ( | gpointer | data, |
gpointer | user_data | ||
) |
Definition at line 5947 of file toporouter.c.
Referenced by oproute_rubberband_segment().
gdouble gcost | ( | toporouter_t * | r, |
toporouter_route_t * | data, | ||
toporouter_vertex_t * | srcv, | ||
toporouter_vertex_t * | v, | ||
toporouter_vertex_t * | pv, | ||
guint * | n, | ||
toporouter_netlist_t * | pair | ||
) |
Definition at line 4619 of file toporouter.c.
References edge_routing_next_not_temp(), edge_routing_prev_not_temp(), _toporouter_t::flags, _toporouter_vertex_t::gcost, _toporouter_vertex_t::gn, _toporouter_route_t::netlist, _toporouter_vertex_t::route, _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, _toporouter_route_t::srcvertices, TOPOROUTER_FLAG_DETOUR, TOPOROUTER_FLAG_LEASTINVALID, TOPOROUTER_IS_CONSTRAINT, tvdistance, vertices_routing_conflict_cost(), and vz.
Referenced by route().
guint groupcount | ( | void | ) |
Definition at line 1161 of file toporouter.c.
References PCBType::LayerGroups, max_group, LayerGroupType::Number, and PCB.
Referenced by import_clusters(), import_geometry(), snapshot(), and toporouter_free().
void hid_toporouter_init | ( | ) |
Definition at line 7875 of file toporouter.c.
guint hybrid_router | ( | toporouter_t * | r | ) |
Definition at line 7601 of file toporouter.c.
References _, detour_router(), _toporouter_t::failednets, _toporouter_t::flags, Message(), roar_router(), rubix_router(), TOPOROUTER_FLAG_AFTERORDER, TOPOROUTER_FLAG_AFTERRUBIX, and TOPOROUTER_FLAG_GOFAR.
Referenced by toporouter().
void import_clusters | ( | toporouter_t * | r | ) |
Definition at line 2641 of file toporouter.c.
References box, cluster_create(), cluster_join_bbox(), CollectSubnets(), connection(), CONNECTION_LOOP, END_LOOP, FreeNetListListMemory(), groupcount(), LINE, line, m, NET_LOOP, netlist_create(), NETLIST_LOOP, PAD, pcb_printf(), PIN, pin, POLYGON, toporouter_bbox_locate(), and VIA.
Referenced by import_geometry().
void import_geometry | ( | toporouter_t * | r | ) |
Definition at line 2723 of file toporouter.c.
References _toporouter_t::bboxes, _toporouter_t::bboxtree, build_cdt(), toporouter_layer_t::constraints, PCBType::Data, END_LOOP, LayerGroupType::Entries, GROUP_LOOP, groupcount(), gts_bb_tree_new(), import_clusters(), layer, PCBType::LayerGroups, _toporouter_t::layers, malloc(), max_group, LayerGroupType::Number, PCB, read_board_constraints(), read_lines(), read_pads(), read_points(), and toporouter_layer_t::vertices.
Referenced by toporouter().
toporouter_route_t* import_route | ( | toporouter_t * | r, |
RatType * | line | ||
) |
Definition at line 6669 of file toporouter.c.
References cluster_find(), _toporouter_route_t::dest, _toporouter_t::failednets, RatType::group1, RatType::group2, _toporouter_cluster_t::netlist, _toporouter_route_t::netlist, pcb_printf(), routedata_create(), _toporouter_netlist_t::routes, _toporouter_t::routes, and _toporouter_route_t::src.
Referenced by acquire_twonets().
static void init_cost_matrix | ( | gdouble * | m, |
guint | n | ||
) | [inline, static] |
Definition at line 6843 of file toporouter.c.
References n.
void insert_centre_point | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
gdouble | x, | ||
gdouble | y | ||
) |
Definition at line 1719 of file toporouter.c.
References f, GTS_POINT, GTS_VERTEX_CLASS, gts_vertex_new(), toporouter_vertex_class(), toporouter_layer_t::vertices, _GtsPoint::x, and _GtsPoint::y.
GList* insert_constraint_edge | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
gdouble | x1, | ||
gdouble | y1, | ||
guint | flags1, | ||
gdouble | x2, | ||
gdouble | y2, | ||
guint | flags2, | ||
toporouter_bbox_t * | box | ||
) |
Definition at line 1648 of file toporouter.c.
References box, toporouter_layer_t::constraints, GTS_EDGE_CLASS, gts_edge_new(), GTS_VERTEX_CLASS, gts_vertex_new(), _toporouter_t::layers, _GtsVertex::p, TOPOROUTER_CONSTRAINT, toporouter_constraint_class(), TOPOROUTER_VERTEX, toporouter_vertex_class(), toporouter_layer_t::vertices, _GtsPoint::x, and _GtsPoint::y.
Referenced by build_cdt(), insert_constraints_from_list(), and read_lines().
void insert_constraints_from_list | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
GList * | vlist, | ||
toporouter_bbox_t * | box | ||
) |
Definition at line 1695 of file toporouter.c.
References _toporouter_bbox_t::constraints, _toporouter_vertex_t::flags, insert_constraint_edge(), TOPOROUTER_VERTEX, vx, and vy.
Referenced by read_board_constraints(), read_pads(), and read_points().
GtsVertex* insert_vertex | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
gdouble | x, | ||
gdouble | y, | ||
toporouter_bbox_t * | box | ||
) |
Definition at line 1624 of file toporouter.c.
References box, GTS_VERTEX_CLASS, gts_vertex_new(), _toporouter_t::layers, _GtsVertex::p, TOPOROUTER_VERTEX, toporouter_vertex_class(), toporouter_layer_t::vertices, _GtsPoint::x, and _GtsPoint::y.
Referenced by read_pads(), and read_points().
gdouble line_line_distance_at_normal | ( | gdouble | line1_x1, |
gdouble | line1_y1, | ||
gdouble | line1_x2, | ||
gdouble | line1_y2, | ||
gdouble | line2_x1, | ||
gdouble | line2_y1, | ||
gdouble | line2_x2, | ||
gdouble | line2_y2, | ||
gdouble | x, | ||
gdouble | y | ||
) |
Definition at line 5722 of file toporouter.c.
References cartesian_gradient(), and perpendicular_gradient().
GSList* list_to_slist | ( | GList * | i | ) |
Definition at line 1570 of file toporouter.c.
Referenced by build_cdt(), and toporouter_bbox_create_from_points().
gdouble lookup_keepaway | ( | char * | name | ) |
Lookup a keepaway.
Definition at line 325 of file toporouter.c.
References END_LOOP, SettingType::Keepaway, RouteStyleType::Keepaway, RouteStyleType::Name, PCB, Settings, style, and STYLE_LOOP.
Referenced by cluster_keepaway(), export_oproutes(), min_oproute_net_spacing(), min_oproute_vertex_spacing(), oproute_min_spacing(), pad_rad(), pin_rad(), and toporouter_draw_vertex().
gdouble lookup_thickness | ( | char * | name | ) |
Lookup thickness.
Definition at line 342 of file toporouter.c.
References END_LOOP, SettingType::LineThickness, RouteStyleType::Name, PCB, Settings, style, STYLE_LOOP, and RouteStyleType::Thick.
Referenced by cluster_thickness(), export_oproutes(), min_oproute_net_spacing(), min_oproute_vertex_spacing(), oproute_min_spacing(), pad_rad(), and pin_rad().
Definition at line 1736 of file toporouter.c.
References gts_point_class(), gts_point_new(), _GtsPoint::x, and _GtsPoint::y.
gdouble min_net_net_spacing | ( | toporouter_vertex_t * | v1, |
toporouter_vertex_t * | v2 | ||
) |
Definition at line 924 of file toporouter.c.
References cluster_keepaway(), cluster_thickness(), MAX, _toporouter_vertex_t::route, and _toporouter_route_t::src.
gdouble min_oproute_net_spacing | ( | toporouter_oproute_t * | oproute, |
toporouter_vertex_t * | v2 | ||
) |
Definition at line 907 of file toporouter.c.
References cluster_keepaway(), cluster_thickness(), lookup_keepaway(), lookup_thickness(), MAX, _toporouter_vertex_t::route, _toporouter_route_t::src, and _toporouter_oproute_t::style.
Referenced by check_adj_pushing_vertex().
static gdouble min_oproute_vertex_spacing | ( | toporouter_oproute_t * | oproute, |
toporouter_vertex_t * | v2 | ||
) | [inline, static] |
Definition at line 890 of file toporouter.c.
References lookup_keepaway(), lookup_thickness(), MAX, _toporouter_oproute_t::style, vertex_net_keepaway(), and vertex_net_thickness().
Referenced by check_adj_pushing_vertex().
static gdouble min_spacing | ( | toporouter_vertex_t * | v1, |
toporouter_vertex_t * | v2 | ||
) | [inline, static] |
Definition at line 849 of file toporouter.c.
References MAX, TOPOROUTER_VERTEX, vertex_net_keepaway(), and vertex_net_thickness().
Referenced by candidate_vertices(), check_intersect_vertex(), check_non_intersect_vertex(), edge_flow(), edge_min_spacing(), flow_from_edge_to_edge(), space_edge(), and toporouter_draw_surface().
static gdouble min_vertex_net_spacing | ( | toporouter_vertex_t * | v1, |
toporouter_vertex_t * | v2 | ||
) | [inline, static] |
Definition at line 873 of file toporouter.c.
References cluster_keepaway(), cluster_thickness(), MAX, TOPOROUTER_VERTEX, vertex_bbox(), vertex_net_keepaway(), and vertex_net_thickness().
Referenced by edge_flow().
toporouter_netlist_t* netlist_create | ( | toporouter_t * | r, |
char * | netlist, | ||
char * | style | ||
) |
Definition at line 2627 of file toporouter.c.
References _toporouter_netlist_t::clusters, malloc(), _toporouter_netlist_t::netlist, _toporouter_t::netlists, _toporouter_netlist_t::pair, _toporouter_netlist_t::routed, _toporouter_netlist_t::routes, style, and _toporouter_netlist_t::style.
Referenced by import_clusters().
void netlist_recalculate | ( | toporouter_netlist_t * | netlist, |
GList * | ignore | ||
) |
Definition at line 7246 of file toporouter.c.
References cluster_merge(), _toporouter_netlist_t::clusters, FOREACH_CLUSTER, FOREACH_END, n, _toporouter_netlist_t::routed, and TOPOROUTER_ROUTE.
Referenced by netlists_recalculate(), and roar_route().
void netlists_recalculate | ( | GList * | netlists, |
GList * | ignore | ||
) |
Definition at line 7263 of file toporouter.c.
References netlist_recalculate(), and TOPOROUTER_NETLIST.
Referenced by roar_detour_route(), and roar_route().
void netlists_rollback | ( | GList * | netlists | ) |
Definition at line 7273 of file toporouter.c.
References _toporouter_netlist_t::clusters, FOREACH_CLUSTER, FOREACH_END, and TOPOROUTER_NETLIST.
toporouter_netscore_t* netscore_create | ( | toporouter_t * | r, |
toporouter_route_t * | routedata, | ||
guint | n, | ||
guint | id | ||
) |
Definition at line 6854 of file toporouter.c.
References delete_route(), _toporouter_route_t::dest, _toporouter_route_t::detourscore, toporouter_netscore_t::id, malloc(), n, toporouter_netscore_t::pairwise_detour_sum, toporouter_netscore_t::pairwise_fails, toporouter_netscore_t::pairwise_nodetour, _toporouter_route_t::path, print_cluster(), toporouter_netscore_t::r, route(), toporouter_netscore_t::routedata, _toporouter_route_t::score, toporouter_netscore_t::score, _toporouter_route_t::src, and _toporouter_route_t::topopath.
Referenced by order_nets_preroute_greedy().
static void netscore_destroy | ( | toporouter_netscore_t * | netscore | ) | [inline, static] |
Definition at line 6891 of file toporouter.c.
References toporouter_netscore_t::pairwise_nodetour.
Referenced by order_nets_preroute_greedy().
void netscore_pairwise_calculation | ( | toporouter_netscore_t * | netscore, |
GPtrArray * | netscores | ||
) |
Definition at line 6913 of file toporouter.c.
References apply_route(), delete_route(), _toporouter_route_t::dest, toporouter_netscore_t::id, _toporouter_route_t::netlist, toporouter_netscore_t::pairwise_detour_sum, toporouter_netscore_t::pairwise_fails, toporouter_netscore_t::pairwise_nodetour, toporouter_netscore_t::r, remove_route(), route(), toporouter_netscore_t::routedata, routedata_create(), _toporouter_route_t::score, _toporouter_route_t::src, and _toporouter_route_t::topopath.
Referenced by order_nets_preroute_greedy().
gint netscore_pairwise_compare | ( | toporouter_netscore_t ** | a, |
toporouter_netscore_t ** | b | ||
) |
Definition at line 6975 of file toporouter.c.
Referenced by toporouter_new().
gint netscore_pairwise_size_compare | ( | toporouter_netscore_t ** | a, |
toporouter_netscore_t ** | b | ||
) |
Definition at line 6952 of file toporouter.c.
toporouter_rubberband_arc_t* new_rubberband_arc | ( | toporouter_vertex_t * | pathv, |
toporouter_vertex_t * | arcv, | ||
gdouble | r, | ||
gdouble | d, | ||
gint | wind, | ||
GList * | list | ||
) |
Definition at line 5930 of file toporouter.c.
References _toporouter_rubberband_arc_t::arcv, _toporouter_rubberband_arc_t::d, _toporouter_rubberband_arc_t::list, malloc(), _toporouter_rubberband_arc_t::pathv, _toporouter_rubberband_arc_t::r, wind(), and _toporouter_rubberband_arc_t::wind.
toporouter_vertex_t* new_temp_toporoutervertex | ( | gdouble | x, |
gdouble | y, | ||
toporouter_edge_t * | e | ||
) |
*
Definition at line 3091 of file toporouter.c.
References edge_routing, edge_v1, epsilon_equals(), _toporouter_vertex_t::flags, GTS_VERTEX_CLASS, gts_vertex_new(), _toporouter_edge_t::routing, routing_edge_insert(), _toporouter_vertex_t::routingedge, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, toporouter_vertex_class(), VERTEX_FLAG_TEMP, vx, vy, and vz.
Referenced by candidate_vertices(), and new_temp_toporoutervertex_in_segment().
toporouter_vertex_t* new_temp_toporoutervertex_in_segment | ( | toporouter_edge_t * | e, |
toporouter_vertex_t * | v, | ||
gdouble | r, | ||
toporouter_vertex_t * | ref | ||
) |
Create vertex on edge e at radius r from v, closest to ref.
Definition at line 3122 of file toporouter.c.
References edge_gradient, m, new_temp_toporoutervertex(), vertices_on_line(), vx, vy, toporouter_spoint_t::x, and toporouter_spoint_t::y.
Referenced by all_candidates_on_edge(), triangle_candidate_points_from_edge(), and triangle_candidate_points_from_vertex().
GtsTriangle* opposite_triangle | ( | GtsTriangle * | t, |
toporouter_edge_t * | e | ||
) |
Definition at line 6296 of file toporouter.c.
References GTS_EDGE, and GTS_TRIANGLE.
Referenced by check_speccut().
void oproute_calculate_tof | ( | toporouter_oproute_t * | oproute | ) |
Definition at line 5690 of file toporouter.c.
References arc_angle(), _toporouter_oproute_t::arcs, arcs, GTS_POINT, gts_point_distance(), _toporouter_arc_t::r, _toporouter_oproute_t::term1, _toporouter_oproute_t::term2, _toporouter_oproute_t::tof, TOPOROUTER_ARC, vx, vy, _toporouter_arc_t::x1, and _toporouter_arc_t::y1.
void oproute_check_all_loops | ( | toporouter_t * | r, |
toporouter_oproute_t * | oproute | ||
) |
Definition at line 6263 of file toporouter.c.
References _toporouter_oproute_t::arcs, calculate_arc_to_arc(), calculate_term_to_arc(), check_arc_for_loops(), _toporouter_oproute_t::term1, _toporouter_oproute_t::term2, TOPOROUTER_ARC, TOPOROUTER_IS_ARC, and TOPOROUTER_VERTEX.
Referenced by oproute_rubberband().
void oproute_free | ( | toporouter_oproute_t * | oproute | ) |
Definition at line 5674 of file toporouter.c.
References _toporouter_oproute_t::arcs, _toporouter_arc_t::centre, _toporouter_vertex_t::flags, GTS_OBJECT, gts_object_destroy(), and VERTEX_FLAG_TEMP.
Referenced by toporouter_export().
gdouble oproute_min_spacing | ( | toporouter_oproute_t * | a, |
toporouter_oproute_t * | b | ||
) |
Definition at line 5759 of file toporouter.c.
References lookup_keepaway(), lookup_thickness(), MAX, and _toporouter_oproute_t::style.
gint oproute_path_speccut | ( | toporouter_oproute_t * | oproute | ) |
Definition at line 6517 of file toporouter.c.
References check_speccut(), edges_third_edge(), _toporouter_vertex_t::flags, GTS_SEGMENT, _toporouter_oproute_t::path, _toporouter_vertex_t::routingedge, tedge, tedge_v1, tedge_v2, TOPOROUTER_VERTEX, and VERTEX_FLAG_SPECCUT.
Referenced by oproute_rubberband().
toporouter_oproute_t* oproute_rubberband | ( | toporouter_t * | r, |
GList * | path | ||
) |
Definition at line 6557 of file toporouter.c.
References _toporouter_oproute_t::arcs, _toporouter_vertex_t::child, _toporouter_bbox_t::cluster, _toporouter_oproute_t::layergroup, malloc(), MIL_TO_COORD, _toporouter_netlist_t::netlist, _toporouter_oproute_t::netlist, _toporouter_cluster_t::netlist, oproute_check_all_loops(), oproute_path_speccut(), oproute_rubberband_segment(), _toporouter_vertex_t::parent, _toporouter_oproute_t::path, path_set_oproute(), _toporouter_oproute_t::serp, _toporouter_netlist_t::style, _toporouter_oproute_t::style, _toporouter_oproute_t::term1, _toporouter_oproute_t::term2, TOPOROUTER_VERTEX, vertex_bbox(), vx, vy, and vz.
Referenced by toporouter_export().
GList* oproute_rubberband_segment | ( | toporouter_t * | r, |
toporouter_oproute_t * | oproute, | ||
GList * | path, | ||
gpointer | t1, | ||
gpointer | t2, | ||
guint | debug | ||
) |
path is t1 path.
Definition at line 6042 of file toporouter.c.
References ARC_CHECKS, arcs, _toporouter_rubberband_arc_t::arcv, calculate_arc_to_arc(), calculate_term_to_arc(), _toporouter_arc_t::centre, check_intersect_vertex(), check_non_intersect_vertex(), compare_rubberband_arcs(), coord_intersect_prop(), coord_wind(), _toporouter_rubberband_arc_t::d, free_list_elements(), _toporouter_rubberband_arc_t::list, max, _toporouter_oproute_t::netlist, _toporouter_rubberband_arc_t::pathv, print_vertex(), px, py, _toporouter_rubberband_arc_t::r, _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, _toporouter_oproute_t::term1, _toporouter_oproute_t::term2, TEST_AND_INSERT, TOPOROUTER_ARC, toporouter_arc_new(), TOPOROUTER_IS_ARC, TOPOROUTER_IS_VERTEX, TOPOROUTER_RUBBERBAND_ARC, TOPOROUTER_VERTEX, _toporouter_arc_t::v1, vx, vy, _toporouter_rubberband_arc_t::wind, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by oproute_rubberband().
guint order_nets_preroute_greedy | ( | toporouter_t * | r, |
GList * | nets, | ||
GList ** | rnets | ||
) |
Definition at line 6994 of file toporouter.c.
References FOREACH_END, FOREACH_NETSCORE, len, netscore_create(), netscore_destroy(), netscore_pairwise_calculation(), _toporouter_t::netsort, print_netscores(), TOPOROUTER_ROUTE, and TRUE.
Referenced by rubix_router().
static gdouble pad_rad | ( | PadType * | pad | ) | [inline, static] |
Definition at line 1742 of file toporouter.c.
References lookup_keepaway(), lookup_thickness(), and pad_st::Name.
Referenced by read_pads().
void parse_arguments | ( | toporouter_t * | r, |
int | argc, | ||
char ** | argv | ||
) |
Definition at line 7632 of file toporouter.c.
References PCBType::Data, LayerGroupType::Entries, _toporouter_t::keepoutlayers, DataType::Layer, layer, PCBType::LayerGroups, malloc(), max_copper_layer, max_group, LayerGroupType::Number, LayerType::On, PCB, and _toporouter_t::viacost.
Referenced by toporouter().
gdouble path_score | ( | toporouter_t * | r, |
GList * | path | ||
) |
Definition at line 4344 of file toporouter.c.
References GTS_POINT, gts_point_distance(), TOPOROUTER_VERTEX, _toporouter_t::viacost, and vz.
Referenced by detour_router(), and route().
void path_set_oproute | ( | GList * | path, |
toporouter_oproute_t * | oproute | ||
) |
Definition at line 5234 of file toporouter.c.
References _toporouter_vertex_t::flags, _toporouter_vertex_t::oproute, TOPOROUTER_VERTEX, and VERTEX_FLAG_ROUTE.
Referenced by oproute_rubberband().
gdouble pathvertex_arcing_through_constraint | ( | toporouter_vertex_t * | pathv, |
toporouter_vertex_t * | arcv | ||
) |
Definition at line 5052 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_vertex_t::flags, GTS_POINT, gts_point_distance(), _toporouter_vertex_t::parent, _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, TOPOROUTER_IS_CONSTRAINT, and VERTEX_FLAG_ROUTE.
Referenced by edge_min_spacing().
gdouble perpendicular_gradient | ( | gdouble | m | ) |
Returns gradient perpendicular to m.
Definition at line 1351 of file toporouter.c.
Referenced by calculate_arc_to_arc(), calculate_term_to_arc(), check_non_intersect_vertex(), line_line_distance_at_normal(), read_pads(), triangle_interior_capacity(), and vertex_line_normal_intersection().
static gdouble pin_rad | ( | PinType * | pin | ) | [inline, static] |
Definition at line 1748 of file toporouter.c.
References lookup_keepaway(), lookup_thickness(), and pin_st::Name.
Referenced by read_points().
Definition at line 1504 of file toporouter.c.
References point_wind(), _GtsPoint::x, and _GtsPoint::y.
Referenced by vertex_between().
static void point_from_point_to_point | ( | toporouter_vertex_t * | a, |
toporouter_vertex_t * | b, | ||
double | d, | ||
double * | x, | ||
double * | y | ||
) | [static] |
Fills in x and y with coordinates of point from a towards b of distance d.
Definition at line 764 of file toporouter.c.
Referenced by calculate_arc_to_arc(), calculate_term_to_arc(), and toporouter_draw_surface().
Returns gradient of segment given by (x0,y0) & (x1,y1).
Definition at line 1332 of file toporouter.c.
References cartesian_gradient(), _GtsPoint::x, and _GtsPoint::y.
Referenced by calculate_arc_to_arc(), and calculate_term_to_arc().
static bool point_intersect_prop | ( | GtsPoint * | a, |
GtsPoint * | b, | ||
GtsPoint * | c, | ||
GtsPoint * | d | ||
) | [static] |
proper intersection: AB and CD must share a point interior to both segments.
Definition at line 1422 of file toporouter.c.
References point_wind().
Referenced by vertex_intersect_prop().
wind_v:
Definition at line 794 of file toporouter.c.
References EPSILON, _GtsPoint::x, and _GtsPoint::y.
Referenced by point_between(), point_intersect_prop(), tvertex_wind(), and vertex_wind().
void print_bbox | ( | toporouter_bbox_t * | box | ) |
Print a bounding box.
Definition at line 622 of file toporouter.c.
References BOARD, _toporouter_cluster_t::c, _toporouter_bbox_t::cluster, _toporouter_bbox_t::layer, LINE, PAD, PIN, _toporouter_bbox_t::point, POLYGON, _toporouter_bbox_t::type, VIA, vx, vy, and vz.
Referenced by cluster_find(), print_cluster(), and print_vertices().
void print_cluster | ( | toporouter_cluster_t * | c | ) |
Definition at line 2565 of file toporouter.c.
References box, _toporouter_cluster_t::boxes, _toporouter_cluster_t::c, FOREACH_BBOX, FOREACH_END, _toporouter_netlist_t::netlist, _toporouter_cluster_t::netlist, print_bbox(), and _toporouter_netlist_t::style.
Referenced by cluster_find(), and netscore_create().
void print_constraint | ( | toporouter_constraint_t * | e | ) |
Definition at line 2158 of file toporouter.c.
References print_vertex(), tedge_v1, and tedge_v2.
Referenced by build_cdt().
void print_costmatrix | ( | gdouble * | m, |
guint | n | ||
) |
Definition at line 6830 of file toporouter.c.
References n.
void print_edge | ( | toporouter_edge_t * | e | ) |
Definition at line 2166 of file toporouter.c.
References edge_routing, print_vertex(), tedge_v1, tedge_v2, and TOPOROUTER_VERTEX.
Referenced by triangle_candidate_points_from_vertex().
void print_netlist | ( | toporouter_netlist_t * | netlist | ) |
Definition at line 7288 of file toporouter.c.
References _toporouter_netlist_t::clusters, FOREACH_CLUSTER, FOREACH_END, and _toporouter_netlist_t::netlist.
void print_netscores | ( | GPtrArray * | netscores | ) |
Definition at line 6898 of file toporouter.c.
Referenced by order_nets_preroute_greedy().
void print_oproute | ( | toporouter_oproute_t * | oproute | ) |
Definition at line 5247 of file toporouter.c.
References _toporouter_oproute_t::arcs, _toporouter_oproute_t::netlist, print_toporouter_arc(), print_vertex(), _toporouter_oproute_t::style, _toporouter_oproute_t::term1, and _toporouter_oproute_t::term2.
void print_path | ( | GList * | path | ) |
Definition at line 2988 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_vertex_t::parent, print_vertex(), and TOPOROUTER_VERTEX.
void print_toporouter_arc | ( | toporouter_arc_t * | arc | ) |
Definition at line 5184 of file toporouter.c.
References _toporouter_arc_t::centre, _toporouter_arc_t::dir, _toporouter_arc_t::r, vx, and vy.
Referenced by print_oproute().
static void print_toporouter_constraint | ( | toporouter_constraint_t * | tc | ) | [inline, static] |
Definition at line 1213 of file toporouter.c.
References _toporouter_constraint_t::c, _GtsConstraint::edge, _GtsVertex::p, _GtsEdge::segment, _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, and _GtsPoint::y.
static void print_toporouter_vertex | ( | toporouter_vertex_t * | tv | ) | [inline, static] |
Definition at line 1223 of file toporouter.c.
References _GtsVertex::p, _toporouter_vertex_t::v, _GtsPoint::x, and _GtsPoint::y.
void print_vertex | ( | toporouter_vertex_t * | v | ) |
Print a vertex.
Definition at line 656 of file toporouter.c.
References edge_routing, _toporouter_vertex_t::flags, n, _toporouter_netlist_t::netlist, _toporouter_route_t::netlist, _toporouter_vertex_t::route, _toporouter_vertex_t::routingedge, TOPOROUTER_IS_CONSTRAINT, VERTEX_FLAG_FAKE, VERTEX_FLAG_ROUTE, VERTEX_FLAG_SPECCUT, VERTEX_FLAG_TEMP, vertex_netlist(), vx, vy, and vz.
Referenced by build_cdt(), delaunay_create_from_vertices(), oproute_rubberband_segment(), print_constraint(), print_edge(), print_oproute(), print_path(), print_vertices(), and triangle_candidate_points_from_vertex().
void print_vertices | ( | GList * | vertices | ) |
Definition at line 4373 of file toporouter.c.
References print_bbox(), print_vertex(), TOPOROUTER_VERTEX, and vertex_bbox().
static void read_board_constraints | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
int | layer | ||
) | [static] |
Definition at line 2126 of file toporouter.c.
References _toporouter_t::bboxes, BOARD, create_board_edge(), insert_constraints_from_list(), PCBType::MaxHeight, PCBType::MaxWidth, PCB, and toporouter_bbox_create().
Referenced by import_geometry().
int read_lines | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
LayerType * | layer, | ||
int | ln | ||
) |
Read line data from layer into toporouter_layer_t struct.
Inserts points and constraints into GLists.
Definition at line 2069 of file toporouter.c.
References _toporouter_t::bboxes, _toporouter_bbox_t::constraints, END_LOOP, GetLayerGroupNumberByNumber(), GTS_VERTEX_CLASS, gts_vertex_new(), insert_constraint_edge(), _toporouter_t::layers, LINE, line, LINE_LOOP, toporouter_bbox_create_from_points(), and toporouter_vertex_class().
Referenced by import_geometry().
int read_pads | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
guint | layer | ||
) |
Read pad data from layer into toporouter_layer_t struct.
Inserts points and constraints into GLists.
Definition at line 1795 of file toporouter.c.
References back, _toporouter_t::bboxes, BOTTOM_SIDE, cartesian_gradient(), PCBType::Data, ELEMENT_LOOP, END_LOOP, front, GetLayerGroupNumberBySide(), GTS_POINT, insert_constraints_from_list(), insert_vertex(), _toporouter_t::layers, m, PAD, PAD_LOOP, pad_rad(), PCB, perpendicular_gradient(), _toporouter_bbox_t::point, rect_with_attachments(), TEST_FLAG, TOP_SIDE, toporouter_bbox_create(), TOPOROUTER_VERTEX, vertex_outside_segment(), vertices_on_line(), wind(), toporouter_spoint_t::x, x, toporouter_spoint_t::y, and y.
Referenced by import_geometry().
int read_points | ( | toporouter_t * | r, |
toporouter_layer_t * | l, | ||
int | layer | ||
) |
Read points data (all layers) into GList.
Inserts pin and via points.
Definition at line 1969 of file toporouter.c.
References _toporouter_t::bboxes, PCBType::Data, ELEMENT_LOOP, END_LOOP, GTS_POINT, insert_constraints_from_list(), insert_vertex(), _toporouter_t::layers, PCB, PIN, pin, PIN_LOOP, pin_rad(), _toporouter_bbox_t::point, rect_with_attachments(), TEST_FLAG, pin_st::Thickness, toporouter_bbox_create(), VIA, VIA_LOOP, pin_st::X, x, pin_st::Y, and y.
Referenced by import_geometry().
GList* rect_with_attachments | ( | gdouble | rad, |
gdouble | x0, | ||
gdouble | y0, | ||
gdouble | x1, | ||
gdouble | y1, | ||
gdouble | x2, | ||
gdouble | y2, | ||
gdouble | x3, | ||
gdouble | y3, | ||
gdouble | z | ||
) |
Definition at line 1754 of file toporouter.c.
References GTS_VERTEX_CLASS, gts_vertex_new(), TOPOROUTER_VERTEX, and toporouter_vertex_class().
Referenced by read_pads(), and read_points().
void remove_route | ( | GList * | path | ) |
Remove route can be later reapplied.
Definition at line 6749 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_vertex_t::parent, _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, and TOPOROUTER_VERTEX.
Referenced by netscore_pairwise_calculation(), and route_checkpoint().
void roar_detour_route | ( | toporouter_t * | r, |
toporouter_route_t * | data | ||
) |
Definition at line 7446 of file toporouter.c.
References cluster_merge(), delete_route(), _toporouter_t::flags, INSERT_ROUTING, _toporouter_route_t::netlist, netlists_recalculate(), REMOVE_ROUTING, route(), route_checkpoint(), route_conflicts(), route_restore(), _toporouter_route_t::score, TOPOROUTER_FLAG_LEASTINVALID, and TOPOROUTER_ROUTE.
Referenced by detour_router().
gint roar_route | ( | toporouter_t * | r, |
toporouter_route_t * | routedata, | ||
gint | threshold | ||
) |
Definition at line 7309 of file toporouter.c.
References _toporouter_cluster_t::c, cluster_merge(), delete_route(), _toporouter_route_t::dest, _toporouter_t::flags, INSERT_ROUTING, _toporouter_route_t::netlist, netlist_recalculate(), netlists_recalculate(), _toporouter_route_t::path, _toporouter_cluster_t::pc, _toporouter_route_t::pdest, _toporouter_route_t::psrc, REMOVE_ROUTING, route(), route_checkpoint(), route_conflicts(), route_restore(), _toporouter_route_t::src, TOPOROUTER_FLAG_LEASTINVALID, and TOPOROUTER_ROUTE.
Referenced by roar_router().
gint roar_router | ( | toporouter_t * | r, |
gint | failcount, | ||
gint | threshold | ||
) |
Definition at line 7411 of file toporouter.c.
References _, _toporouter_t::failednets, Message(), roar_route(), _toporouter_t::routednets, and TOPOROUTER_ROUTE.
Referenced by hybrid_router().
GList* route | ( | toporouter_t * | r, |
toporouter_route_t * | data, | ||
guint | debug | ||
) |
*
Definition at line 4672 of file toporouter.c.
References _toporouter_route_t::alltemppoints, _toporouter_vertex_t::bbox, _toporouter_cluster_t::c, candidate_is_available(), _toporouter_vertex_t::child, clean_routing_edges(), closelist_insert, closest_cluster_pair(), closest_dest_vertex(), _toporouter_bbox_t::cluster, cluster_vertices(), compute_candidate_points(), _toporouter_route_t::curpoint, _toporouter_route_t::dest, _toporouter_route_t::destvertices, _toporouter_vertex_t::flags, _toporouter_t::flags, _toporouter_vertex_t::gcost, gcost(), _toporouter_vertex_t::gn, gts_eheap_destroy(), gts_eheap_foreach(), gts_eheap_insert(), gts_eheap_new(), gts_eheap_remove_top(), gts_eheap_size(), gts_eheap_update(), _toporouter_vertex_t::hcost, _toporouter_route_t::netlist, _toporouter_netlist_t::pair, _toporouter_vertex_t::parent, _toporouter_route_t::path, path_score(), toporouter_heap_search_data_t::result, _toporouter_vertex_t::route, route_heap_cmp(), _toporouter_t::routednets, _toporouter_vertex_t::routingedge, _toporouter_route_t::score, simple_h_cost(), space_edge(), _toporouter_route_t::src, _toporouter_route_t::srcvertices, TOPOROUTER_FLAG_AFTERORDER, toporouter_heap_search(), TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_ROUTE, TOPOROUTER_VERTEX, VERTEX_FLAG_ROUTE, VERTEX_FLAG_TEMP, vlayer, and vz.
Referenced by netscore_create(), netscore_pairwise_calculation(), roar_detour_route(), roar_route(), and rubix_router().
void route_checkpoint | ( | toporouter_route_t * | route, |
toporouter_route_t * | temproute | ||
) |
Definition at line 7148 of file toporouter.c.
References _toporouter_route_t::dest, edge_routing, malloc(), n, _toporouter_route_t::path, _toporouter_route_t::pdest, _toporouter_route_t::ppath, _toporouter_route_t::ppathindices, _toporouter_route_t::pscore, _toporouter_route_t::psrc, remove_route(), _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, _toporouter_route_t::score, _toporouter_route_t::src, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, and TOPOROUTER_VERTEX.
Referenced by roar_detour_route(), and roar_route().
GList* route_conflicts | ( | toporouter_route_t * | route | ) |
Definition at line 7085 of file toporouter.c.
References _toporouter_route_t::path, TOPOROUTER_ROUTE, TOPOROUTER_VERTEX, vertices_routing_conflicts(), and vz.
Referenced by roar_detour_route(), and roar_route().
gint route_detour_compare | ( | toporouter_route_t ** | a, |
toporouter_route_t ** | b | ||
) |
Definition at line 7440 of file toporouter.c.
Referenced by detour_router().
gdouble route_heap_cmp | ( | gpointer | item, |
gpointer | data | ||
) |
Definition at line 2903 of file toporouter.c.
References FCOST, and TOPOROUTER_VERTEX.
Referenced by route().
void route_restore | ( | toporouter_route_t * | route | ) |
Definition at line 7192 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_route_t::dest, n, _toporouter_vertex_t::parent, _toporouter_route_t::path, _toporouter_route_t::pdest, _toporouter_route_t::ppath, _toporouter_route_t::ppathindices, _toporouter_route_t::pscore, _toporouter_route_t::psrc, _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, _toporouter_route_t::score, _toporouter_route_t::src, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, and TOPOROUTER_VERTEX.
Referenced by roar_detour_route(), and roar_route().
static toporouter_vertex_t* route_vertices_common_vertex | ( | toporouter_vertex_t * | v1, |
toporouter_vertex_t * | v2 | ||
) | [inline, static] |
Definition at line 3293 of file toporouter.c.
References GTS_SEGMENT, _toporouter_vertex_t::routingedge, and segment_common_vertex().
Referenced by vertices_routing_conflicts().
toporouter_route_t* routedata_create | ( | void | ) |
Definition at line 6633 of file toporouter.c.
References _toporouter_route_t::alltemppoints, _toporouter_route_t::curpoint, _toporouter_route_t::dest, _toporouter_route_t::destvertices, _toporouter_route_t::flags, malloc(), _toporouter_route_t::netlist, _toporouter_route_t::path, _toporouter_route_t::pdest, _toporouter_route_t::ppath, _toporouter_route_t::ppathindices, _toporouter_route_t::pscore, _toporouter_route_t::psrc, _toporouter_route_t::score, _toporouter_route_t::src, _toporouter_route_t::srcvertices, and _toporouter_route_t::topopath.
Referenced by import_route(), and netscore_pairwise_calculation().
void routedata_insert_temppoints | ( | toporouter_route_t * | data, |
GList * | temppoints | ||
) |
Definition at line 3805 of file toporouter.c.
References _toporouter_route_t::alltemppoints.
Referenced by compute_candidate_points(), and triangle_candidate_points_from_edge().
gint routing_edge_insert | ( | gconstpointer | a, |
gconstpointer | b, | ||
gpointer | user_data | ||
) |
Sorting into ascending distance from v1.
Definition at line 3062 of file toporouter.c.
References edge_v1, EPSILON, GTS_POINT, and gts_point_distance2().
Referenced by apply_route(), new_temp_toporoutervertex(), and speccut_edge_routing_from_edge().
gint rubix_router | ( | toporouter_t * | r, |
gint | failcount | ||
) |
Definition at line 7577 of file toporouter.c.
References cluster_merge(), _toporouter_t::failednets, INSERT_ROUTING, order_nets_preroute_greedy(), route(), and TOPOROUTER_ROUTE.
Referenced by hybrid_router().
static toporouter_vertex_t* segment_common_vertex | ( | GtsSegment * | s1, |
GtsSegment * | s2 | ||
) | [inline, static] |
Definition at line 3282 of file toporouter.c.
References TOPOROUTER_VERTEX, _GtsSegment::v1, and _GtsSegment::v2.
Referenced by check_speccut(), flow_from_edge_to_edge(), route_vertices_common_vertex(), and triangle_candidate_points_from_edge().
gdouble segment_gradient | ( | GtsSegment * | s | ) |
Definition at line 1338 of file toporouter.c.
References cartesian_gradient(), GTS_POINT, _GtsSegment::v1, and _GtsSegment::v2.
gdouble simple_h_cost | ( | toporouter_t * | r, |
toporouter_vertex_t * | curpoint, | ||
toporouter_vertex_t * | destpoint | ||
) |
Definition at line 2894 of file toporouter.c.
References GTS_POINT, gts_point_distance(), _toporouter_t::viacost, and vz.
Referenced by closest_cluster_pair(), closest_dest_vertex(), and route().
void snapshot | ( | toporouter_t * | r, |
char * | name, | ||
GList * | datas | ||
) |
*
Definition at line 7051 of file toporouter.c.
References buffer, groupcount(), _toporouter_t::layers, toporouter_layer_t::surface, and toporouter_draw_surface().
gint space_edge | ( | gpointer | item, |
gpointer | data | ||
) |
Definition at line 4391 of file toporouter.c.
References edge_routing, edge_v1, edge_v2, EPSILON, GTS_POINT, gts_point_distance(), GTS_VERTEX, malloc(), min_spacing(), tedge_v1, tedge_v2, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, vertex_move_towards_vertex_values(), x, and y.
Referenced by route().
void speccut_edge_patch_links | ( | toporouter_edge_t * | e | ) |
Definition at line 6394 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_vertex_t::parent, _toporouter_edge_t::routing, TOPOROUTER_IS_EDGE, and TOPOROUTER_VERTEX.
Referenced by check_speccut().
void speccut_edge_routing_from_edge | ( | GList * | i, |
toporouter_edge_t * | e | ||
) |
Definition at line 6312 of file toporouter.c.
References _toporouter_vertex_t::child, _toporouter_vertex_t::flags, GTS_POINT, _toporouter_vertex_t::oproute, _toporouter_vertex_t::parent, _toporouter_oproute_t::path, _toporouter_route_t::path, _toporouter_vertex_t::route, _toporouter_edge_t::routing, routing_edge_insert(), _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, TOPOROUTER_IS_EDGE, TOPOROUTER_VERTEX, tvertex_intersect, VERTEX_FLAG_ROUTE, VERTEX_FLAG_SPECCUT, VERTEX_FLAG_TEMP, and vz.
Referenced by check_speccut().
void split_edge_routing | ( | toporouter_vertex_t * | v, |
GList ** | l1, | ||
GList ** | l2 | ||
) |
Definition at line 4469 of file toporouter.c.
References _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, TOPOROUTER_VERTEX, VERTEX_FLAG_TEMP, and vrouting.
Referenced by vertices_routing_conflicts().
GList* split_path | ( | GList * | path | ) |
Definition at line 3009 of file toporouter.c.
References _toporouter_vertex_t::child, GTS_POINT, _toporouter_vertex_t::parent, TOPOROUTER_VERTEX, vx, vy, x, and y.
gint spread_edge | ( | gpointer | item, |
gpointer | data | ||
) |
Definition at line 7114 of file toporouter.c.
References edge_routing, edge_v1, edge_v2, GTS_POINT, gts_point_distance(), s, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, vertex_move_towards_vertex_values(), vx, vy, x, and y.
void swap_vertices | ( | toporouter_vertex_t ** | v1, |
toporouter_vertex_t ** | v2 | ||
) |
Definition at line 4461 of file toporouter.c.
Referenced by vertices_routing_conflicts().
gboolean temp_point_clean | ( | gpointer | key, |
gpointer | value, | ||
gpointer | user_data | ||
) |
Definition at line 4322 of file toporouter.c.
References _toporouter_vertex_t::flags, GTS_OBJECT, gts_object_destroy(), _toporouter_edge_t::routing, _toporouter_vertex_t::routingedge, TOPOROUTER_CONSTRAINT, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, TRUE, and VERTEX_FLAG_TEMP.
Referenced by clean_routing_edges().
Definition at line 7733 of file toporouter.c.
References acquire_twonets(), AddAllRats(), DeleteRats(), hybrid_router(), import_geometry(), IncrementUndoSerialNumber(), parse_arguments(), Redraw(), RestoreUndoSerialNumber(), SaveUndoSerialNumber(), toporouter_export(), toporouter_free(), and toporouter_new().
toporouter_arc_class_t* toporouter_arc_class | ( | void | ) |
Definition at line 248 of file toporouter.c.
References gts_constraint_class(), GTS_OBJECT_CLASS, gts_object_class_new(), and toporouter_arc_init().
Referenced by toporouter_arc_new().
static void toporouter_arc_init | ( | toporouter_arc_t * | arc | ) | [static] |
Initialise an arc.
Definition at line 231 of file toporouter.c.
References _toporouter_arc_t::centre, _toporouter_arc_t::clearance, _toporouter_arc_t::dir, _toporouter_arc_t::oproute, _toporouter_arc_t::r, _toporouter_arc_t::v, _toporouter_arc_t::v1, _toporouter_arc_t::v2, _toporouter_arc_t::x0, _toporouter_arc_t::x1, _toporouter_arc_t::y0, and _toporouter_arc_t::y1.
Referenced by toporouter_arc_class().
toporouter_arc_t* toporouter_arc_new | ( | toporouter_oproute_t * | oproute, |
toporouter_vertex_t * | v1, | ||
toporouter_vertex_t * | v2, | ||
toporouter_vertex_t * | centre, | ||
gdouble | r, | ||
gint | dir | ||
) |
Definition at line 5215 of file toporouter.c.
References _toporouter_vertex_t::arc, _toporouter_arc_t::centre, _toporouter_arc_t::clearance, _toporouter_arc_t::dir, GTS_OBJECT_CLASS, gts_object_new(), _toporouter_arc_t::oproute, _toporouter_arc_t::r, TOPOROUTER_ARC, toporouter_arc_class(), _toporouter_arc_t::v, _toporouter_arc_t::v1, and _toporouter_arc_t::v2.
Referenced by oproute_rubberband_segment().
void toporouter_arc_remove | ( | toporouter_oproute_t * | oproute, |
toporouter_arc_t * | arc | ||
) |
Definition at line 5207 of file toporouter.c.
References _toporouter_vertex_t::arc, _toporouter_oproute_t::arcs, and _toporouter_arc_t::v.
toporouter_bbox_class_t* toporouter_bbox_class | ( | void | ) |
Definition at line 117 of file toporouter.c.
References gts_bbox_class(), GTS_OBJECT_CLASS, gts_object_class_new(), and toporouter_bbox_init().
Referenced by toporouter_bbox_create(), and toporouter_bbox_create_from_points().
toporouter_bbox_t* toporouter_bbox_create | ( | int | layer, |
GList * | vertices, | ||
toporouter_term_t | type, | ||
gpointer | data | ||
) |
Definition at line 1604 of file toporouter.c.
References _toporouter_bbox_t::data, delaunay_create_from_vertices(), _toporouter_bbox_t::enclosing, GTS_BBOX_CLASS, gts_bbox_surface(), layer, _toporouter_bbox_t::layer, s, _toporouter_bbox_t::surface, TOPOROUTER_BBOX, toporouter_bbox_class(), and _toporouter_bbox_t::type.
Referenced by read_board_constraints(), read_pads(), and read_points().
toporouter_bbox_t* toporouter_bbox_create_from_points | ( | int | layer, |
GList * | vertices, | ||
toporouter_term_t | type, | ||
gpointer | data | ||
) |
Definition at line 1581 of file toporouter.c.
References _toporouter_bbox_t::data, _toporouter_bbox_t::enclosing, GTS_BBOX_CLASS, gts_bbox_points(), layer, _toporouter_bbox_t::layer, list_to_slist(), _toporouter_bbox_t::point, _toporouter_bbox_t::realpoint, _toporouter_bbox_t::surface, TOPOROUTER_BBOX, toporouter_bbox_class(), and _toporouter_bbox_t::type.
Referenced by read_lines().
static void toporouter_bbox_init | ( | toporouter_bbox_t * | box | ) | [static] |
Initialise a bounding box.
Definition at line 108 of file toporouter.c.
References _toporouter_bbox_t::cluster, _toporouter_bbox_t::constraints, _toporouter_bbox_t::data, OTHER, and _toporouter_bbox_t::type.
Referenced by toporouter_bbox_class().
toporouter_bbox_t* toporouter_bbox_locate | ( | toporouter_t * | r, |
toporouter_term_t | type, | ||
void * | data, | ||
gdouble | x, | ||
gdouble | y, | ||
guint | layergroup | ||
) |
Definition at line 2595 of file toporouter.c.
References _toporouter_t::bboxtree, box, _toporouter_bbox_t::data, gts_bb_tree_stabbed(), GTS_OBJECT, gts_object_destroy(), gts_point_class(), gts_point_new(), TOPOROUTER_BBOX, and _toporouter_bbox_t::type.
Referenced by import_clusters().
toporouter_constraint_class_t* toporouter_constraint_class | ( | void | ) |
Definition at line 207 of file toporouter.c.
References gts_constraint_class(), GTS_OBJECT_CLASS, gts_object_class_new(), toporouter_constraint_class_init(), and toporouter_constraint_init().
Referenced by insert_constraint_edge().
static void toporouter_constraint_class_init | ( | toporouter_constraint_class_t * | klass | ) | [static] |
Initialise a constraint class.
Definition at line 191 of file toporouter.c.
Referenced by toporouter_constraint_class().
static void toporouter_constraint_init | ( | toporouter_constraint_t * | constraint | ) | [static] |
Initialise a constraint.
Definition at line 200 of file toporouter.c.
References _toporouter_constraint_t::box, and _toporouter_constraint_t::routing.
Referenced by toporouter_constraint_class().
void toporouter_draw_cluster | ( | toporouter_t * | r, |
drawing_context_t * | dc, | ||
toporouter_cluster_t * | cluster, | ||
gdouble | red, | ||
gdouble | green, | ||
gdouble | blue, | ||
guint | layer | ||
) |
Definition at line 941 of file toporouter.c.
Referenced by toporouter_draw_surface().
gint toporouter_draw_edge | ( | gpointer | item, |
gpointer | data | ||
) |
Draw an edge.
Definition at line 504 of file toporouter.c.
References BOARD, _toporouter_constraint_t::box, _toporouter_constraint_t::c, _toporouter_edge_t::e, _GtsConstraint::edge, LINE, MARGIN, _GtsVertex::p, PAD, PIN, drawing_context_t::s, _GtsEdge::segment, TOPOROUTER_CONSTRAINT, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_IS_EDGE, _toporouter_bbox_t::type, _GtsSegment::v1, _GtsSegment::v2, _GtsPoint::x, and _GtsPoint::y.
Referenced by toporouter_draw_surface().
void toporouter_draw_surface | ( | toporouter_t * | r, |
GtsSurface * | s, | ||
char * | filename, | ||
int | w, | ||
int | h, | ||
int | mode, | ||
GList * | datas, | ||
int | layer, | ||
GList * | candidatepoints | ||
) |
Definition at line 961 of file toporouter.c.
References _toporouter_route_t::alltemppoints, drawing_context_t::data, _toporouter_route_t::dest, edge_routing, edge_routing_next, edge_routing_prev, _toporouter_vertex_t::flags, GTS_POINT, gts_surface_foreach_edge(), gts_surface_foreach_vertex(), M_PI, MARGIN, MIL_TO_COORD, min_spacing(), drawing_context_t::mode, _GtsVertex::p, _toporouter_route_t::path, point_from_point_to_point(), _toporouter_t::routednets, _toporouter_vertex_t::routingedge, drawing_context_t::s, _toporouter_route_t::src, toporouter_draw_cluster(), toporouter_draw_edge(), toporouter_draw_vertex(), TOPOROUTER_IS_CONSTRAINT, toporouter_output_close(), toporouter_output_init(), TOPOROUTER_ROUTE, TOPOROUTER_VERTEX, _toporouter_vertex_t::v, VERTEX_FLAG_BLUE, VERTEX_FLAG_GREEN, VERTEX_FLAG_RED, vx, vy, _GtsPoint::x, x, _GtsPoint::y, and y.
Referenced by snapshot().
gint toporouter_draw_vertex | ( | gpointer | item, |
gpointer | data | ||
) |
Draw a vertex.
Definition at line 371 of file toporouter.c.
References _toporouter_vertex_t::bbox, _toporouter_bbox_t::data, _toporouter_vertex_t::flags, lookup_keepaway(), M_PI, MARGIN, MIL_TO_COORD, drawing_context_t::mode, pin_st::Name, _GtsVertex::p, PAD, PIN, pin, drawing_context_t::s, pin_st::Thickness, TOPOROUTER_IS_VERTEX, TOPOROUTER_VERTEX, _toporouter_bbox_t::type, _toporouter_vertex_t::v, VERTEX_FLAG_BLUE, VERTEX_FLAG_GREEN, VERTEX_FLAG_RED, VIA, _GtsPoint::x, and _GtsPoint::y.
Referenced by toporouter_draw_surface().
toporouter_edge_class_t* toporouter_edge_class | ( | void | ) |
Definition at line 84 of file toporouter.c.
References gts_edge_class(), GTS_OBJECT_CLASS, gts_object_class_new(), and toporouter_edge_init().
Referenced by build_cdt(), check_speccut(), delaunay_create_from_vertices(), and unconstrain().
static void toporouter_edge_init | ( | toporouter_edge_t * | edge | ) | [static] |
Initialise an edge.
Definition at line 77 of file toporouter.c.
References _toporouter_edge_t::flags, and _toporouter_edge_t::routing.
Referenced by toporouter_edge_class().
void toporouter_export | ( | toporouter_t * | r | ) |
Definition at line 6600 of file toporouter.c.
References _, COORD_TO_INCH, export_oproutes(), Message(), oproute_free(), oproute_rubberband(), _toporouter_route_t::path, _toporouter_t::routednets, TOPOROUTER_ROUTE, and _toporouter_t::wiring_score.
Referenced by toporouter().
void toporouter_free | ( | toporouter_t * | r | ) |
Definition at line 1174 of file toporouter.c.
References _, groupcount(), _toporouter_t::layers, Message(), _toporouter_t::starttime, and toporouter_layer_free().
Referenced by toporouter().
void toporouter_heap_search | ( | gpointer | data, |
gpointer | user_data | ||
) |
Definition at line 2916 of file toporouter.c.
References toporouter_heap_search_data_t::key, toporouter_heap_search_data_t::result, and TOPOROUTER_VERTEX.
Referenced by route().
void toporouter_layer_free | ( | toporouter_layer_t * | l | ) |
Free a layer.
Definition at line 1153 of file toporouter.c.
References toporouter_layer_t::constraints, and toporouter_layer_t::vertices.
Referenced by toporouter_free().
toporouter_t* toporouter_new | ( | void | ) |
Definition at line 7657 of file toporouter.c.
References _, _toporouter_t::bboxes, _toporouter_t::bboxtree, _toporouter_t::consumeddestboxes, _toporouter_t::destboxes, _toporouter_t::failednets, _toporouter_t::flags, gts_predicates_init(), _toporouter_t::keepoutlayers, _toporouter_t::layers, Message(), _toporouter_t::netlists, netscore_pairwise_compare(), _toporouter_t::netsort, _toporouter_t::paths, _toporouter_t::routednets, _toporouter_t::routes, _toporouter_t::starttime, VIA_COST_AS_DISTANCE, _toporouter_t::viacost, and _toporouter_t::wiring_score.
Referenced by toporouter().
void toporouter_output_close | ( | drawing_context_t * | dc | ) |
Close output.
Definition at line 312 of file toporouter.c.
References drawing_context_t::filename.
Referenced by toporouter_draw_surface().
drawing_context_t* toporouter_output_init | ( | int | w, |
int | h, | ||
char * | filename | ||
) |
Initialise output.
Definition at line 274 of file toporouter.c.
References filename, drawing_context_t::filename, drawing_context_t::ih, drawing_context_t::iw, malloc(), MARGIN, PCBType::MaxHeight, PCBType::MaxWidth, PCB, and drawing_context_t::s.
Referenced by toporouter_draw_surface().
toporouter_serpintine_t* toporouter_serpintine_new | ( | gdouble | x, |
gdouble | y, | ||
gdouble | x0, | ||
gdouble | y0, | ||
gdouble | x1, | ||
gdouble | y1, | ||
gpointer | start, | ||
gdouble | halfa, | ||
gdouble | radius, | ||
guint | nhalfcycles | ||
) |
Definition at line 5773 of file toporouter.c.
References _toporouter_serpintine_t::arcs, _toporouter_serpintine_t::halfa, malloc(), _toporouter_serpintine_t::nhalfcycles, _toporouter_serpintine_t::radius, _toporouter_serpintine_t::start, x, _toporouter_serpintine_t::x, _toporouter_serpintine_t::x0, _toporouter_serpintine_t::x1, y, _toporouter_serpintine_t::y, _toporouter_serpintine_t::y0, and _toporouter_serpintine_t::y1.
gint toporouter_set_pair | ( | toporouter_t * | r, |
toporouter_netlist_t * | n1, | ||
toporouter_netlist_t * | n2 | ||
) |
Definition at line 7724 of file toporouter.c.
References _toporouter_netlist_t::pair.
toporouter_vertex_class_t* toporouter_vertex_class | ( | void | ) |
Definition at line 167 of file toporouter.c.
References GTS_OBJECT_CLASS, gts_object_class_new(), gts_vertex_class(), toporouter_vertex_class_init(), and toporouter_vertex_init().
Referenced by build_cdt(), create_board_edge(), delaunay_create_from_vertices(), insert_centre_point(), insert_constraint_edge(), insert_vertex(), new_temp_toporoutervertex(), read_lines(), rect_with_attachments(), and vertex_intersect().
static void toporouter_vertex_class_init | ( | toporouter_vertex_class_t * | klass | ) | [static] |
Initialise a vertex class.
Definition at line 141 of file toporouter.c.
Referenced by toporouter_vertex_class().
static void toporouter_vertex_init | ( | toporouter_vertex_t * | vertex | ) | [static] |
Initialise a vertex.
Definition at line 150 of file toporouter.c.
References _toporouter_vertex_t::arc, _toporouter_vertex_t::bbox, _toporouter_vertex_t::child, _toporouter_vertex_t::flags, _toporouter_vertex_t::gcost, _toporouter_vertex_t::gn, _toporouter_vertex_t::hcost, _toporouter_vertex_t::oproute, _toporouter_vertex_t::parent, _toporouter_vertex_t::route, and _toporouter_vertex_t::routingedge.
Referenced by toporouter_vertex_class().
GList* triangle_all_candidate_points_from_edge | ( | toporouter_t * | r, |
GtsTriangle * | t, | ||
toporouter_edge_t * | e, | ||
toporouter_route_t * | routedata, | ||
toporouter_vertex_t ** | dest, | ||
toporouter_vertex_t * | curpoint | ||
) |
Definition at line 3862 of file toporouter.c.
References all_candidates_on_edge(), check_triangle_interior_capacity(), _toporouter_route_t::destvertices, edge_v1, edge_v2, GTS_EDGE, gts_triangle_vertex_opposite(), GTS_VERTEX, gts_vertices_are_connected(), _toporouter_vertex_t::routingedge, _toporouter_route_t::srcvertices, tedge_v1, tedge_v2, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, and vertex_bbox().
Referenced by compute_candidate_points().
GList* triangle_all_candidate_points_from_vertex | ( | GtsTriangle * | t, |
toporouter_vertex_t * | v, | ||
toporouter_route_t * | routedata | ||
) |
Definition at line 3855 of file toporouter.c.
References all_candidates_on_edge(), gts_triangle_edge_opposite(), GTS_VERTEX, and TOPOROUTER_EDGE.
Referenced by compute_candidate_points().
GList* triangle_candidate_points_from_edge | ( | toporouter_t * | r, |
GtsTriangle * | t, | ||
toporouter_edge_t * | e, | ||
toporouter_vertex_t * | v, | ||
toporouter_vertex_t ** | dest, | ||
toporouter_route_t * | routedata | ||
) |
Definition at line 3914 of file toporouter.c.
References _toporouter_route_t::alltemppoints, BOARD, box, candidate_vertices(), check_triangle_interior_capacity(), _toporouter_vertex_t::child, constraint_route_test(), _toporouter_route_t::destvertices, edge_adjacent_vertices(), edge_is_blocked, edge_routing, edge_routing_next_not_temp(), edge_routing_prev_not_temp(), edge_v1, edge_v2, _toporouter_vertex_t::flags, GTS_EDGE, GTS_POINT, gts_point_distance(), GTS_SEGMENT, gts_triangle_vertex_opposite(), GTS_VERTEX, gts_vertices_are_connected(), new_temp_toporoutervertex_in_segment(), _toporouter_vertex_t::parent, routedata_insert_temppoints(), _toporouter_vertex_t::routingedge, segment_common_vertex(), _toporouter_route_t::srcvertices, tedge_v1, tedge_v2, TOPOROUTER_CONSTRAINT, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, vertex_bbox(), and VERTEX_FLAG_TEMP.
Referenced by compute_candidate_points().
GList* triangle_candidate_points_from_vertex | ( | GtsTriangle * | t, |
toporouter_vertex_t * | v, | ||
toporouter_vertex_t * | dest, | ||
toporouter_route_t * | routedata | ||
) |
Definition at line 3600 of file toporouter.c.
References _toporouter_route_t::alltemppoints, BOARD, box, candidate_vertices(), _toporouter_vertex_t::child, constraint_netlist(), edge_is_blocked, edge_routing, edge_routing_first_not_temp(), edge_routing_last_not_temp(), edge_v1, edge_v2, GTS_POINT, gts_point_distance(), gts_triangle_edge_opposite(), GTS_VERTEX, gts_vertices_are_connected(), new_temp_toporoutervertex_in_segment(), _toporouter_vertex_t::parent, print_edge(), print_vertex(), _toporouter_vertex_t::routingedge, tedge_v1, tedge_v2, TOPOROUTER_CONSTRAINT, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, vertex_netlist(), vx, and vy.
Referenced by compute_candidate_points().
gdouble triangle_cost | ( | GtsTriangle * | t, |
gpointer * | data | ||
) |
Definition at line 2144 of file toporouter.c.
References gts_triangle_area(), and gts_triangle_quality().
gdouble triangle_interior_capacity | ( | GtsTriangle * | t, |
toporouter_vertex_t * | v | ||
) |
Returns the capacity of the triangle cut through v.
Definition at line 3238 of file toporouter.c.
References edge_v1, edge_v2, epsilon_equals(), GTS_POINT, gts_point_distance2(), gts_triangle_edge_opposite(), GTS_VERTEX, len, MAX, MIN, perpendicular_gradient(), TOPOROUTER_EDGE, toporouter_edge_gradient, vx, vy, x, and y.
Referenced by check_speccut(), and check_triangle_interior_capacity().
static int tvertex_wind | ( | toporouter_vertex_t * | a, |
toporouter_vertex_t * | b, | ||
toporouter_vertex_t * | c | ||
) | [inline, static] |
Definition at line 810 of file toporouter.c.
References GTS_POINT, and point_wind().
Referenced by check_intersect_vertex(), check_non_intersect_vertex(), and check_speccut().
void unconstrain | ( | toporouter_layer_t * | l, |
toporouter_constraint_t * | c | ||
) |
Definition at line 2189 of file toporouter.c.
References _toporouter_constraint_t::box, _toporouter_bbox_t::constraints, toporouter_layer_t::constraints, FALSE, gts_allow_floating_vertices, GTS_EDGE, GTS_EDGE_CLASS, gts_edge_new(), gts_edge_replace(), GTS_OBJECT, gts_object_destroy(), GTS_SEGMENT, TOPOROUTER_EDGE, toporouter_edge_class(), and TRUE.
Referenced by build_cdt().
gdouble vector_angle | ( | gdouble | ox, |
gdouble | oy, | ||
gdouble | ax, | ||
gdouble | ay, | ||
gdouble | bx, | ||
gdouble | by | ||
) |
Definition at line 5765 of file toporouter.c.
toporouter_bbox_t* vertex_bbox | ( | toporouter_vertex_t * | v | ) |
*
Definition at line 586 of file toporouter.c.
References _toporouter_vertex_t::bbox.
Referenced by compute_candidate_points(), flow_from_edge_to_edge(), min_vertex_net_spacing(), oproute_rubberband(), print_vertices(), triangle_all_candidate_points_from_edge(), triangle_candidate_points_from_edge(), vertex_net_keepaway(), vertex_net_thickness(), and vertex_netlist().
Definition at line 1521 of file toporouter.c.
References GTS_POINT, and point_between().
Referenced by build_cdt().
gdouble vertex_gradient | ( | toporouter_spoint_t * | a, |
toporouter_spoint_t * | b | ||
) |
Returns gradient of segment given by a & b.
Definition at line 1310 of file toporouter.c.
References toporouter_spoint_t::x, and toporouter_spoint_t::y.
Referenced by vertex_outside_segment().
intersection vertex: AB and CD must share a point interior to both segments.
Definition at line 1454 of file toporouter.c.
References f, GTS_VERTEX_CLASS, gts_vertex_new(), _GtsVertex::p, toporouter_vertex_class(), vertex_intersect_prop(), _GtsPoint::x, and _GtsPoint::y.
Referenced by build_cdt().
static int vertex_intersect_prop | ( | GtsVertex * | a, |
GtsVertex * | b, | ||
GtsVertex * | c, | ||
GtsVertex * | d | ||
) | [inline, static] |
Definition at line 1440 of file toporouter.c.
References GTS_POINT, and point_intersect_prop().
Referenced by vertex_intersect().
gint vertex_keepout_test | ( | toporouter_t * | r, |
toporouter_vertex_t * | v | ||
) |
Definition at line 3141 of file toporouter.c.
References _toporouter_t::keepoutlayers, and vz.
Referenced by closest_cluster_pair(), and compute_candidate_points().
guint vertex_line_normal_intersection | ( | gdouble | x1, |
gdouble | y1, | ||
gdouble | x2, | ||
gdouble | y2, | ||
gdouble | x3, | ||
gdouble | y3, | ||
gdouble * | x, | ||
gdouble * | y | ||
) |
Definition at line 5162 of file toporouter.c.
References cartesian_gradient(), EPSILON, MAX, MIN, and perpendicular_gradient().
Referenced by check_adj_pushing_vertex(), check_intersect_vertex(), check_non_intersect_vertex(), and check_speccut().
Definition at line 5039 of file toporouter.c.
static void vertex_move_towards_vertex_values | ( | GtsVertex * | v, |
GtsVertex * | p, | ||
double | d, | ||
double * | x, | ||
double * | y | ||
) | [static] |
Moves vertex v d units in the direction of vertex p.
Definition at line 834 of file toporouter.c.
References GTS_POINT.
Referenced by candidate_vertices(), space_edge(), and spread_edge().
gdouble vertex_net_keepaway | ( | toporouter_vertex_t * | v | ) |
Definition at line 736 of file toporouter.c.
References box, _toporouter_bbox_t::cluster, cluster_keepaway(), _toporouter_vertex_t::flags, SettingType::Keepaway, _toporouter_vertex_t::parent, Settings, vertex_bbox(), VERTEX_FLAG_ROUTE, and VERTEX_FLAG_TEMP.
Referenced by flow_from_edge_to_edge(), min_oproute_vertex_spacing(), min_spacing(), and min_vertex_net_spacing().
gdouble vertex_net_thickness | ( | toporouter_vertex_t * | v | ) |
Definition at line 691 of file toporouter.c.
References BOARD, box, _toporouter_bbox_t::cluster, cluster_thickness(), _toporouter_bbox_t::data, _toporouter_vertex_t::flags, line, LINE, SettingType::LineThickness, PAD, _toporouter_vertex_t::parent, pin, PIN, POLYGON, Settings, TEST_FLAG, _toporouter_bbox_t::type, vertex_bbox(), VERTEX_FLAG_ROUTE, VERTEX_FLAG_TEMP, and VIA.
Referenced by flow_from_edge_to_edge(), min_oproute_vertex_spacing(), min_spacing(), and min_vertex_net_spacing().
char* vertex_netlist | ( | toporouter_vertex_t * | v | ) |
Definition at line 592 of file toporouter.c.
References box, _toporouter_bbox_t::cluster, _toporouter_netlist_t::netlist, _toporouter_cluster_t::netlist, and vertex_bbox().
Referenced by print_vertex(), and triangle_candidate_points_from_vertex().
static void vertex_outside_segment | ( | toporouter_spoint_t * | a, |
toporouter_spoint_t * | b, | ||
gdouble | r, | ||
toporouter_spoint_t * | p | ||
) | [inline, static] |
Finds the point p distance r away from a on the line segment of a & b.
Definition at line 1371 of file toporouter.c.
References vertex_gradient(), vertices_on_line(), vertices_plane_distance(), toporouter_spoint_t::x, and toporouter_spoint_t::y.
Referenced by read_pads().
Definition at line 804 of file toporouter.c.
References GTS_POINT, and point_wind().
Referenced by compute_candidate_points().
gint vertices_connected | ( | toporouter_vertex_t * | a, |
toporouter_vertex_t * | b | ||
) |
Definition at line 5075 of file toporouter.c.
References _toporouter_cluster_t::c, _toporouter_route_t::netlist, _toporouter_vertex_t::route, and _toporouter_route_t::src.
Referenced by edge_min_spacing().
static void vertices_on_line | ( | toporouter_spoint_t * | a, |
double | m, | ||
double | r, | ||
toporouter_spoint_t * | b0, | ||
toporouter_spoint_t * | b1 | ||
) | [static] |
vertices_on_line: Given vertex a, gradient m, and radius r:
Definition at line 1238 of file toporouter.c.
References c, toporouter_spoint_t::x, and toporouter_spoint_t::y.
Referenced by new_temp_toporoutervertex_in_segment(), read_pads(), and vertex_outside_segment().
gdouble vertices_plane_distance | ( | toporouter_spoint_t * | a, |
toporouter_spoint_t * | b | ||
) |
Returns the distance between two vertices in the x-y plane.
Definition at line 1362 of file toporouter.c.
References toporouter_spoint_t::x, and toporouter_spoint_t::y.
Referenced by vertex_outside_segment().
gdouble vertices_routing_conflict_cost | ( | toporouter_t * | r, |
toporouter_vertex_t * | v, | ||
toporouter_vertex_t * | pv, | ||
guint * | n | ||
) |
Definition at line 4602 of file toporouter.c.
References penalty(), TOPOROUTER_ROUTE, and vertices_routing_conflicts().
Referenced by gcost().
GList* vertices_routing_conflicts | ( | toporouter_vertex_t * | v, |
toporouter_vertex_t * | pv | ||
) |
Definition at line 4497 of file toporouter.c.
References _toporouter_vertex_t::child, edge_routing, edge_v1, edge_v2, _toporouter_vertex_t::flags, GTS_VERTEX, gts_vertices_are_connected(), _toporouter_vertex_t::parent, _toporouter_vertex_t::route, route_vertices_common_vertex(), _toporouter_vertex_t::routingedge, split_edge_routing(), swap_vertices(), tedge_v1, TOPOROUTER_EDGE, TOPOROUTER_IS_CONSTRAINT, TOPOROUTER_VERTEX, VERTEX_FLAG_ROUTE, and vz.
Referenced by route_conflicts(), and vertices_routing_conflict_cost().
gint visited_cmp | ( | gconstpointer | a, |
gconstpointer | b | ||
) |
Definition at line 2520 of file toporouter.c.
int wind | ( | toporouter_spoint_t * | p1, |
toporouter_spoint_t * | p2, | ||
toporouter_spoint_t * | p3 | ||
) |
wind:
Definition at line 1203 of file toporouter.c.
References toporouter_spoint_t::x, and toporouter_spoint_t::y.
Referenced by export_pcb_drawarc(), new_rubberband_arc(), and read_pads().
HID_Action toporouter_action_list[] [static] |
{ {"Escape", N_("Select a set of pads"), escape, N_("Pad escape"), N_("Escape()")}, {"Toporouter", N_("Select net(s)"), toporouter, N_("Topological autorouter"), N_("Toporouter()")} }
Definition at line 7866 of file toporouter.c.