pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include "global.h"
#include <math.h>
#include <memory.h>
#include <limits.h>
#include <setjmp.h>
#include "create.h"
#include "data.h"
#include "draw.h"
#include "misc.h"
#include "move.h"
#include "pcb-printf.h"
#include "remove.h"
#include "rtree.h"
#include "strflags.h"
#include "undo.h"
#include "error.h"
Go to the source code of this file.
Data Structures | |
struct | End |
Extra data we need to temporarily attach to all lines and arcs. More... | |
struct | Extra |
struct | FindPairCallbackStruct |
Defines | |
#define | abort1() fprintf(stderr, "abort at line %d\n", __LINE__), abort() |
#define | TRACE0 0 |
#define | TRACE1 0 |
#define | SIN1D 0.0174524064372835 |
#define | LINE2EXTRA(l) ((Extra *)g_hash_table_lookup (lines, l)) |
#define | ARC2EXTRA(a) ((Extra *)g_hash_table_lookup (arcs, a)) |
#define | EXTRA2LINE(e) (e->parent.line) |
#define | EXTRA2ARC(e) (e->parent.arc) |
#define | EXTRA_IS_LINE(e) (e->type == LINE_TYPE) |
#define | EXTRA_IS_ARC(e) (e->type == ARC_TYPE) |
#define | NEAR(a, b) ((a) <= (b) + 2 && (a) >= (b) - 2) |
#define | PROP_NEXT(e, n, f) |
#define | gp_point(x, y, t, e) gp_point_2(x,y,t,e,0,0,__FUNCTION__) |
Typedefs | |
typedef struct End | End |
Extra data we need to temporarily attach to all lines and arcs. | |
typedef struct Extra | Extra |
Functions | |
static Coord | within (Coord x1, Coord y1, Coord x2, Coord y2, Coord r) |
static int | arc_endpoint_is (ArcType *a, int angle, Coord x, Coord y) |
static double | cross2d (Coord cx, Coord cy, Coord ux, Coord uy, Coord vx, Coord vy) |
static double | dot2d (Coord cx, Coord cy, Coord ux, Coord uy, Coord vx, Coord vy) |
Likewise, for dot product. | |
static int | same_sign (double a, double b) |
static double | r2d (double r) |
static double | d2r (double d) |
static double | det (double a, double b, double c, double d) |
| |
static int | intersection_of_lines (Coord x1, Coord y1, Coord x2, Coord y2, Coord x3, Coord y3, Coord x4, Coord y4, Coord *xr, Coord *yr) |
| |
static int | intersection_of_linesegs (Coord x1, Coord y1, Coord x2, Coord y2, Coord x3, Coord y3, Coord x4, Coord y4, Coord *xr, Coord *yr) |
Same, for line segments. | |
static double | dist_lp (Coord x1, Coord y1, Coord x2, Coord y2, Coord px, Coord py) |
Distance between a line and a point. | |
static double | dist_lsp (Coord x1, Coord y1, Coord x2, Coord y2, Coord px, Coord py) |
Distance between a line segment and a point. | |
static int | line_callback (const BoxType *b, void *cl) |
static int | arc_callback (const BoxType *b, void *cl) |
static int | find_pair (Coord Px, Coord Py) |
static int | Puller (int argc, char **argv, Coord Ux, Coord Uy) |
static void | status () |
static void | mark_line_for_deletion (LineType *) |
static void | unlink_end (Extra *x, Extra **e) |
static void | fix_arc_extra (ArcType *a, Extra *e) |
static int | find_pair_line_callback (const BoxType *b, void *cl) |
static int | find_pair_arc_callback (const BoxType *b, void *cl) |
static void | find_pairs_1 (void *me, Extra **e, Coord x, Coord y) |
static int | check_point_in_pin (PinType *pin, Coord x, Coord y, End *e) |
static int | find_pair_pinline_callback (const BoxType *b, void *cl) |
static int | find_pair_pinarc_callback (const BoxType *b, void *cl) |
static int | check_point_in_pad (PadType *pad, Coord x, Coord y, End *e) |
static int | find_pair_padline_callback (const BoxType *b, void *cl) |
static int | find_pair_padarc_callback (const BoxType *b, void *cl) |
static void | null_multi_next_ends (AnyObjectType *ptr, Extra *extra, void *userdata) |
static Extra * | new_line_extra (LineType *line) |
static Extra * | new_arc_extra (ArcType *arc) |
static void | find_pairs () |
static void | propogate_ends_at (Extra *e, End *near, End *far) |
static void | propogate_end_pin (Extra *e, End *near, End *far) |
static void | propogate_end_step1_cb (AnyObjectType *ptr, Extra *extra, void *userdata) |
static void | propogate_end_step2_cb (AnyObjectType *ptr, Extra *extra, void *userdata) |
static void | propogate_end_step3_cb (AnyObjectType *ptr, Extra *extra, void *userdata) |
static void | propogate_ends () |
static void | print_extra (Extra *e, Extra *prev) |
static void | reverse_line (LineType *line) |
static void | reverse_arc (ArcType *arc) |
static void | expand_box (BoxType *b, Coord x, Coord y, Coord t) |
static int | gp_point_force (Coord x, Coord y, Coord t, End *e, int esa, int eda, int force, const char *name) |
static int | gp_point_2 (Coord x, Coord y, Coord t, End *e, int esa, int eda, const char *func) |
static int | gp_line_cb (const BoxType *b, void *cb) |
static int | gp_arc_cb (const BoxType *b, void *cb) |
static int | gp_text_cb (const BoxType *b, void *cb) |
static int | gp_poly_cb (const BoxType *b, void *cb) |
static int | gp_pin_cb (const BoxType *b, void *cb) |
static int | gp_pad_cb (const BoxType *b, void *cb) |
static LineType * | create_line (LineType *sample, Coord x1, Coord y1, Coord x2, Coord y2) |
static ArcType * | create_arc (LineType *sample, Coord x, Coord y, Coord r, Coord sa, Coord da) |
static void | unlink_extras (Extra *e) |
static void | mark_arc_for_deletion (ArcType *a) |
static void | maybe_pull_1 (LineType *line) |
| |
static void | maybe_pull (LineType *line, Extra *e) |
Given a line with a end_next, attempt to pull both ends. | |
static void | validate_pair (Extra *e, End *end) |
static void | validate_pair_cb (AnyObjectType *ptr, Extra *extra, void *userdata) |
static void | validate_pairs () |
static void | FreeExtra (Extra *extra) |
static void | mark_ends_pending (LineType *line, Extra *extra, void *userdata) |
static int | GlobalPuller (int argc, char **argv, Coord x, Coord y) |
Variables | |
static jmp_buf | abort_buf |
static int | multi |
static int | line_exact |
static int | arc_exact |
static LineType * | the_line |
static ArcType * | the_arc |
static double | arc_dist |
static Coord | x |
static Coord | y |
static Coord | cx |
static Coord | cy |
static Coord | ex |
static Coord | ey |
static const char | puller_syntax [] = "Puller()" |
static const char | puller_help [] = "Pull an arc-line junction tight." |
static const char | globalpuller_syntax [] = "GlobalPuller()" |
static const char | globalpuller_help [] = "Pull all traces tight." |
static int | nloops |
static int | npulled |
static Extra | multi_next |
static GHashTable * | lines |
static GHashTable * | arcs |
static int | did_something |
static int | current_is_top |
static int | current_is_bottom |
static Extra * | last_pextra = 0 |
static ArcType * | start_arc |
static LineType * | start_line |
static LineType * | end_line |
static ArcType * | end_arc |
static Extra * | start_extra |
static Extra * | end_extra |
static Extra * | sarc_extra |
static Extra * | earc_extra |
static void * | start_pinpad |
static void * | end_pinpad |
static Coord | thickness |
static double | se_sign |
static double | sa_sign |
static double | ea_sign |
static double | best_angle |
static double | start_angle |
static double | end_dist |
static Coord | sa_r |
static Coord | ea_r |
static Coord | sa_x |
static Coord | sa_y |
static Coord | fx |
static Coord | fy |
static Coord | fr |
static int | fp |
static End * | fp_end |
static double | fa |
HID_Action | puller_action_list [] |
PCB, interactive printed circuit board design
Copyright (C) 2006 DJ Delorie
Copyright (C) 2011 PCB Contributers (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 paper mail and Email: DJ Delorie, 334 North Road, Deerfield NH 03037-1110, USA dj@delorie.com
Definition in file puller.c.
Definition at line 76 of file puller.c.
Referenced by find_pair_line_callback(), find_pair_padline_callback(), find_pair_pinline_callback(), GlobalPuller(), and gp_line_cb().
Definition at line 663 of file puller.c.
Referenced by find_pair_arc_callback(), find_pair_padarc_callback(), find_pair_pinarc_callback(), find_pairs(), GlobalPuller(), gp_arc_cb(), mark_arc_for_deletion(), maybe_pull_1(), and reverse_arc().
#define EXTRA2ARC | ( | e | ) | (e->parent.arc) |
Definition at line 665 of file puller.c.
Referenced by maybe_pull_1(), and print_extra().
#define EXTRA2LINE | ( | e | ) | (e->parent.line) |
Definition at line 664 of file puller.c.
Referenced by maybe_pull_1(), and print_extra().
#define EXTRA_IS_ARC | ( | e | ) | (e->type == ARC_TYPE) |
Definition at line 667 of file puller.c.
Referenced by gp_line_cb(), maybe_pull_1(), and print_extra().
#define EXTRA_IS_LINE | ( | e | ) | (e->type == LINE_TYPE) |
Definition at line 666 of file puller.c.
Referenced by maybe_pull(), and print_extra().
Definition at line 1440 of file puller.c.
Referenced by gp_arc_cb(), gp_line_cb(), gp_pad_cb(), gp_pin_cb(), gp_poly_cb(), and gp_text_cb().
Definition at line 662 of file puller.c.
Referenced by find_pair_line_callback(), find_pair_padline_callback(), find_pair_pinline_callback(), find_pairs(), GlobalPuller(), gp_line_cb(), mark_line_for_deletion(), maybe_pull_1(), and reverse_line().
#define NEAR | ( | a, | |
b | |||
) | ((a) <= (b) + 2 && (a) >= (b) - 2) |
Definition at line 733 of file puller.c.
Referenced by find_pair_arc_callback(), and find_pair_line_callback().
#define SIN1D 0.0174524064372835 |
static int arc_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 360 of file puller.c.
References arc_dist, arc_endpoint_is(), arc_exact, ArcType::Delta, multi, pcb_printf(), ArcType::StartAngle, ArcType::Width, x, ArcType::X, y, and ArcType::Y.
Referenced by find_pair().
Definition at line 106 of file puller.c.
References arc_dist, arc_exact, Distance(), ArcType::Height, M_PI, pcb_printf(), ArcType::Thickness, ArcType::Width, ArcType::X, and ArcType::Y.
Referenced by arc_callback(), and Puller().
Definition at line 901 of file puller.c.
References End::at_pin, Distance(), End::in_pin, End::is_pad, MAX, MIN, pcb_printf(), End::pin, and TEST_FLAG.
Referenced by find_pair_padarc_callback(), and find_pair_padline_callback().
Definition at line 828 of file puller.c.
References End::at_pin, Distance(), End::in_pin, pin, End::pin, PIN_SIZE, TEST_FLAG, X, pin_st::X, Y, and pin_st::Y.
Referenced by find_pair_pinarc_callback(), and find_pair_pinline_callback().
static ArcType* create_arc | ( | LineType * | sample, |
Coord | x, | ||
Coord | y, | ||
Coord | r, | ||
Coord | sa, | ||
Coord | da | ||
) | [static] |
Definition at line 1872 of file puller.c.
References abort_buf, AddObjectToCreateUndoList(), CreateNewArcOnLayer(), CURRENT, fix_arc_extra(), new_arc_extra(), and pcb_printf().
Referenced by maybe_pull_1().
Definition at line 1851 of file puller.c.
References AddObjectToCreateUndoList(), CreateNewLineOnLayer(), CURRENT, line, new_line_extra(), and pcb_printf().
Referenced by maybe_pull_1().
brief Cross c->u and c->v, return the magnitude.
Definition at line 148 of file puller.c.
Referenced by gp_point_2(), and maybe_pull_1().
static double d2r | ( | double | d | ) | [static] |
Definition at line 216 of file puller.c.
References M_PI.
Referenced by fix_arc_extra(), gp_point_force(), and Puller().
static double det | ( | double | a, |
double | b, | ||
double | c, | ||
double | d | ||
) | [static] |
| a b |
| c d |
Definition at line 229 of file puller.c.
References c.
Referenced by adjust_vertices(), determinant_2x2(), gts_matrix3_inverse(), gts_matrix_inverse(), gts_point_triangle_closest(), gts_point_triangle_distance2(), gts_triangle_circumcircle_center(), gts_triangle_interpolate_height(), incircle(), incircleadapt(), insphere(), insphereadapt(), intersection_of_lines(), intersection_of_linesegs(), orient2d(), orient2dadapt(), orient3d(), orient3dadapt(), and vertex_normal_attributes().
Distance between a line and a point.
Definition at line 297 of file puller.c.
References Distance(), and pcb_printf().
Referenced by gp_point_2(), and gp_point_force().
Distance between a line segment and a point.
Definition at line 314 of file puller.c.
References Distance(), and dot2d().
Referenced by find_pair_padline_callback(), and find_pair_pinline_callback().
Likewise, for dot product.
Definition at line 161 of file puller.c.
Referenced by dist_lsp(), and gp_point_2().
Definition at line 1396 of file puller.c.
References MAX, MIN, BoxType::X1, BoxType::X2, BoxType::Y1, and BoxType::Y2.
Referenced by maybe_pull_1().
Definition at line 399 of file puller.c.
References arc_callback(), arc_exact, CURRENT, line_callback(), line_exact, multi, pcb_printf(), Px(), Py(), r_search(), x, BoxType::X1, BoxType::X2, y, BoxType::Y1, and BoxType::Y2.
Referenced by Puller().
static int find_pair_arc_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 776 of file puller.c.
References ARC2EXTRA, Extra::end, FindPairCallbackStruct::extra_ptr, FindPairCallbackStruct::me, multi_next, NEAR, pcb_printf(), Extra::start, FindPairCallbackStruct::x, End::x, FindPairCallbackStruct::y, and End::y.
Referenced by find_pairs_1().
static int find_pair_line_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 736 of file puller.c.
References abort1, FindPairCallbackStruct::extra_ptr, line, LINE2EXTRA, FindPairCallbackStruct::me, multi_next, NEAR, pcb_printf(), FindPairCallbackStruct::x, and FindPairCallbackStruct::y.
Referenced by find_pairs_1().
static int find_pair_padarc_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 1027 of file puller.c.
References ARC2EXTRA, check_point_in_pad(), Extra::end, Extra::start, TEST_FLAG, End::x, and End::y.
Referenced by find_pairs().
static int find_pair_padline_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 956 of file puller.c.
References abort1, check_point_in_pad(), dist_lsp(), Extra::end, intersect(), intersection_of_linesegs(), line, LINE2EXTRA, End::next, pcb_printf(), Extra::start, TEST_FLAG, and unlink_end().
Referenced by find_pairs().
static int find_pair_pinarc_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 888 of file puller.c.
References ARC2EXTRA, check_point_in_pin(), Extra::end, pin, Extra::start, End::x, and End::y.
Referenced by find_pairs().
static int find_pair_pinline_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 850 of file puller.c.
References abort1, check_point_in_pin(), dist_lsp(), Extra::end, line, LINE2EXTRA, End::next, pcb_printf(), pin, PIN_SIZE, Extra::start, unlink_end(), pin_st::X, and pin_st::Y.
Referenced by find_pairs().
static void find_pairs | ( | ) | [static] |
Definition at line 1081 of file puller.c.
References ALLPAD_LOOP, ALLPIN_LOOP, ARC2EXTRA, ARC_LOOP, box, CURRENT, PCBType::Data, Extra::deleted, Extra::end, END_LOOP, ENDALL_LOOP, find_pair_padarc_callback(), find_pair_padline_callback(), find_pair_pinarc_callback(), find_pair_pinline_callback(), find_pairs_1(), fix_arc_extra(), line, LINE2EXTRA, LINE_LOOP, MAX, MIN, new_arc_extra(), new_line_extra(), End::next, null_multi_next_ends(), PCB, pin, PIN_SIZE, r_search(), Extra::start, VIA_LOOP, pin_st::X, End::x, BoxType::X1, BoxType::X2, pin_st::Y, End::y, BoxType::Y1, and BoxType::Y2.
Referenced by GlobalPuller().
Definition at line 804 of file puller.c.
References CURRENT, FindPairCallbackStruct::extra_ptr, find_pair_arc_callback(), find_pair_line_callback(), FindPairCallbackStruct::me, pcb_printf(), r_search(), x, FindPairCallbackStruct::x, BoxType::X1, BoxType::X2, y, FindPairCallbackStruct::y, BoxType::Y1, and BoxType::Y2.
Referenced by find_pairs().
Definition at line 712 of file puller.c.
References d2r(), ArcType::Delta, Extra::end, ArcType::Height, pcb_printf(), Extra::start, ArcType::StartAngle, ArcType::Width, ArcType::X, End::x, ArcType::Y, and End::y.
Referenced by create_arc(), find_pairs(), and maybe_pull_1().
static void FreeExtra | ( | Extra * | extra | ) | [static] |
Definition at line 2553 of file puller.c.
Referenced by GlobalPuller().
Definition at line 2591 of file puller.c.
References abort1, abort_buf, ARC2EXTRA, ARC_LOOP, BOTTOM_SIDE, hid_st::confirm_dialog, CURRENT, Extra::deleted, did_something, Extra::end, END_LOOP, find_pairs(), FreeExtra(), GetLayerGroupNumberByPointer(), GetLayerGroupNumberBySide(), gui, IncrementUndoSerialNumber(), line, LINE2EXTRA, LINE_LOOP, mark_ends_pending(), maybe_pull(), Message(), End::next, propogate_ends(), RemoveArc(), RemoveLine(), Extra::start, status(), TOP_SIDE, and validate_pairs().
static int gp_arc_cb | ( | const BoxType * | b, |
void * | cb | ||
) | [static] |
Definition at line 1724 of file puller.c.
References __FUNCTION__, ARC2EXTRA, Extra::deleted, ArcType::Delta, Extra::end, gp_point, gp_point_2(), End::next, Extra::start, ArcType::StartAngle, ArcType::Thickness, ArcType::Width, End::x, ArcType::X, End::y, and ArcType::Y.
Referenced by maybe_pull_1().
static int gp_line_cb | ( | const BoxType * | b, |
void * | cb | ||
) | [static] |
Definition at line 1702 of file puller.c.
References abort1, Extra::deleted, Extra::end, EXTRA_IS_ARC, gp_point, LINE2EXTRA, End::next, and Extra::start.
Referenced by maybe_pull_1().
static int gp_pad_cb | ( | const BoxType * | b, |
void * | cb | ||
) | [static] |
static int gp_pin_cb | ( | const BoxType * | b, |
void * | cb | ||
) | [static] |
static int gp_point_2 | ( | Coord | x, |
Coord | y, | ||
Coord | t, | ||
End * | e, | ||
int | esa, | ||
int | eda, | ||
const char * | func | ||
) | [static] |
Definition at line 1612 of file puller.c.
References cross2d(), dist_lp(), dot2d(), gp_point_force(), pcb_printf(), and same_sign().
Referenced by gp_arc_cb().
static int gp_point_force | ( | Coord | x, |
Coord | y, | ||
Coord | t, | ||
End * | e, | ||
int | esa, | ||
int | eda, | ||
int | force, | ||
const char * | name | ||
) | [static] |
Definition at line 1443 of file puller.c.
References __FUNCTION__, d2r(), dist_lp(), Distance(), M_PI, pcb_printf(), End::pending, r2d(), start_angle, thickness, ArcType::Width, x, ArcType::X, y, and ArcType::Y.
Referenced by gp_point_2(), and maybe_pull_1().
static int gp_poly_cb | ( | const BoxType * | b, |
void * | cb | ||
) | [static] |
Definition at line 1763 of file puller.c.
References gp_point, polygon_st::PointN, polygon_st::Points, PointType::X, and PointType::Y.
Referenced by maybe_pull_1().
static int gp_text_cb | ( | const BoxType * | b, |
void * | cb | ||
) | [static] |
static int line_callback | ( | const BoxType * | b, |
void * | cl | ||
) | [static] |
Definition at line 330 of file puller.c.
References Distance(), line_exact, multi, pcb_printf(), x, and y.
Referenced by find_pair().
static void mark_arc_for_deletion | ( | ArcType * | a | ) | [static] |
Definition at line 1995 of file puller.c.
References ARC2EXTRA, Extra::deleted, ArcType::Delta, ArcType::StartAngle, and unlink_extras().
Referenced by maybe_pull_1().
Definition at line 2559 of file puller.c.
References Extra::end, End::pending, Extra::start, and TEST_FLAGS.
Referenced by GlobalPuller().
static void mark_line_for_deletion | ( | LineType * | l | ) | [static] |
Definition at line 1965 of file puller.c.
References CURRENT, Extra::deleted, LINE2EXTRA, MoveObject(), pcb_printf(), and unlink_extras().
Referenced by maybe_pull_1(), and propogate_end_step1_cb().
Given a line with a end_next, attempt to pull both ends.
Definition at line 2497 of file puller.c.
References Extra::end, EXTRA_IS_LINE, maybe_pull_1(), End::next, End::pending, print_extra(), reverse_line(), and Extra::start.
Referenced by GlobalPuller().
static void maybe_pull_1 | ( | LineType * | line | ) | [static] |
Given a starting line, which may be attached to an arc, and which intersects with an ending line, which also may be attached to an arc, maybe pull them.
We assume start_line is attached to the arc via Point1, and attached to the end line via Point2.
Likewise, we make end_line attach to the start_line via Point1 and the arc via Point 2.
We also make the arcs attach on the Delta end, not the Start end.
Here's a picture:
S S+D P1 P2 P1 P2 S+D S --- start_arc ---*--- start_line ---*--- end_line ---*--- end_arc ---* S E S E S E E S
Definition at line 2025 of file puller.c.
References abort_buf, ARC2EXTRA, PCBType::Bloat, box, ChangeArcAngles(), hid_st::confirm_dialog, create_arc(), create_line(), cross2d(), CURRENT, PCBType::Data, Extra::deleted, Delta, ArcType::Delta, Distance(), Extra::end, end_extra, ex, expand_box(), EXTRA2ARC, EXTRA2LINE, EXTRA_IS_ARC, ey, fix_arc_extra(), fp_end, gp_arc_cb(), gp_line_cb(), gp_pad_cb(), gp_pin_cb(), gp_point_force(), gp_poly_cb(), gp_text_cb(), gui, IncrementUndoSerialNumber(), intersection_of_lines(), line, LINE2EXTRA, M_PI, mark_arc_for_deletion(), mark_line_for_deletion(), MoveObject(), new_line(), End::next, DataType::pad_tree, PCB, pcb_fprintf(), pcb_printf(), End::pending, End::pin, DataType::pin_tree, print_extra(), r2d(), r_search(), reverse_arc(), reverse_line(), same_sign(), se_sign, SET_FLAG, SIN1D, Extra::start, start_angle, start_extra, ArcType::StartAngle, status(), ArcType::Thickness, DataType::via_tree, End::waiting_for, ArcType::Width, ArcType::X, End::x, BoxType::X1, BoxType::X2, ArcType::Y, End::y, BoxType::Y1, and BoxType::Y2.
Referenced by maybe_pull().
Definition at line 1071 of file puller.c.
References Extra::arc, Extra::parent, and Extra::type.
Referenced by create_arc(), and find_pairs().
Definition at line 1061 of file puller.c.
References line, Extra::line, Extra::parent, and Extra::type.
Referenced by create_line(), and find_pairs().
static void null_multi_next_ends | ( | AnyObjectType * | ptr, |
Extra * | extra, | ||
void * | userdata | ||
) | [static] |
Definition at line 1051 of file puller.c.
References Extra::end, End::next, and Extra::start.
Referenced by find_pairs().
Definition at line 1245 of file puller.c.
References End::at_pin, Extra::deleted, ArcType::Delta, Extra::end, EXTRA2ARC, EXTRA2LINE, EXTRA_IS_ARC, EXTRA_IS_LINE, Extra::found, End::in_pin, End::is_pad, line, End::next, pcb_printf(), End::pending, End::pin, Extra::start, ArcType::StartAngle, ArcType::X, End::x, ArcType::Y, and End::y.
Referenced by maybe_pull(), maybe_pull_1(), unlink_extras(), and validate_pair().
Definition at line 1169 of file puller.c.
References End::is_pad, End::next, End::pin, and PROP_NEXT.
Referenced by propogate_end_step3_cb().
static void propogate_end_step1_cb | ( | AnyObjectType * | ptr, |
Extra * | extra, | ||
void * | userdata | ||
) | [static] |
Definition at line 1184 of file puller.c.
References End::at_pin, Extra::end, mark_line_for_deletion(), End::next, propogate_ends_at(), and Extra::start.
Referenced by propogate_ends().
static void propogate_end_step2_cb | ( | AnyObjectType * | ptr, |
Extra * | extra, | ||
void * | userdata | ||
) | [static] |
Definition at line 1201 of file puller.c.
References Extra::end, End::in_pin, End::next, and Extra::start.
Referenced by propogate_ends().
static void propogate_end_step3_cb | ( | AnyObjectType * | ptr, |
Extra * | extra, | ||
void * | userdata | ||
) | [static] |
Definition at line 1220 of file puller.c.
References Extra::end, End::next, propogate_end_pin(), and Extra::start.
Referenced by propogate_ends().
static void propogate_ends | ( | ) | [static] |
Definition at line 1229 of file puller.c.
References propogate_end_step1_cb(), propogate_end_step2_cb(), and propogate_end_step3_cb().
Referenced by GlobalPuller().
Definition at line 1156 of file puller.c.
References End::in_pin, End::next, End::pin, and PROP_NEXT.
Referenced by propogate_end_step1_cb().
Definition at line 448 of file puller.c.
References arc_angle(), arc_endpoint_is(), ChangeArcAngles(), Crosshair, CURRENT, d2r(), ArcType::Delta, Distance(), ex, ey, find_pair(), gui, ArcType::Height, IncrementUndoSerialNumber(), hid_st::invalidate_all, MoveObject(), r2d(), ArcType::StartAngle, tangent(), ArcType::Width, within(), ArcType::X, x, CrosshairType::X, ArcType::Y, y, and CrosshairType::Y.
static double r2d | ( | double | r | ) | [static] |
Definition at line 210 of file puller.c.
References M_PI.
Referenced by gp_point_force(), maybe_pull_1(), and Puller().
static void reverse_arc | ( | ArcType * | arc | ) | [static] |
Definition at line 1377 of file puller.c.
References ARC2EXTRA, ChangeArcAngles(), CURRENT, ArcType::Delta, Extra::end, Extra::start, and ArcType::StartAngle.
Referenced by maybe_pull_1().
static void reverse_line | ( | LineType * | line | ) | [static] |
Definition at line 1349 of file puller.c.
References CURRENT, Extra::end, LINE2EXTRA, MoveObject(), Extra::start, x, and y.
Referenced by maybe_pull(), and maybe_pull_1().
static int same_sign | ( | double | a, |
double | b | ||
) | [static] |
Definition at line 204 of file puller.c.
Referenced by gp_point_2(), and maybe_pull_1().
static void status | ( | ) | [static] |
Definition at line 614 of file puller.c.
References Message().
Referenced by ghid_listener_cb(), GlobalPuller(), and maybe_pull_1().
Definition at line 670 of file puller.c.
References multi_next.
Referenced by find_pair_padline_callback(), and find_pair_pinline_callback().
static void unlink_extras | ( | Extra * | e | ) | [static] |
Definition at line 1905 of file puller.c.
References Extra::end, End::next, print_extra(), and Extra::start.
Referenced by mark_arc_for_deletion(), and mark_line_for_deletion().
Definition at line 2521 of file puller.c.
References Extra::end, End::next, print_extra(), and Extra::start.
Referenced by validate_pair_cb().
static void validate_pair_cb | ( | AnyObjectType * | ptr, |
Extra * | extra, | ||
void * | userdata | ||
) | [static] |
Definition at line 2536 of file puller.c.
References Extra::end, Extra::start, and validate_pair().
Referenced by validate_pairs().
static void validate_pairs | ( | ) | [static] |
Definition at line 2543 of file puller.c.
References validate_pair_cb().
Referenced by GlobalPuller().
Definition at line 100 of file puller.c.
References Distance().
Referenced by do_via_search(), and Puller().
jmp_buf abort_buf [static] |
Definition at line 84 of file puller.c.
Referenced by create_arc(), GlobalPuller(), and maybe_pull_1().
double arc_dist [static] |
Definition at line 88 of file puller.c.
Referenced by arc_callback(), and arc_endpoint_is().
int arc_exact |
Definition at line 85 of file puller.c.
Referenced by arc_callback(), arc_endpoint_is(), and find_pair().
GHashTable* arcs [static] |
Definition at line 650 of file puller.c.
Referenced by export_oproutes(), oproute_calculate_tof(), and oproute_rubberband_segment().
double best_angle [static] |
int current_is_top [static] |
Definition at line 94 of file puller.c.
Referenced by add_hole(), coord_intersect(), cross2d(), dot2d(), free_rotate(), gerber_fill_circle(), ghid_render_pixmap(), gsvit_write_xdrills(), SquarePadPoly(), and zoom_to().
Definition at line 94 of file puller.c.
Referenced by add_hole(), coord_intersect(), cross2d(), dot2d(), free_rotate(), gerber_fill_circle(), ghid_render_pixmap(), gsvit_write_xdrills(), SquarePadPoly(), and zoom_to().
int did_something [static] |
Definition at line 651 of file puller.c.
Referenced by GlobalPuller().
Definition at line 1413 of file puller.c.
Referenced by maybe_pull_1().
void * end_pinpad |
Definition at line 95 of file puller.c.
Referenced by connect_corners(), maybe_pull_1(), penalty3(), and Puller().
Definition at line 95 of file puller.c.
Referenced by maybe_pull_1(), penalty3(), and Puller().
int fp [static] |
Definition at line 1436 of file puller.c.
Referenced by ActionExecuteFile(), ActionSaveTo(), CheckAndOpenFile(), common_string_to_flags(), gts_file_new(), gts_graph_read(), gts_graph_write(), gts_graph_write_dot(), gts_psurface_read_vertex(), ImportNetlist(), IPCD356_Netlist(), make_footprint_hash(), OpenConnectionDataFile(), PrintBOM(), ReadNetlist(), triangulate_face(), triangulate_loop(), write_dot_node(), write_edge(), write_node(), write_vertex_oogl(), write_vertex_vtk(), WritePCBFile(), and WritePipe().
Definition at line 1437 of file puller.c.
Referenced by maybe_pull_1().
Definition at line 1435 of file puller.c.
Referenced by gts_point_locate().
const char globalpuller_help[] = "Pull all traces tight." [static] |
const char globalpuller_syntax[] = "GlobalPuller()" [static] |
Extra* last_pextra = 0 [static] |
int line_exact |
Definition at line 85 of file puller.c.
Referenced by find_pair(), and line_callback().
int multi [static] |
Definition at line 85 of file puller.c.
Referenced by arc_callback(), find_pair(), and line_callback().
Extra multi_next [static] |
Definition at line 648 of file puller.c.
Referenced by find_pair_arc_callback(), find_pair_line_callback(), and unlink_end().
{ {"Puller", "Click on a line-arc intersection or line segment", Puller, puller_help, puller_syntax}, {"GlobalPuller", 0, GlobalPuller, globalpuller_help, globalpuller_syntax} }
const char puller_help[] = "Pull an arc-line junction tight." [static] |
const char puller_syntax[] = "Puller()" [static] |
Extra* sarc_extra [static] |
double se_sign [static] |
Definition at line 1426 of file puller.c.
Referenced by maybe_pull_1().
double start_angle |
Definition at line 1428 of file puller.c.
Referenced by eps_draw_arc(), gcode_draw_arc(), gerber_draw_arc(), ghid_draw_arc(), gp_point_force(), gsvit_draw_arc(), lesstif_draw_arc(), maybe_pull_1(), nelma_draw_arc(), png_draw_arc(), and ps_draw_arc().
Extra* start_extra [static] |
Definition at line 1413 of file puller.c.
Referenced by maybe_pull_1().
LineType* start_line [static] |
void* start_pinpad [static] |
Definition at line 1416 of file puller.c.
Referenced by ActionMinMaskGap(), ComputeCost(), export_oproutes(), and gp_point_force().
Definition at line 93 of file puller.c.
Referenced by ActionDisplay(), ActionImport(), ActionMoveObject(), ActionPasteBuffer(), ActionSelect(), adjust_vertices(), AdjustInsertPoint(), arc_callback(), ArcArcIntersect(), bm_to_pathlist(), calc_lon(), calc_sums(), candidate_vertices(), canonicalize_line(), check_intersect_vertex(), check_line_callback(), check_non_intersect_vertex(), check_snap_object(), CirclePoly(), common_draw_pcb_text(), common_fill_pcb_pad(), copy_to_bounded(), create_board_edge(), detrand(), djabs(), draw_cap(), draw_crosshair(), draw_dozen_cross(), draw_slanted_cross(), DrawBackgroundImage(), drc_callback(), DRCAll(), DRCFind(), EnableAutosave(), fill_clipped_contour(), fill_contour(), find_clusters(), find_corner(), find_pair(), find_pairs_1(), findnext(), findpath(), FlagMode(), FontEdit(), free_slice(), gerber_draw_line(), gerber_fill_rect(), gerber_set_layer(), get_vertex(), ghid_confirm_dialog(), ghid_dialog_confirm(), ghid_draw_bg_image(), ghid_draw_grid(), ghid_lead_user_to_location(), ghid_set_crosshair(), ghid_unproject_to_z_plane(), ghid_watch(), gp_point_force(), GridFit(), gsvit_write_xcentroids(), gts_bb_tree_triangle_distance(), gts_bbox_diagonal2(), gts_bbox_point_distance2(), gts_delaunay_add_vertex_to_face(), gts_iso_slice_fill(), gts_iso_slice_fill_cartesian(), gts_point_new(), gts_point_orientation_3d_sos(), gts_point_orientation_sos(), gts_point_segment_distance2(), gts_point_set(), gts_point_transform(), gts_point_triangle_distance2(), gts_triangle_area(), gts_triangle_interpolate_height(), gts_vertex_principal_directions(), gts_vertices_merge(), hid_actionv(), hidgl_draw_arc(), hidgl_draw_grid(), hidgl_fill_circle(), intersection_of_lines(), intersection_of_linesegs(), isects(), iso_slice_evaluate(), iso_slice_evaluate_bcl(), iso_sub(), IsPointInPad(), IsPointInQuadrangle(), lesstif_draw_grid(), lesstif_set_crosshair(), lesstif_watch_cb(), line_callback(), miter(), move_corner(), nelma_write_object(), netlist_find(), netlist_select(), netnode_browse(), new_slice(), node_selection_changed_cb(), OctagonPoly(), orthopull_1(), Pan(), pcb_drc_violation_new(), penalty3(), plotpolygon(), png_do_export(), png_draw_arc(), png_use_mask(), pointslope(), PrintBOM(), Puller(), Px(), read_pads(), read_points(), reverse_line(), rubber_callback(), setbbox_path(), slice_init(), sort_drill(), space_edge(), split_edge(), split_path(), spread_edge(), square(), Subtract(), text_at(), thindraw_moved_pv(), toporouter_draw_surface(), toporouter_serpintine_new(), triangle_interior_capacity(), triangulate_face(), ts_bs(), ts_bs_sm(), unit_sphere_arc_midvertex(), Unsubtract(), vertex_move_towards_vertex(), vset(), xor_path(), and XORDrawBuffer().
Definition at line 93 of file puller.c.
Referenced by ActionDisplay(), ActionImport(), ActionMoveObject(), ActionPasteBuffer(), ActionSelect(), adjust_vertices(), AdjustInsertPoint(), arc_callback(), ArcArcIntersect(), bm_clearexcess(), bm_to_pathlist(), calc_lon(), calc_sums(), candidate_vertices(), canonicalize_line(), check_intersect_vertex(), check_non_intersect_vertex(), check_snap_object(), CirclePoly(), clear_bm_with_bbox(), common_fill_pcb_pad(), copy_to_bounded(), create_board_edge(), djmax(), djmin(), doPerturb(), draw_cap(), draw_crosshair(), draw_dozen_cross(), draw_slanted_cross(), DrawBackgroundImage(), drc_callback(), DRCAll(), DRCFind(), fill_contour(), find_clusters(), find_corner(), find_pair(), find_pairs_1(), findnext(), findpath(), FontEdit(), gerber_draw_line(), gerber_fill_rect(), gerber_set_layer(), get_vertex(), ghid_confirm_dialog(), ghid_dialog_confirm(), ghid_draw_bg_image(), ghid_draw_grid(), ghid_lead_user_to_location(), ghid_set_crosshair(), ghid_unproject_to_z_plane(), gp_point_force(), gsvit_write_xcentroids(), gts_bb_tree_triangle_distance(), gts_bbox_diagonal2(), gts_bbox_point_distance2(), gts_delaunay_add_vertex_to_face(), gts_iso_slice_fill(), gts_iso_slice_fill_cartesian(), gts_point_new(), gts_point_orientation_3d_sos(), gts_point_orientation_sos(), gts_point_segment_distance2(), gts_point_set(), gts_point_transform(), gts_point_triangle_distance2(), gts_triangle_area(), gts_triangle_interpolate_height(), gts_vertex_principal_directions(), gts_vertices_merge(), hid_actionv(), hidgl_draw_arc(), hidgl_draw_grid(), hidgl_fill_circle(), intersection_of_lines(), intersection_of_linesegs(), iso_slice_evaluate(), iso_slice_evaluate_bcl(), iso_sub(), IsPointInQuadrangle(), lesstif_draw_grid(), lesstif_set_crosshair(), line_callback(), miter(), move_corner(), nelma_write_object(), netlist_find(), netlist_select(), netnode_browse(), node_selection_changed_cb(), OctagonPoly(), orthopull_1(), Pan(), pcb_drc_violation_new(), penalty3(), plotpolygon(), png_do_export(), png_draw_arc(), png_use_mask(), pointslope(), PrintBOM(), Puller(), Py(), read_pads(), read_points(), reverse_line(), rubber_callback(), setbbox_path(), slice_init(), sort_drill(), space_edge(), split_edge(), split_path(), spread_edge(), text_at(), thindraw_moved_pv(), toporouter_draw_surface(), toporouter_serpintine_new(), triangle_interior_capacity(), triangulate_face(), ts_bs(), ts_bs_sm(), unit_sphere_arc_midvertex(), vertex_move_towards_vertex(), vset(), xor_path(), and XORDrawBuffer().