Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 2029) +++ trunk/src/action_helper.c (revision 2030) @@ -526,7 +526,7 @@ break; } if ((via = CreateNewVia(PCB->Data, Note.X, Note.Y, - conf_core.design.via_thickness, 2 * conf_core.design.keepaway, + conf_core.design.via_thickness, 2 * conf_core.design.clearance, 0, conf_core.design.via_drilling_hole, NULL, NoFlags())) != NULL) { AddObjectToCreateUndoList(VIA_TYPE, via, via, via); if (gui->shift_is_pressed()) @@ -585,7 +585,7 @@ sa, dir, conf_core.design.line_thickness, - 2 * conf_core.design.keepaway, + 2 * conf_core.design.clearance, MakeFlags(conf_core.editor.clear_line ? CLEARLINEFLAG : 0)))) { BoxTypePtr bx; @@ -728,7 +728,7 @@ Crosshair.AttachedLine.Point2.X, Crosshair.AttachedLine.Point2.Y, conf_core.design.line_thickness, - 2 * conf_core.design.keepaway, + 2 * conf_core.design.clearance, MakeFlags(maybe_found_flag | (conf_core.editor.clear_line ? CLEARLINEFLAG : 0)))) != NULL) { PinTypePtr via; @@ -751,7 +751,7 @@ Crosshair.AttachedLine.Point1.X, Crosshair.AttachedLine.Point1.Y, conf_core.design.via_thickness, - 2 * conf_core.design.keepaway, 0, conf_core.design.via_drilling_hole, NULL, NoFlags())) != NULL) { + 2 * conf_core.design.clearance, 0, conf_core.design.via_drilling_hole, NULL, NoFlags())) != NULL) { AddObjectToCreateUndoList(VIA_TYPE, via, via, via); DrawVia(via); } @@ -768,7 +768,7 @@ Crosshair.AttachedLine.Point2.Y, Note.X, Note.Y, conf_core.design.line_thickness, - 2 * conf_core.design.keepaway, + 2 * conf_core.design.clearance, MakeFlags((conf_core.editor.auto_drc ? FOUNDFLAG : 0) | (conf_core.editor.clear_line ? CLEARLINEFLAG : 0)))) != NULL) { addedLines++; @@ -1184,12 +1184,12 @@ else if (size_id == 1) *out = conf_core.design.via_drilling_hole; else - *out = conf_core.design.keepaway; + *out = conf_core.design.clearance; break; case F_SelectedArcs: case F_SelectedLines: if (size_id == 2) - *out = conf_core.design.keepaway; + *out = conf_core.design.clearance; else *out = conf_core.design.line_thickness; return 0; Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 2029) +++ trunk/src/buffer.c (revision 2030) @@ -726,7 +726,7 @@ sprintf(num, "%d", pin_n++); CreateNewPad(Element, x1, y1, x2, y2, t, - 2 * conf_core.design.keepaway, t + conf_core.design.keepaway, NULL, num, MakeFlags(SQUAREFLAG | onsolderflag)); + 2 * conf_core.design.clearance, t + conf_core.design.clearance, NULL, num, MakeFlags(SQUAREFLAG | onsolderflag)); MAYBE_WARN(); hasParts = true; } Index: trunk/src/conf_act.c =================================================================== --- trunk/src/conf_act.c (revision 2029) +++ trunk/src/conf_act.c (revision 2030) @@ -158,7 +158,7 @@ { if (style->Thick == conf_core.design.line_thickness && style->Diameter == conf_core.design.via_thickness && - style->Hole == conf_core.design.via_drilling_hole && style->Keepaway == conf_core.design.keepaway) + style->Hole == conf_core.design.via_drilling_hole && style->Clearance == conf_core.design.clearance) return n + 1; } END_LOOP; Index: trunk/src/conf_core.h =================================================================== --- trunk/src/conf_core.h (revision 2029) +++ trunk/src/conf_core.h (revision 2030) @@ -107,7 +107,7 @@ CFT_COORD via_thickness; CFT_COORD via_drilling_hole; CFT_COORD line_thickness; - CFT_COORD keepaway; + CFT_COORD clearance; CFT_COORD max_width; CFT_COORD max_height; Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 2029) +++ trunk/src/crosshair.c (revision 2030) @@ -462,7 +462,7 @@ via.X = Crosshair.X; via.Y = Crosshair.Y; via.Thickness = conf_core.design.via_thickness; - via.Clearance = 2 * conf_core.design.keepaway; + via.Clearance = 2 * conf_core.design.clearance; via.DrillingHole = conf_core.design.via_drilling_hole; via.Mask = 0; via.Flags = NoFlags(); Index: trunk/src/global.h =================================================================== --- trunk/src/global.h (revision 2029) +++ trunk/src/global.h (revision 2030) @@ -238,7 +238,7 @@ Coord Thick, /* line thickness */ Diameter, /* via diameter */ Hole, /* via drill hole */ - Keepaway; /* min. separation from other nets */ + Clearance; /* min. separation from other nets */ char *Name; int index; } RouteStyleType, *RouteStyleTypePtr; Index: trunk/src/gui_act.c =================================================================== --- trunk/src/gui_act.c (revision 2029) +++ trunk/src/gui_act.c (revision 2030) @@ -1005,7 +1005,7 @@ SetLineSize(rts->Thick); SetViaSize(rts->Diameter, true); SetViaDrillingHole(rts->Hole, true); - SetKeepawayWidth(rts->Keepaway); + SetClearanceWidth(rts->Clearance); hid_action("RouteStylesChanged"); } } @@ -1046,7 +1046,7 @@ When invoked over any line, arc, polygon, or via, this changes the current layer to be the layer that item is on, and changes the current -sizes (thickness, keepaway, drill, etc) according to that item. +sizes (thickness, clearance, drill, etc) according to that item. %end-doc */ @@ -1062,7 +1062,7 @@ case LINE_TYPE: notify_crosshair_change(false); conf_set_design("design/line_thickness", "%$mS", ((LineTypePtr) ptr2)->Thickness); - conf_set_design("design/keepaway", "%$mS", ((LineTypePtr) ptr2)->Clearance / 2); + conf_set_design("design/clearance", "%$mS", ((LineTypePtr) ptr2)->Clearance / 2); layer = (LayerTypePtr) ptr1; if (conf_core.editor.mode != LINE_MODE) SetMode(LINE_MODE); @@ -1073,7 +1073,7 @@ case ARC_TYPE: notify_crosshair_change(false); conf_set_design("design/line_thickness", "%$mS", ((ArcTypePtr) ptr2)->Thickness); - conf_set_design("design/keepaway", "%$mS", ((ArcTypePtr) ptr2)->Clearance / 2); + conf_set_design("design/clearance", "%$mS", ((ArcTypePtr) ptr2)->Clearance / 2); layer = (LayerTypePtr) ptr1; if (conf_core.editor.mode != ARC_MODE) SetMode(ARC_MODE); @@ -1089,7 +1089,7 @@ notify_crosshair_change(false); conf_set_design("design/via_thickness", "%$mS", ((PinTypePtr) ptr2)->Thickness); conf_set_design("design/via_drilling_hole", "%$mS", ((PinTypePtr) ptr2)->DrillingHole); - conf_set_design("design/keepaway", "%$mS", ((PinTypePtr) ptr2)->Clearance / 2); + conf_set_design("design/clearance", "%$mS", ((PinTypePtr) ptr2)->Clearance / 2); if (conf_core.editor.mode != VIA_MODE) SetMode(VIA_MODE); notify_crosshair_change(true); Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 2029) +++ trunk/src/insert.c (revision 2030) @@ -89,7 +89,7 @@ LineTypePtr newone; newone = CreateDrawnLineOnLayer(CURRENT, Rat->Point1.X, Rat->Point1.Y, - InsertX, InsertY, conf_core.design.line_thickness, 2 * conf_core.design.keepaway, Rat->Flags); + InsertX, InsertY, conf_core.design.line_thickness, 2 * conf_core.design.clearance, Rat->Flags); if (!newone) return newone; AddObjectToCreateUndoList(LINE_TYPE, CURRENT, newone, newone); @@ -96,7 +96,7 @@ EraseRat(Rat); DrawLine(CURRENT, newone); newone = CreateDrawnLineOnLayer(CURRENT, Rat->Point2.X, Rat->Point2.Y, - InsertX, InsertY, conf_core.design.line_thickness, 2 * conf_core.design.keepaway, Rat->Flags); + InsertX, InsertY, conf_core.design.line_thickness, 2 * conf_core.design.clearance, Rat->Flags); if (newone) { AddObjectToCreateUndoList(LINE_TYPE, CURRENT, newone, newone); DrawLine(CURRENT, newone); Index: trunk/src/misc.c =================================================================== --- trunk/src/misc.c (revision 2029) +++ trunk/src/misc.c (revision 2030) @@ -741,7 +741,7 @@ for (i = 0; i < n_styles; ++i) { pcb_append_printf(&str, "%s,%mc,%mc,%mc,%mc", rs[i].Name, rs[i].Thick, rs[i].Diameter, - rs[i].Hole, rs[i].Keepaway); + rs[i].Hole, rs[i].Clearance); if (i > 0) gds_append(&str, ':'); } @@ -787,9 +787,9 @@ goto error; routeStyle->Hole = GetNum(&s, default_unit); /* for backwards-compatibility, we use a 10-mil default - * for styles which omit the keepaway specification. */ + * for styles which omit the clearance specification. */ if (*s != ',') - routeStyle->Keepaway = MIL_TO_COORD(10); + routeStyle->Clearance = MIL_TO_COORD(10); else { s++; while (*s && isspace((int) *s)) @@ -796,7 +796,7 @@ s++; if (!isdigit((int) *s)) goto error; - routeStyle->Keepaway = GetNum(&s, default_unit); + routeStyle->Clearance = GetNum(&s, default_unit); while (*s && isspace((int) *s)) s++; } Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 2029) +++ trunk/src/move.c (revision 2030) @@ -458,7 +458,7 @@ else as before */ newone = CreateNewLineOnLayer(Dest, Rat->Point1.X, Rat->Point1.Y, - Rat->Point2.X, Rat->Point2.Y, conf_core.design.line_thickness, 2 * conf_core.design.keepaway, Rat->Flags); + Rat->Point2.X, Rat->Point2.Y, conf_core.design.line_thickness, 2 * conf_core.design.clearance, Rat->Flags); if (conf_core.editor.clear_line) conf_set_editor(clear_line, 1); if (!newone) @@ -488,7 +488,7 @@ if ((via = CreateNewVia(PCB->Data, i->X, i->Y, - conf_core.design.via_thickness, 2 * conf_core.design.keepaway, NOFLAG, conf_core.design.via_drilling_hole, NULL, NoFlags())) != NULL) { + conf_core.design.via_thickness, 2 * conf_core.design.clearance, NOFLAG, conf_core.design.via_drilling_hole, NULL, NoFlags())) != NULL) { AddObjectToCreateUndoList(VIA_TYPE, via, via, via); DrawVia(via); } Index: trunk/src/pcb-conf.lht =================================================================== --- trunk/src/pcb-conf.lht (revision 2029) +++ trunk/src/pcb-conf.lht (revision 2030) @@ -110,7 +110,7 @@ # via_thickness = 0 # via_drilling_hole = 0 # line_thickness = 0 -# keepaway = 0 +# clearance = 0 # max_width = 0 # max_height = 0 # alignment_distance = 0 Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 2029) +++ trunk/src/plug_io.c (revision 2030) @@ -476,7 +476,7 @@ SetLineSize(PCB->RouteStyle[0].Thick); SetViaSize(PCB->RouteStyle[0].Diameter, true); SetViaDrillingHole(PCB->RouteStyle[0].Hole, true); - SetKeepawayWidth(PCB->RouteStyle[0].Keepaway); + SetClearanceWidth(PCB->RouteStyle[0].Clearance); } /* --------------------------------------------------------------------------- Index: trunk/src/set.c =================================================================== --- trunk/src/set.c (revision 2029) +++ trunk/src/set.c (revision 2030) @@ -110,16 +110,16 @@ conf_set_design("design/line_thickness", "%$mS", rst->Thick); conf_set_design("design/via_thickness", "%$mS", rst->Diameter); conf_set_design("design/via_drilling_hole", "%$mS", rst->Hole); - conf_set_design("design/keepaway", "%$mS", rst->Keepaway); + conf_set_design("design/clearance", "%$mS", rst->Clearance); } /* --------------------------------------------------------------------------- - * sets a keepaway width + * sets a clearance width */ -void SetKeepawayWidth(Coord Width) +void SetClearanceWidth(Coord Width) { if (Width <= MAX_LINESIZE) { - conf_set_design("design/keepaway", "%$mS", Width); + conf_set_design("design/clearance", "%$mS", Width); } } Index: trunk/src/set.h =================================================================== --- trunk/src/set.h (revision 2029) +++ trunk/src/set.h (revision 2030) @@ -39,7 +39,7 @@ void SetLineSize(Coord); void SetViaSize(Coord, bool); void SetViaDrillingHole(Coord, bool); -void SetKeepawayWidth(Coord); +void SetClearanceWidth(Coord); void SetChangedFlag(bool); void SetBufferNumber(int); void SetMode(int); Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 2029) +++ trunk/src_plugins/autoroute/autoroute.c (revision 2030) @@ -143,10 +143,10 @@ #define EXPENSIVE 3e28 /* round up "half" thicknesses */ #define HALF_THICK(x) (((x)+1)/2) -/* a styles maximum bloat is its keepaway plus the larger of its via radius +/* a styles maximum bloat is its clearance plus the larger of its via radius * or line half-thickness. */ #define BLOAT(style)\ - ((style)->Keepaway + HALF_THICK((style)->Thick)) + ((style)->Clearance + HALF_THICK((style)->Thick)) /* conflict penalty is less for traces laid down during previous pass than * it is for traces already laid down in this pass. */ #define CONFLICT_LEVEL(rb)\ @@ -204,7 +204,7 @@ * because these are not actually in the allowed box. * * All routeboxes *except* EXPANSION_AREAS now have their "box" bloated by - * their particular required keepaway. This simplifies the tree searching. + * their particular required clearance. This simplifies the tree searching. * the "sbox" contains the unbloated box. */ /* --------------------------------------------------------------------------- @@ -261,7 +261,7 @@ * instead of from upper-left to bottom-right. */ unsigned bl_to_ur:1; /* mark polygons which are "transparent" for via-placement; that is, - * vias through the polygon will automatically be given a keepaway + * vias through the polygon will automatically be given a clearance * and will not electrically connect to the polygon. */ unsigned clear_poly:1; /* this marks "conflicting" routes that must be torn up to obtain @@ -307,8 +307,8 @@ RouteStyleType defaultstyle; /* style structures */ RouteStyleType *styles[NUM_STYLES + 1]; - /* what is the maximum bloat (keepaway+line half-width or - * keepaway+via_radius) for any style we've seen? */ + /* what is the maximum bloat (clearance+line half-width or + * clearance+via_radius) for any style we've seen? */ Coord max_bloat; Coord max_keep; mtspace_t *mtspace; @@ -541,15 +541,15 @@ return; } -static void init_const_box(routebox_t * rb, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord keepaway) +static void init_const_box(routebox_t * rb, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord clearance) { BoxType *bp = (BoxType *) & rb->box; /* note discarding const! */ assert(!rb->flags.inited); assert(X1 <= X2 && Y1 <= Y2); - bp->X1 = X1 - keepaway; - bp->Y1 = Y1 - keepaway; - bp->X2 = X2 + keepaway; - bp->Y2 = Y2 + keepaway; + bp->X1 = X1 - clearance; + bp->Y1 = Y1 - clearance; + bp->X2 = X2 + clearance; + bp->Y2 = Y2 + clearance; bp = (BoxType *) & rb->sbox; bp->X1 = X1; bp->Y1 = Y1; @@ -599,7 +599,7 @@ /*X1 */ pin->X - ht, /*Y1 */ pin->Y - ht, /*X2 */ pin->X + ht, - /*Y2 */ pin->Y + ht, style->Keepaway); + /*Y2 */ pin->Y + ht, style->Clearance); /* set aux. properties */ if (is_via) { (*rbpp)->type = VIA; @@ -645,7 +645,7 @@ /*Y1 */ MIN(pad->Point1.Y, pad->Point2.Y) - halfthick, /*X2 */ MAX(pad->Point1.X, pad->Point2.X) + halfthick, /*Y2 */ MAX(pad->Point1.Y, pad->Point2.Y) + halfthick, - style->Keepaway); + style->Clearance); /* kludge for non-manhattan pads (which are not allowed at present) */ if (pad->Point1.X != pad->Point2.X && pad->Point1.Y != pad->Point2.Y) (*rbpp)->flags.nonstraight = 1; @@ -680,7 +680,7 @@ /*X2 */ MAX(line->Point1.X, line->Point2.X) + HALF_THICK(line->Thickness), /*Y2 */ MAX(line->Point1.Y, - line->Point2.Y) + HALF_THICK(line->Thickness), style->Keepaway); + line->Point2.Y) + HALF_THICK(line->Thickness), style->Clearance); /* kludge for non-manhattan lines */ if (line->Point1.X != line->Point2.X && line->Point1.Y != line->Point2.Y) { (*rbpp)->flags.nonstraight = 1; @@ -706,7 +706,7 @@ Coord X2, Coord Y2, Cardinal layergroup, void *parent, RouteStyleType * style) { routebox_t **rbpp; - Coord keep = style->Keepaway; + Coord keep = style->Clearance; assert(layergroupboxes && parent); assert(X1 <= X2 && Y1 <= Y2); assert(0 <= layergroup && layergroup < max_group); @@ -786,7 +786,7 @@ if (rb->flags.nonstraight) return 0; - sb = shrink_box(&rb->box, rb->style->Keepaway); + sb = shrink_box(&rb->box, rb->style->Clearance); if (inf->query.X1 >= sb.X2 || inf->query.X2 <= sb.X1 || inf->query.Y1 >= sb.Y2 || inf->query.Y2 <= sb.Y1) return 0; inf->winner = rb; @@ -896,9 +896,9 @@ rd->defaultstyle.Thick = conf_core.design.line_thickness; rd->defaultstyle.Diameter = conf_core.design.via_thickness; rd->defaultstyle.Hole = conf_core.design.via_drilling_hole; - rd->defaultstyle.Keepaway = conf_core.design.keepaway; + rd->defaultstyle.Clearance = conf_core.design.clearance; rd->max_bloat = BLOAT(&rd->defaultstyle); - rd->max_keep = conf_core.design.keepaway; + rd->max_keep = conf_core.design.clearance; /* create styles structures */ bbox.X1 = bbox.Y1 = 0; bbox.X2 = PCB->MaxWidth; @@ -1013,7 +1013,7 @@ MergeNets(last_in_net, rb, NET); last_in_subnet = last_in_net = rb; rd->max_bloat = MAX(rd->max_bloat, BLOAT(rb->style)); - rd->max_keep = MAX(rd->max_keep, rb->style->Keepaway); + rd->max_keep = MAX(rd->max_keep, rb->style->Clearance); } END_LOOP; } @@ -1130,13 +1130,13 @@ rd->mtspace = mtspace_create(); /* create "empty-space" structures for via placement (now that we know - * appropriate keepaways for all the fixed elements) */ + * appropriate clearances for all the fixed elements) */ for (i = 0; i < max_group; i++) { POINTER_LOOP(&layergroupboxes[i]); { routebox_t *rb = (routebox_t *) * ptr; if (!rb->flags.clear_poly) - mtspace_add(rd->mtspace, &rb->box, FIXED, rb->style->Keepaway); + mtspace_add(rd->mtspace, &rb->box, FIXED, rb->style->Clearance); } END_LOOP; } @@ -1290,7 +1290,7 @@ static BoxType bloat_routebox(routebox_t * rb) { BoxType r; - Coord keepaway; + Coord clearance; assert(__routebox_is_good(rb)); if (rb->flags.nobloat) @@ -1299,8 +1299,8 @@ /* Obstacle exclusion zones get bloated by the larger of * the two required clearances plus half the track width. */ - keepaway = MAX(AutoRouteParameters.style->Keepaway, rb->style->Keepaway); - r = bloat_box(&rb->sbox, keepaway + HALF_THICK(AutoRouteParameters.style->Thick)); + clearance = MAX(AutoRouteParameters.style->Clearance, rb->style->Clearance); + r = bloat_box(&rb->sbox, clearance + HALF_THICK(AutoRouteParameters.style->Thick)); return r; } @@ -1854,11 +1854,11 @@ return 0; /* The inflated box outer edges include its own - * track width plus its own keepaway. + * track width plus its own clearance. * * To check for intersection, we need to expand - * anything with greater keepaway by its excess - * keepaway. + * anything with greater clearance by its excess + * clearance. * * If something has nobloat then we need to shrink * the inflated box back and see if it still touches. @@ -1872,8 +1872,8 @@ return 0; /* doesn't touch */ } else { - if (rb->style->Keepaway > res->keep) - rbox = bloat_box(&rb->sbox, rb->style->Keepaway - res->keep); + if (rb->style->Clearance > res->keep) + rbox = bloat_box(&rb->sbox, rb->style->Clearance - res->keep); else rbox = rb->sbox; @@ -1944,8 +1944,8 @@ static bool boink_box(routebox_t * rb, struct E_result *res, direction_t dir) { Coord bloat; - if (rb->style->Keepaway > res->keep) - bloat = res->keep - rb->style->Keepaway; + if (rb->style->Clearance > res->keep) + bloat = res->keep - rb->style->Clearance; else bloat = 0; if (rb->flags.nobloat) @@ -1970,7 +1970,7 @@ /* main Expand routine. * - * The expansion probe edge includes the keepaway and half thickness + * The expansion probe edge includes the clearance and half thickness * as the search is performed in order to see everything relevant. * The result is backed off by this amount before being returned. * Targets (and other no-bloat routeboxes) go all the way to touching. @@ -1977,9 +1977,9 @@ * This is accomplished by backing off the probe edge when checking * for touch against such an object. Usually the expanding edge * bumps into neighboring pins on the same device that require a - * keepaway, preventing seeing a target immediately. Rather than await + * clearance, preventing seeing a target immediately. Rather than await * another expansion to actually touch the target, the edge breaker code - * looks past the keepaway to see these targets even though they + * looks past the clearance to see these targets even though they * weren't actually touched in the expansion. */ struct E_result *Expand(rtree_t * rtree, edge_t * e, const BoxType * box) @@ -1994,7 +1994,7 @@ /* the inflated box must be bloated in all directions that it might * hit something in order to guarantee that we see object in the * tree it might hit. The tree holds objects bloated by their own - * keepaway so we are guaranteed to honor that. + * clearance so we are guaranteed to honor that. */ switch (e->expand_dir) { case ALL: @@ -2081,7 +2081,7 @@ noshrink = ans.done = 0; assert(0); } - ans.keep = e->rb->style->Keepaway; + ans.keep = e->rb->style->Clearance; ans.parent = nonhomeless_parent(e->rb); r_search(rtree, &ans.inflated, NULL, __Expand_this_rect, &ans); /* because the overlaping boxes are found in random order, some blockers @@ -2127,8 +2127,8 @@ static int blocker_to_heap(heap_t * heap, routebox_t * rb, BoxType * box, direction_t dir) { BoxType b = rb->sbox; - if (rb->style->Keepaway > AutoRouteParameters.style->Keepaway) - b = bloat_box(&b, rb->style->Keepaway - AutoRouteParameters.style->Keepaway); + if (rb->style->Clearance > AutoRouteParameters.style->Clearance) + b = bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); b = clip_box(&b, box); assert(box_is_good(&b)); /* we want to look at the blockers clockwise around the box */ @@ -2388,8 +2388,8 @@ if (rb->flags.source && bi->ignore_source) return 0; b = rb->sbox; - if (rb->style->Keepaway > AutoRouteParameters.style->Keepaway) - b = bloat_box(&b, rb->style->Keepaway - AutoRouteParameters.style->Keepaway); + if (rb->style->Clearance > AutoRouteParameters.style->Clearance) + b = bloat_box(&b, rb->style->Clearance - AutoRouteParameters.style->Clearance); if (b.X2 <= bi->box.X1 || b.X1 >= bi->box.X2 || b.Y1 >= bi->box.Y2 || b.Y2 <= bi->box.Y1) return 0; return blocker_to_heap(bi->heap, rb, &bi->box, bi->dir); @@ -2839,12 +2839,12 @@ { routebox_t *rb, *first_via = NULL; int i; - int ka = AutoRouteParameters.style->Keepaway; + int ka = AutoRouteParameters.style->Clearance; PinType *live_via = NULL; if (conf_core.editor.live_routing) { live_via = CreateNewVia(PCB->Data, X, Y, radius * 2, - 2 * AutoRouteParameters.style->Keepaway, 0, AutoRouteParameters.style->Hole, NULL, MakeFlags(0)); + 2 * AutoRouteParameters.style->Clearance, 0, AutoRouteParameters.style->Hole, NULL, MakeFlags(0)); if (live_via != NULL) DrawVia(live_via); } @@ -2871,7 +2871,7 @@ rb->parent.via = NULL; /* indicates that not on PCB yet */ first_via = rb; /* only add the first via to mtspace, not the shadows too */ - mtspace_add(rd->mtspace, &rb->box, rb->flags.is_odd ? ODD : EVEN, rb->style->Keepaway); + mtspace_add(rd->mtspace, &rb->box, rb->flags.is_odd ? ODD : EVEN, rb->style->Clearance); } else { rb->type = VIA_SHADOW; @@ -2906,7 +2906,7 @@ static routebox_t *qsn; routebox_t *rb; - Coord ka = AutoRouteParameters.style->Keepaway; + Coord ka = AutoRouteParameters.style->Clearance; /* don't draw zero-length segments. */ if (X1 == X2 && Y1 == Y2) @@ -2980,7 +2980,7 @@ /* and to the via space structures */ if (AutoRouteParameters.use_vias) - mtspace_add(rd->mtspace, &rb->box, rb->flags.is_odd ? ODD : EVEN, rb->style->Keepaway); + mtspace_add(rd->mtspace, &rb->box, rb->flags.is_odd ? ODD : EVEN, rb->style->Clearance); usedGroup[rb->group] = true; /* and queue this one */ qX1 = X1; @@ -3056,26 +3056,26 @@ static void add_clearance(CheapPointType * nextpoint, const BoxType * b) { if (nextpoint->X == b->X1) { - if (nextpoint->X + AutoRouteParameters.style->Keepaway < (b->X1 + b->X2) / 2) - nextpoint->X += AutoRouteParameters.style->Keepaway; + if (nextpoint->X + AutoRouteParameters.style->Clearance < (b->X1 + b->X2) / 2) + nextpoint->X += AutoRouteParameters.style->Clearance; else nextpoint->X = (b->X1 + b->X2) / 2; } else if (nextpoint->X == b->X2) { - if (nextpoint->X - AutoRouteParameters.style->Keepaway > (b->X1 + b->X2) / 2) - nextpoint->X -= AutoRouteParameters.style->Keepaway; + if (nextpoint->X - AutoRouteParameters.style->Clearance > (b->X1 + b->X2) / 2) + nextpoint->X -= AutoRouteParameters.style->Clearance; else nextpoint->X = (b->X1 + b->X2) / 2; } else if (nextpoint->Y == b->Y1) { - if (nextpoint->Y + AutoRouteParameters.style->Keepaway < (b->Y1 + b->Y2) / 2) - nextpoint->Y += AutoRouteParameters.style->Keepaway; + if (nextpoint->Y + AutoRouteParameters.style->Clearance < (b->Y1 + b->Y2) / 2) + nextpoint->Y += AutoRouteParameters.style->Clearance; else nextpoint->Y = (b->Y1 + b->Y2) / 2; } else if (nextpoint->Y == b->Y2) { - if (nextpoint->Y - AutoRouteParameters.style->Keepaway > (b->Y1 + b->Y2) / 2) - nextpoint->Y -= AutoRouteParameters.style->Keepaway; + if (nextpoint->Y - AutoRouteParameters.style->Clearance > (b->Y1 + b->Y2) / 2) + nextpoint->Y -= AutoRouteParameters.style->Clearance; else nextpoint->Y = (b->Y1 + b->Y2) / 2; } @@ -3336,19 +3336,19 @@ mtspace_t * mtspace, routebox_t * within, conflict_t within_conflict_level, edge_t * parent_edge, rtree_t * targets, Coord shrink, bool in_plane) { - Coord radius, keepaway; + Coord radius, clearance; vetting_t *work; BoxType region = shrink_routebox(within); shrink_box(®ion, shrink); radius = HALF_THICK(AutoRouteParameters.style->Diameter); - keepaway = AutoRouteParameters.style->Keepaway; + clearance = AutoRouteParameters.style->Clearance; assert(AutoRouteParameters.use_vias); /* XXX: need to clip 'within' to shrunk_pcb_bounds, because when XXX: routing with conflicts may poke over edge. */ /* ask for a via box near our cost_point first */ - work = mtspace_query_rect(mtspace, ®ion, radius, keepaway, + work = mtspace_query_rect(mtspace, ®ion, radius, clearance, NULL, vss->free_space_vec, vss->lo_conflict_space_vec, vss->hi_conflict_space_vec, @@ -3363,13 +3363,13 @@ struct routeone_via_site_state *vss, mtspace_t * mtspace, rtree_t * targets) { int i, j, count = 0; - Coord radius, keepaway; + Coord radius, clearance; vetting_t *work; routebox_t *within; conflict_t within_conflict_level; radius = HALF_THICK(AutoRouteParameters.style->Diameter); - keepaway = AutoRouteParameters.style->Keepaway; + clearance = AutoRouteParameters.style->Clearance; work = mtspace_query_rect(mtspace, NULL, 0, 0, search->work, vss->free_space_vec, vss->lo_conflict_space_vec, @@ -3388,8 +3388,8 @@ free(area); continue; } - /* answers are bloated by radius + keepaway */ - cliparea = shrink_box(area, radius + keepaway); + /* answers are bloated by radius + clearance */ + cliparea = shrink_box(area, radius + clearance); close_box(&cliparea); free(area); assert(box_is_good(&cliparea)); @@ -3546,7 +3546,7 @@ assert(rd && from); result.route_had_conflicts = 0; - /* no targets on to/from net need keepaway areas */ + /* no targets on to/from net need clearance areas */ LIST_LOOP(from, same_net, p); p->flags.nobloat = 1; END_LOOP; @@ -4011,7 +4011,7 @@ int i; /* routing style */ AutoRouteParameters.style = style; - AutoRouteParameters.bloat = style->Keepaway + HALF_THICK(style->Thick); + AutoRouteParameters.bloat = style->Clearance + HALF_THICK(style->Thick); /* costs */ AutoRouteParameters.ViaCost = INCH_TO_COORD(3.5) + style->Diameter * (is_smoothing ? 80 : 30); AutoRouteParameters.LastConflictPenalty = (400 * pass / passes + 2) / (pass + 1); @@ -4195,9 +4195,9 @@ RemoveFromNet(p, SUBNET); } if (AutoRouteParameters.use_vias && p->type != VIA_SHADOW && p->type != PLANE) { - mtspace_remove(rd->mtspace, &p->box, p->flags.is_odd ? ODD : EVEN, p->style->Keepaway); + mtspace_remove(rd->mtspace, &p->box, p->flags.is_odd ? ODD : EVEN, p->style->Clearance); if (!rip) - mtspace_add(rd->mtspace, &p->box, p->flags.is_odd ? EVEN : ODD, p->style->Keepaway); + mtspace_add(rd->mtspace, &p->box, p->flags.is_odd ? EVEN : ODD, p->style->Clearance); } if (rip) { if (conf_core.editor.live_routing) @@ -4457,7 +4457,7 @@ /* using CreateDrawn instead of CreateNew concatenates sequential lines */ p->parent.line = CreateDrawnLineOnLayer (layer, b.X1, b.Y1, b.X2, b.Y2, - p->style->Thick, p->style->Keepaway * 2, MakeFlags(AUTOFLAG | (conf_core.editor.clear_line ? CLEARLINEFLAG : 0))); + p->style->Thick, p->style->Clearance * 2, MakeFlags(AUTOFLAG | (conf_core.editor.clear_line ? CLEARLINEFLAG : 0))); if (p->parent.line) { AddObjectToCreateUndoList(LINE_TYPE, layer, p->parent.line, p->parent.line); @@ -4476,7 +4476,7 @@ pp->parent.via = CreateNewVia(PCB->Data, b.X1 + radius, b.Y1 + radius, - pp->style->Diameter, 2 * pp->style->Keepaway, 0, pp->style->Hole, NULL, MakeFlags(AUTOFLAG)); + pp->style->Diameter, 2 * pp->style->Clearance, 0, pp->style->Hole, NULL, MakeFlags(AUTOFLAG)); assert(pp->parent.via); if (pp->parent.via) { AddObjectToCreateUndoList(VIA_TYPE, pp->parent.via, pp->parent.via, pp->parent.via); @@ -4539,7 +4539,7 @@ for (i = 0; i < NUM_STYLES; i++) { if (PCB->RouteStyle[i].Thick == 0 || - PCB->RouteStyle[1].Diameter == 0 || PCB->RouteStyle[1].Hole == 0 || PCB->RouteStyle[i].Keepaway == 0) { + PCB->RouteStyle[1].Diameter == 0 || PCB->RouteStyle[1].Hole == 0 || PCB->RouteStyle[i].Clearance == 0) { Message("You must define proper routing styles\n" "before auto-routing.\n"); return (false); } Index: trunk/src_plugins/autoroute/mtspace.c =================================================================== --- trunk/src_plugins/autoroute/mtspace.c (revision 2029) +++ trunk/src_plugins/autoroute/mtspace.c (revision 2030) @@ -60,7 +60,7 @@ typedef struct mtspacebox { const BoxType box; - Coord keepaway; /* the smallest keepaway around this box */ + Coord clearance; /* the smallest clearance around this box */ } mtspacebox_t; /* this is an mtspace_t */ @@ -82,20 +82,20 @@ heap_or_vector no_hi; heap_or_vector hi_candidate; Coord radius; - Coord keepaway; + Coord clearance; CheapPointType desired; }; #define SPECIAL 823157 -mtspacebox_t *mtspace_create_box(const BoxType * box, Coord keepaway) +mtspacebox_t *mtspace_create_box(const BoxType * box, Coord clearance) { mtspacebox_t *mtsb; assert(box_is_good(box)); mtsb = (mtspacebox_t *) malloc(sizeof(*mtsb)); - /* the box was sent to us pre-bloated by the keepaway amount */ + /* the box was sent to us pre-bloated by the clearance amount */ *((BoxTypePtr) & mtsb->box) = *box; - mtsb->keepaway = keepaway; + mtsb->clearance = clearance; assert(box_is_good(&mtsb->box)); return mtsb; } @@ -126,7 +126,7 @@ } struct mts_info { - Coord keepaway; + Coord clearance; BoxType box; rtree_t *tree; jmp_buf env; @@ -140,7 +140,7 @@ /* there can be duplicate boxes, we just remove one */ /* the info box is pre-bloated, so just check equality */ if (b->X1 == info->box.X1 && b->X2 == info->box.X2 && - b->Y1 == info->box.Y1 && b->Y2 == info->box.Y2 && box->keepaway == info->keepaway) { + b->Y1 == info->box.Y1 && b->Y2 == info->box.Y2 && box->clearance == info->clearance) { r_delete_entry(info->tree, b); longjmp(info->env, 1); } @@ -160,19 +160,19 @@ } /* add a space-filler to the empty space representation. */ -void mtspace_add(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord keepaway) +void mtspace_add(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord clearance) { - mtspacebox_t *filler = mtspace_create_box(box, keepaway); + mtspacebox_t *filler = mtspace_create_box(box, clearance); r_insert_entry(which_tree(mtspace, which), (const BoxType *) filler, 1); } /* remove a space-filler from the empty space representation. */ -void mtspace_remove(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord keepaway) +void mtspace_remove(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord clearance) { struct mts_info cl; BoxType small_search; - cl.keepaway = keepaway; + cl.clearance = clearance; cl.box = *box; cl.tree = which_tree(mtspace, which); small_search = box_center(box); @@ -187,7 +187,7 @@ heap_or_vector checking; heap_or_vector touching; CheapPointType *desired; - Coord radius, keepaway; + Coord radius, clearance; jmp_buf env; bool touch_is_vec; }; @@ -218,11 +218,11 @@ mtspacebox_t *mtsb = (mtspacebox_t *) box; Coord shrink; assert(box_intersect(qc->cbox, &mtsb->box)); - /* we need to satisfy the larger of the two keepaways */ - if (qc->keepaway > mtsb->keepaway) - shrink = mtsb->keepaway; + /* we need to satisfy the larger of the two clearances */ + if (qc->clearance > mtsb->clearance) + shrink = mtsb->clearance; else - shrink = qc->keepaway; + shrink = qc->clearance; /* if we shrink qc->box by this amount and it doesn't intersect * then we didn't actually touch this box */ if (qc->cbox->X1 + shrink >= mtsb->box.X2 || @@ -232,7 +232,7 @@ if (mtsb->box.Y1 > qc->cbox->Y1 + shrink) { /* top region exists */ Coord Y1 = qc->cbox->Y1; Coord Y2 = mtsb->box.Y1 + shrink; - if (Y2 - Y1 >= 2 * (qc->radius + qc->keepaway)) { + if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { BoxType *newone = (BoxType *) malloc(sizeof(BoxType)); newone->X1 = qc->cbox->X1; newone->X2 = qc->cbox->X2; @@ -245,7 +245,7 @@ if (mtsb->box.Y2 < qc->cbox->Y2 - shrink) { /* bottom region exists */ Coord Y1 = mtsb->box.Y2 - shrink; Coord Y2 = qc->cbox->Y2; - if (Y2 - Y1 >= 2 * (qc->radius + qc->keepaway)) { + if (Y2 - Y1 >= 2 * (qc->radius + qc->clearance)) { BoxType *newone = (BoxType *) malloc(sizeof(BoxType)); newone->X1 = qc->cbox->X1; newone->X2 = qc->cbox->X2; @@ -258,7 +258,7 @@ if (mtsb->box.X1 > qc->cbox->X1 + shrink) { /* left region exists */ Coord X1 = qc->cbox->X1; Coord X2 = mtsb->box.X1 + shrink; - if (X2 - X1 >= 2 * (qc->radius + qc->keepaway)) { + if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { BoxType *newone; newone = (BoxType *) malloc(sizeof(BoxType)); newone->Y1 = qc->cbox->Y1; @@ -272,7 +272,7 @@ if (mtsb->box.X2 < qc->cbox->X2 - shrink) { /* right region exists */ Coord X1 = mtsb->box.X2 - shrink; Coord X2 = qc->cbox->X2; - if (X2 - X1 >= 2 * (qc->radius + qc->keepaway)) { + if (X2 - X1 >= 2 * (qc->radius + qc->clearance)) { BoxType *newone = (BoxType *) malloc(sizeof(BoxType)); newone->Y1 = qc->cbox->Y1; newone->Y2 = qc->cbox->Y2; @@ -366,7 +366,7 @@ /* returns some empty spaces in 'region' (or former narrowed regions) - * that may hold a feature with the specified radius and keepaway + * that may hold a feature with the specified radius and clearance * It tries first to find Completely empty regions (which are appended * to the free_space_vec vector). If that fails, it looks for regions * filled only by objects generated by the previous pass (which are @@ -381,7 +381,7 @@ * necessary. */ vetting_t *mtspace_query_rect(mtspace_t * mtspace, const BoxType * region, - Coord radius, Coord keepaway, + Coord radius, Coord clearance, vetting_t * work, vector_t * free_space_vec, vector_t * lo_conflict_space_vec, @@ -402,10 +402,10 @@ assert(vector_is_empty(lo_conflict_space_vec)); assert(vector_is_empty(hi_conflict_space_vec)); work = (vetting_t *) malloc(sizeof(vetting_t)); - work->keepaway = keepaway; + work->clearance = clearance; work->radius = radius; cbox = (BoxType *) malloc(sizeof(BoxType)); - *cbox = bloat_box(region, keepaway + radius); + *cbox = bloat_box(region, clearance + radius); if (desired) { work->untested.h = heap_create(); work->no_fix.h = heap_create(); @@ -426,7 +426,7 @@ } return work; } - qc.keepaway = work->keepaway; + qc.clearance = work->clearance; qc.radius = work->radius; if (work->desired.X == -SPECIAL && work->desired.Y == -SPECIAL) qc.desired = NULL; Index: trunk/src_plugins/autoroute/mtspace.h =================================================================== --- trunk/src_plugins/autoroute/mtspace.h (revision 2029) +++ trunk/src_plugins/autoroute/mtspace.h (revision 2030) @@ -56,18 +56,18 @@ /* add a space-filler to the empty space representation. The given box * should *not* be bloated; it should be "true". The feature will fill - * *at least* a radius of keepaway around it; + * *at least* a radius of clearance around it; */ -void mtspace_add(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord keepaway); +void mtspace_add(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord clearance); /* remove a space-filler from the empty space representation. The given box * should *not* be bloated; it should be "true". The feature will fill - * *at least* a radius of keepaway around it; + * *at least* a radius of clearance around it; */ -void mtspace_remove(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord keepaway); +void mtspace_remove(mtspace_t * mtspace, const BoxType * box, mtspace_type_t which, Coord clearance); vetting_t *mtspace_query_rect(mtspace_t * mtspace, const BoxType * region, - Coord radius, Coord keepaway, + Coord radius, Coord clearance, vetting_t * work, vector_t * free_space_vec, vector_t * lo_conflict_space_vec, Index: trunk/src_plugins/hid_gtk/ghid-route-style-selector.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-route-style-selector.c (revision 2029) +++ trunk/src_plugins/hid_gtk/ghid-route-style-selector.c (revision 2030) @@ -118,7 +118,7 @@ ghid_coord_entry_set_value(GHID_COORD_ENTRY(dialog->line_entry), style->rst->Thick); ghid_coord_entry_set_value(GHID_COORD_ENTRY(dialog->via_hole_entry), style->rst->Hole); ghid_coord_entry_set_value(GHID_COORD_ENTRY(dialog->via_size_entry), style->rst->Diameter); - ghid_coord_entry_set_value(GHID_COORD_ENTRY(dialog->clearance_entry), style->rst->Keepaway); + ghid_coord_entry_set_value(GHID_COORD_ENTRY(dialog->clearance_entry), style->rst->Clearance); } @@ -219,7 +219,7 @@ rst->Thick = ghid_coord_entry_get_value(GHID_COORD_ENTRY(dialog_data.line_entry)); rst->Hole = ghid_coord_entry_get_value(GHID_COORD_ENTRY(dialog_data.via_hole_entry)); rst->Diameter = ghid_coord_entry_get_value(GHID_COORD_ENTRY(dialog_data.via_size_entry)); - rst->Keepaway = ghid_coord_entry_get_value(GHID_COORD_ENTRY(dialog_data.clearance_entry)); + rst->Clearance = ghid_coord_entry_get_value(GHID_COORD_ENTRY(dialog_data.clearance_entry)); save = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check_box)); if (style == NULL) @@ -486,9 +486,9 @@ * \param [in] Thick Coord to match selection to * \param [in] Hole Coord to match selection to * \param [in] Diameter Coord to match selection to - * \param [in] Keepaway Coord to match selection to + * \param [in] Clearance Coord to match selection to */ -void ghid_route_style_selector_sync(GHidRouteStyleSelector * rss, Coord Thick, Coord Hole, Coord Diameter, Coord Keepaway) +void ghid_route_style_selector_sync(GHidRouteStyleSelector * rss, Coord Thick, Coord Hole, Coord Diameter, Coord Clearance) { GtkTreeIter iter; gtk_tree_model_get_iter_first(GTK_TREE_MODEL(rss->model), &iter); @@ -496,7 +496,7 @@ struct _route_style *style; gtk_tree_model_get(GTK_TREE_MODEL(rss->model), &iter, DATA_COL, &style, -1); if (style->rst->Thick == Thick && - style->rst->Hole == Hole && style->rst->Diameter == Diameter && style->rst->Keepaway == Keepaway) { + style->rst->Hole == Hole && style->rst->Diameter == Diameter && style->rst->Clearance == Clearance) { g_signal_handler_block(G_OBJECT(style->action), style->sig_id); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(style->action), TRUE); g_signal_handler_unblock(G_OBJECT(style->action), style->sig_id); Index: trunk/src_plugins/hid_gtk/ghid-route-style-selector.h =================================================================== --- trunk/src_plugins/hid_gtk/ghid-route-style-selector.h (revision 2029) +++ trunk/src_plugins/hid_gtk/ghid-route-style-selector.h (revision 2030) @@ -27,7 +27,7 @@ GtkAccelGroup *ghid_route_style_selector_get_accel_group(GHidRouteStyleSelector * rss); -void ghid_route_style_selector_sync(GHidRouteStyleSelector * rss, Coord Thick, Coord Hole, Coord Diameter, Coord Keepaway); +void ghid_route_style_selector_sync(GHidRouteStyleSelector * rss, Coord Thick, Coord Hole, Coord Diameter, Coord Clearance); void ghid_route_style_selector_empty(GHidRouteStyleSelector * rss); G_END_DECLS /* keep c++ happy */ Index: trunk/src_plugins/hid_gtk/gtkhid-main.c =================================================================== --- trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 2029) +++ trunk/src_plugins/hid_gtk/gtkhid-main.c (revision 2030) @@ -1027,7 +1027,7 @@ ghid_route_style_selector_sync (GHID_ROUTE_STYLE_SELECTOR(ghidgui->route_style_selector), - conf_core.design.line_thickness, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.keepaway); + conf_core.design.line_thickness, conf_core.design.via_drilling_hole, conf_core.design.via_thickness, conf_core.design.clearance); return 0; } Index: trunk/src_plugins/hid_gtk/gui-misc.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-misc.c (revision 2029) +++ trunk/src_plugins/hid_gtk/gui-misc.c (revision 2030) @@ -382,7 +382,7 @@ conf_core.design.via_thickness, conf_core.design.via_drilling_hole, conf_hid_gtk.plugins.hid_gtk.compact_horizontal ? "\n" : "", - conf_core.design.keepaway, + conf_core.design.clearance, conf_core.design.text_scale, conf_core.editor.buffer_number + 1); ghid_status_line_set_text(text); Index: trunk/src_plugins/hid_lesstif/main.c =================================================================== --- trunk/src_plugins/hid_lesstif/main.c (revision 2029) +++ trunk/src_plugins/hid_lesstif/main.c (revision 2030) @@ -2307,15 +2307,15 @@ switch (conf_core.editor.mode) { case VIA_MODE: - buf = pcb_strdup_printf("%m+%.2mS/%.2mS \370=%.2mS", UUNIT, conf_core.design.via_thickness, conf_core.design.keepaway, conf_core.design.via_drilling_hole); + buf = pcb_strdup_printf("%m+%.2mS/%.2mS \370=%.2mS", UUNIT, conf_core.design.via_thickness, conf_core.design.clearance, conf_core.design.via_drilling_hole); break; case LINE_MODE: case ARC_MODE: - buf = pcb_strdup_printf("%m+%.2mS/%.2mS %s", UUNIT, conf_core.design.line_thickness, conf_core.design.keepaway, s45); + buf = pcb_strdup_printf("%m+%.2mS/%.2mS %s", UUNIT, conf_core.design.line_thickness, conf_core.design.clearance, s45); break; case RECTANGLE_MODE: case POLYGON_MODE: - buf = pcb_strdup_printf("%m+%.2mS %s", UUNIT, conf_core.design.keepaway, s45); + buf = pcb_strdup_printf("%m+%.2mS %s", UUNIT, conf_core.design.clearance, s45); break; case TEXT_MODE: buf = pcb_strdup_printf("%d %%", conf_core.design.text_scale); Index: trunk/src_plugins/hid_lesstif/styles.c =================================================================== --- trunk/src_plugins/hid_lesstif/styles.c (revision 2029) +++ trunk/src_plugins/hid_lesstif/styles.c (revision 2030) @@ -81,7 +81,7 @@ static int num_style_buttons = 0; static char *value_names[] = { - "Thickness", "Diameter", "Hole", "Keepaway" + "Thickness", "Diameter", "Hole", "Clearance" }; static int RouteStylesChanged(int argc, char **argv, Coord x, Coord y); @@ -103,7 +103,7 @@ update_one_value(SSthick, conf_core.design.line_thickness); update_one_value(SSdiam, conf_core.design.via_thickness); update_one_value(SShole, conf_core.design.via_drilling_hole); - update_one_value(SSkeep, conf_core.design.keepaway); + update_one_value(SSkeep, conf_core.design.clearance); local_update = 0; lesstif_update_status_line(); } @@ -160,7 +160,7 @@ conf_set_design("design/via_drilling_hole", "%s", s);; break; case SSkeep: - conf_set_design("design/keepaway", "%s", s);; + conf_set_design("design/clearance", "%s", s);; break; } update_style_buttons(); @@ -230,7 +230,7 @@ PCB->RouteStyle[i].Thick = conf_core.design.line_thickness; PCB->RouteStyle[i].Diameter = conf_core.design.via_thickness; PCB->RouteStyle[i].Hole = conf_core.design.via_drilling_hole; - PCB->RouteStyle[i].Keepaway = conf_core.design.keepaway; + PCB->RouteStyle[i].Clearance = conf_core.design.clearance; update_style_buttons(); } @@ -246,7 +246,7 @@ SetLineSize(style->Thick); SetViaSize(style->Diameter, true); SetViaDrillingHole(style->Hole, true); - SetKeepawayWidth(style->Keepaway); + SetClearanceWidth(style->Clearance); if (style_dialog) { for (j = 0; j < NUM_STYLES; j++) if (j != i) Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 2029) +++ trunk/src_plugins/io_pcb/file.c (revision 2030) @@ -305,10 +305,10 @@ for (group = 0; group < NUM_STYLES - 1; group++) pcb_fprintf(FP, "%s,%mr,%mr,%mr,%mr:", PCB->RouteStyle[group].Name, PCB->RouteStyle[group].Thick, - PCB->RouteStyle[group].Diameter, PCB->RouteStyle[group].Hole, PCB->RouteStyle[group].Keepaway); + PCB->RouteStyle[group].Diameter, PCB->RouteStyle[group].Hole, PCB->RouteStyle[group].Clearance); pcb_fprintf(FP, "%s,%mr,%mr,%mr,%mr\"]\n\n", PCB->RouteStyle[group].Name, PCB->RouteStyle[group].Thick, - PCB->RouteStyle[group].Diameter, PCB->RouteStyle[group].Hole, PCB->RouteStyle[group].Keepaway); + PCB->RouteStyle[group].Diameter, PCB->RouteStyle[group].Hole, PCB->RouteStyle[group].Clearance); } /* --------------------------------------------------------------------------- Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 2029) +++ trunk/src_plugins/toporouter/toporouter.c (revision 2030) @@ -264,18 +264,18 @@ #endif } -gdouble lookup_keepaway(char *name) +gdouble lookup_clearance(char *name) { if (name) STYLE_LOOP(PCB); { -/* if(!strcmp(style->Name, name)) return style->Keepaway + 1.; */ +/* if(!strcmp(style->Name, name)) return style->Clearance + 1.; */ if (!strcmp(style->Name, name)) - return style->Keepaway; + return style->Clearance; } END_LOOP; -/* return Settings.Keepaway + 1.; */ - return Settings.Keepaway; +/* return Settings.Clearance + 1.; */ + return Settings.Clearance; } gdouble lookup_thickness(char *name) @@ -290,11 +290,11 @@ return Settings.LineThickness; } -static inline gdouble cluster_keepaway(toporouter_cluster_t * cluster) +static inline gdouble cluster_clearance(toporouter_cluster_t * cluster) { if (cluster) - return lookup_keepaway(cluster->netlist->style); - return lookup_keepaway(NULL); + return lookup_clearance(cluster->netlist->style); + return lookup_clearance(NULL); } static inline gdouble cluster_thickness(toporouter_cluster_t * cluster) @@ -348,7 +348,7 @@ cairo_arc(dc->cr, tv->v.p.x * dc->s + MARGIN, tv->v.p.y * dc->s + MARGIN, - (((gdouble) pin->Thickness / 2.0f) + (gdouble) lookup_keepaway(pin->Name)) * dc->s, 0, 2 * M_PI); + (((gdouble) pin->Thickness / 2.0f) + (gdouble) lookup_clearance(pin->Name)) * dc->s, 0, 2 * M_PI); cairo_fill(dc->cr); cairo_set_source_rgba(dc->cr, 1.0f, 0., 0., 0.4f); @@ -363,7 +363,7 @@ cairo_arc(dc->cr, tv->v.p.x * dc->s + MARGIN, tv->v.p.y * dc->s + MARGIN, - (((gdouble) pin->Thickness / 2.0f) + (gdouble) lookup_keepaway(pin->Name)) * dc->s, 0, 2 * M_PI); + (((gdouble) pin->Thickness / 2.0f) + (gdouble) lookup_clearance(pin->Name)) * dc->s, 0, 2 * M_PI); cairo_fill(dc->cr); cairo_set_source_rgba(dc->cr, 0.0f, 0., 1., 0.4f); @@ -636,7 +636,7 @@ return cluster_thickness(box->cluster); } -gdouble vertex_net_keepaway(toporouter_vertex_t * v) +gdouble vertex_net_clearance(toporouter_vertex_t * v) { toporouter_bbox_t *box = vertex_bbox(v); if (!box) { @@ -654,10 +654,10 @@ } -/* if(!box || !box->cluster) return Settings.Keepaway + 1.; */ +/* if(!box || !box->cluster) return Settings.Clearance + 1.; */ if (!box || !box->cluster) - return Settings.Keepaway; - return cluster_keepaway(box->cluster); + return Settings.Clearance; + return cluster_clearance(box->cluster); } /* @@ -900,20 +900,20 @@ static inline gdouble min_spacing(toporouter_vertex_t * v1, toporouter_vertex_t * v2) { - gdouble v1halfthick, v2halfthick, v1keepaway, v2keepaway, ms; + gdouble v1halfthick, v2halfthick, v1clearance, v2clearance, ms; /* toporouter_edge_t *e = v1->routingedge;*/ v1halfthick = vertex_net_thickness(TOPOROUTER_VERTEX(v1)) / 2.; v2halfthick = vertex_net_thickness(TOPOROUTER_VERTEX(v2)) / 2.; - v1keepaway = vertex_net_keepaway(TOPOROUTER_VERTEX(v1)); - v2keepaway = vertex_net_keepaway(TOPOROUTER_VERTEX(v2)); + v1clearance = vertex_net_clearance(TOPOROUTER_VERTEX(v1)); + v2clearance = vertex_net_clearance(TOPOROUTER_VERTEX(v2)); - ms = v1halfthick + v2halfthick + MAX(v1keepaway, v2keepaway); + ms = v1halfthick + v2halfthick + MAX(v1clearance, v2clearance); #ifdef SPACING_DEBUG - printf("v1halfthick = %f v2halfthick = %f v1keepaway = %f v2keepaway = %f ms = %f\n", - v1halfthick, v2halfthick, v1keepaway, v2keepaway, ms); + printf("v1halfthick = %f v2halfthick = %f v1clearance = %f v2clearance = %f ms = %f\n", + v1halfthick, v2halfthick, v1clearance, v2clearance, ms); #endif return ms; @@ -923,15 +923,15 @@ static inline gdouble min_vertex_net_spacing(toporouter_vertex_t * v1, toporouter_vertex_t * v2) { - gdouble v1halfthick, v2halfthick, v1keepaway, v2keepaway, ms; + gdouble v1halfthick, v2halfthick, v1clearance, v2clearance, ms; v1halfthick = vertex_net_thickness(TOPOROUTER_VERTEX(v1)) / 2.; v2halfthick = cluster_thickness(vertex_bbox(v2)->cluster) / 2.; - v1keepaway = vertex_net_keepaway(TOPOROUTER_VERTEX(v1)); - v2keepaway = cluster_keepaway(vertex_bbox(v2)->cluster); + v1clearance = vertex_net_clearance(TOPOROUTER_VERTEX(v1)); + v2clearance = cluster_clearance(vertex_bbox(v2)->cluster); - ms = v1halfthick + v2halfthick + MAX(v1keepaway, v2keepaway); + ms = v1halfthick + v2halfthick + MAX(v1clearance, v2clearance); return ms; } @@ -939,15 +939,15 @@ static inline gdouble min_oproute_vertex_spacing(toporouter_oproute_t * oproute, toporouter_vertex_t * v2) { - gdouble v1halfthick, v2halfthick, v1keepaway, v2keepaway, ms; + gdouble v1halfthick, v2halfthick, v1clearance, v2clearance, ms; v1halfthick = lookup_thickness(oproute->style) / 2.; v2halfthick = vertex_net_thickness(v2) / 2.; - v1keepaway = lookup_keepaway(oproute->style); - v2keepaway = vertex_net_keepaway(v2); + v1clearance = lookup_clearance(oproute->style); + v2clearance = vertex_net_clearance(v2); - ms = v1halfthick + v2halfthick + MAX(v1keepaway, v2keepaway); + ms = v1halfthick + v2halfthick + MAX(v1clearance, v2clearance); return ms; } @@ -955,15 +955,15 @@ gdouble min_oproute_net_spacing(toporouter_oproute_t * oproute, toporouter_vertex_t * v2) { - gdouble v1halfthick, v2halfthick, v1keepaway, v2keepaway, ms; + gdouble v1halfthick, v2halfthick, v1clearance, v2clearance, ms; v1halfthick = lookup_thickness(oproute->style) / 2.; v2halfthick = cluster_thickness(v2->route->src) / 2.; - v1keepaway = lookup_keepaway(oproute->style); - v2keepaway = cluster_keepaway(v2->route->src); + v1clearance = lookup_clearance(oproute->style); + v2clearance = cluster_clearance(v2->route->src); - ms = v1halfthick + v2halfthick + MAX(v1keepaway, v2keepaway); + ms = v1halfthick + v2halfthick + MAX(v1clearance, v2clearance); return ms; } @@ -971,15 +971,15 @@ gdouble min_net_net_spacing(toporouter_vertex_t * v1, toporouter_vertex_t * v2) { - gdouble v1halfthick, v2halfthick, v1keepaway, v2keepaway, ms; + gdouble v1halfthick, v2halfthick, v1clearance, v2clearance, ms; v1halfthick = cluster_thickness(v1->route->src) / 2.; v2halfthick = cluster_thickness(v2->route->src) / 2.; - v1keepaway = cluster_keepaway(v1->route->src); - v2keepaway = cluster_keepaway(v2->route->src); + v1clearance = cluster_clearance(v1->route->src); + v2clearance = cluster_clearance(v2->route->src); - ms = v1halfthick + v2halfthick + MAX(v1keepaway, v2keepaway); + ms = v1halfthick + v2halfthick + MAX(v1clearance, v2clearance); return ms; } @@ -1755,12 +1755,12 @@ static inline gdouble pad_rad(PadType * pad) { - return (lookup_thickness(pad->Name) / 2.) + lookup_keepaway(pad->Name); + return (lookup_thickness(pad->Name) / 2.) + lookup_clearance(pad->Name); } static inline gdouble pin_rad(PinType * pin) { - return (lookup_thickness(pin->Name) / 2.) + lookup_keepaway(pin->Name); + return (lookup_thickness(pin->Name) / 2.) + lookup_clearance(pin->Name); } GList *rect_with_attachments(gdouble rad, @@ -3492,11 +3492,11 @@ toporouter_bbox_t *box = vertex_bbox(TOPOROUTER_VERTEX(edge_v1(op_edge))); r += vertex_net_thickness(v) / 2.; if (box) { - r += MAX(vertex_net_keepaway(v), cluster_keepaway(box->cluster)); + r += MAX(vertex_net_clearance(v), cluster_clearance(box->cluster)); r += cluster_thickness(box->cluster) / 2.; } else { - r += vertex_net_keepaway(v); + r += vertex_net_clearance(v); } } @@ -5531,12 +5531,12 @@ printf("\n"); } -gdouble export_pcb_drawline(guint layer, guint x0, guint y0, guint x1, guint y1, guint thickness, guint keepaway) +gdouble export_pcb_drawline(guint layer, guint x0, guint y0, guint x1, guint y1, guint thickness, guint clearance) { gdouble d = 0.; LineTypePtr line; line = CreateDrawnLineOnLayer(LAYER_PTR(layer), x0, y0, x1, y1, - thickness, keepaway, MakeFlags(AUTOFLAG | (TEST_FLAG(CLEARNEWFLAG, PCB) ? CLEARLINEFLAG : 0))); + thickness, clearance, MakeFlags(AUTOFLAG | (TEST_FLAG(CLEARNEWFLAG, PCB) ? CLEARLINEFLAG : 0))); if (line) { AddObjectToCreateUndoList(LINE_TYPE, LAYER_PTR(layer), line, line); @@ -5557,7 +5557,7 @@ return fabs(acos(((x0 * x1) + (y0 * y1)) / (sqrt(pow(x0, 2) + pow(y0, 2)) * sqrt(pow(x1, 2) + pow(y1, 2))))); } -gdouble export_pcb_drawarc(guint layer, toporouter_arc_t * a, guint thickness, guint keepaway) +gdouble export_pcb_drawarc(guint layer, toporouter_arc_t * a, guint thickness, guint clearance) { gdouble sa, da, theta; gdouble d = 0.; @@ -5584,7 +5584,7 @@ return 0.; arc = CreateNewArcOnLayer(LAYER_PTR(layer), vx(a->centre), vy(a->centre), a->r, a->r, - sa, da, thickness, keepaway, + sa, da, thickness, clearance, MakeFlags(AUTOFLAG | (TEST_FLAG(CLEARNEWFLAG, PCB) ? CLEARLINEFLAG : 0))); if (arc) { @@ -5921,7 +5921,7 @@ { guint layer = PCB->LayerGroups.Entries[oproute->layergroup][0]; guint thickness = lookup_thickness(oproute->style); - guint keepaway = lookup_keepaway(oproute->style); + guint clearance = lookup_clearance(oproute->style); GList *arcs = oproute->arcs; toporouter_arc_t *arc, *parc = NULL; @@ -5928,7 +5928,7 @@ if (!arcs) { ar->wiring_score += export_pcb_drawline(layer, vx(oproute->term1), vy(oproute->term1), vx(oproute->term2), vy(oproute->term2), thickness, - keepaway); + clearance); return; } @@ -5939,19 +5939,19 @@ arc = TOPOROUTER_ARC(arcs->data); if (parc && arc) { - ar->wiring_score += export_pcb_drawarc(layer, parc, thickness, keepaway); - ar->wiring_score += export_pcb_drawline(layer, parc->x1, parc->y1, arc->x0, arc->y0, thickness, keepaway); + ar->wiring_score += export_pcb_drawarc(layer, parc, thickness, clearance); + ar->wiring_score += export_pcb_drawline(layer, parc->x1, parc->y1, arc->x0, arc->y0, thickness, clearance); } else if (!parc) { ar->wiring_score += - export_pcb_drawline(layer, vx(oproute->term1), vy(oproute->term1), arc->x0, arc->y0, thickness, keepaway); + export_pcb_drawline(layer, vx(oproute->term1), vy(oproute->term1), arc->x0, arc->y0, thickness, clearance); } parc = arc; arcs = arcs->next; } - ar->wiring_score += export_pcb_drawarc(layer, arc, thickness, keepaway); - ar->wiring_score += export_pcb_drawline(layer, arc->x1, arc->y1, vx(oproute->term2), vy(oproute->term2), thickness, keepaway); + ar->wiring_score += export_pcb_drawarc(layer, arc, thickness, clearance); + ar->wiring_score += export_pcb_drawline(layer, arc->x1, arc->y1, vx(oproute->term2), vy(oproute->term2), thickness, clearance); } @@ -6042,8 +6042,8 @@ gdouble oproute_min_spacing(toporouter_oproute_t * a, toporouter_oproute_t * b) { - return lookup_thickness(a->style) / 2. + lookup_thickness(b->style) / 2. + MAX(lookup_keepaway(a->style), - lookup_keepaway(b->style)); + return lookup_thickness(a->style) / 2. + lookup_thickness(b->style) / 2. + MAX(lookup_clearance(a->style), + lookup_clearance(b->style)); } gdouble vector_angle(gdouble ox, gdouble oy, gdouble ax, gdouble ay, gdouble bx, gdouble by) @@ -8203,7 +8203,7 @@ } if ((via = CreateNewVia(PCB->Data, viax, viay, - Settings.ViaThickness, 2 * Settings.Keepaway, + Settings.ViaThickness, 2 * Settings.Clearance, 0, Settings.ViaDrillingHole, NULL, NoFlags())) != NULL) { AddObjectToCreateUndoList(VIA_TYPE, via, via, via); /* if (gui->shift_is_pressed ()) @@ -8210,7 +8210,7 @@ ChangeObjectThermal (VIA_TYPE, via, via, via, PCB->ThermStyle);*/ DrawVia(via); if ((line = CreateDrawnLineOnLayer(CURRENT, pad->Point1.X + 1., pad->Point1.Y + 1., viax + 1., viay + 1., - Settings.LineThickness, 2 * Settings.Keepaway, NoFlags()))) { + Settings.LineThickness, 2 * Settings.Clearance, NoFlags()))) { AddObjectToCreateUndoList(LINE_TYPE, CURRENT, line, line); DrawLine(CURRENT, line);