X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713435545; x=1714040345; darn=delorie.com; h=mime-version:user-agent:references:in-reply-to:date:to:from:subject :message-id:from:to:cc:subject:date:message-id:reply-to; bh=GOMoGJx5xudCKtI0n/RZa2QEuaWboPcLr23laVz/g6I=; b=E+p/gPsgOxo0buysTW6JXuL94WJaj02w8AxOYDl9jmuQ9pnetBr7qhUpgS7LC2qt4J RoHMYuRffiBCjYfwfHpIl2zN4D2bLxpASzWJWBb4O4Ks3Dyya6rIb1zT07/DEcWwWmce 8/3xSjqfTRIdjUG0TY6ljHCNy8abs0GkOZgbfHMQCq2qw3ORq5PLZjO3c4EqZ0L+DKm1 OGJcxP8W2vrggtU9X4obtSXSsOoiLuEpwimPN6JVfKPvZkx/w2JTrM/KKh/S/gYzE2XC Jpw1qJgzKSufCerGv5EbhgUPpJvINgFtLY396z2gz0l7NHy9surOcp89YSgKZGWZkzIS BBcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713435545; x=1714040345; h=mime-version:user-agent:references:in-reply-to:date:to:from:subject :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GOMoGJx5xudCKtI0n/RZa2QEuaWboPcLr23laVz/g6I=; b=YpQyjms024HhSHTQjQbKTxJxRDXqNlcJOKVXNY9fu77AkwSDXoff6EABD6xnAs9QGK SPxIJaU9Ol4dlINSs7upE2MOJ3sk/HSXcvQxOGKHOi9jPd+B7TkTAJLk0JFtkP8skIwS oh3Yj/GE8ndIvDnAiGN23S7XXBYwye1rb67bqw7z4TYBfX/ymyT5zO2rN5IZgL31A+5q rTer3kHvtagHQrm9oLaqafJAlHMoApJCrNhCh2wskiGMGVVeswklVhsx6DUBi7odySXq 25bHwR6LT/eVjmIRWx0QV/2mgLEmI2QlfkMMdrWti/xHDTlZvp/5N2roKCxQjHh5ggyw b98A== X-Gm-Message-State: AOJu0YzAmzUW1S22vrhiUDdMonpgK3kmLVLpqn9DVXkRJnSf9g7tL92O PJs6oge5CQtVj0tXafko3NzjASWcY2bXfrFBohU642eRaMk78vPQN7u0hw== X-Google-Smtp-Source: AGHT+IHWYzTZTaCgLvXvuBYtN713E49Ludggx3AaKuwyGe6gD+ylnWrLZFoX5VxkreENXplmMSdd9A== X-Received: by 2002:a19:5e06:0:b0:519:6c97:1f5d with SMTP id s6-20020a195e06000000b005196c971f5dmr1062072lfb.23.1713435544607; Thu, 18 Apr 2024 03:19:04 -0700 (PDT) Message-ID: <7d9c541bc1c2c214b65906e0389b4eb6d26fbc1e.camel@gmail.com> Subject: Re: [geda-user] Allowing pins/pads with zero clearance to contact polygons From: "Onetmt (onetmt AT gmail DOT com) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Date: Thu, 18 Apr 2024 12:19:02 +0200 In-Reply-To: References: Content-Type: multipart/alternative; boundary="=-9TxtTWBQZd7SWXWc7ikg" User-Agent: Evolution 3.50.2-1 MIME-Version: 1.0 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --=-9TxtTWBQZd7SWXWc7ikg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Il giorno mar, 23/01/2024 alle 20.52 -0900, Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] ha scritto: > A while back there was some discussion here about different ways of > connecting pins/pads to polygons (e.g. ground pads to ground plane). > At least some people like to do this by setting the clearance for the > pin/pad to zero, then simply drawing the ground plane over the part. > It's a nice way to do it because it removes the need to have little > hard-to-select traces everywhere to connect e.g. ground pins to > ground > plane (which in turn makes it much less painful to move parts around > after the fact. Yes, please, keep the zero clearance feature working - my last 10 years projects rely on that :-)=C2=A0 >=20 > This used to work without any DRV violations, but a fix to the > polygon > clearance tests by Charles Parker in de49a513 seems to show that it > only ever worked by accident. >=20 > However the current code in master contains this code that explicitly > allows zero-clearance vias to contact polygons: >=20 > =C2=A0 case VIA_TYPE: > =C2=A0=C2=A0=C2=A0 if (clearance =3D=3D 0) > =C2=A0=C2=A0=C2=A0 { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Vias with zero clearance are allowed, m= ake sure it's > connected. */ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (obj_touches_poly(&thing1, polygon, Get= LayerNumber(PCB- > >Data, layer))) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 else > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* not connected to the polygo= n, raise an error*/ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 new_polygon_not_connected_viol= ation (layer, polygon); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 break; > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > =C2=A0=C2=A0=C2=A0 } >=20 > I think this same condition should apply to PAD_TYPE and PIN_TYPE > objects as > well, because it's essentially correct to take zero to mean zero, and > incorrect > to do otherwise. >=20 > What I don't agree with is the subsequent requirement that the object > touch the > nearby polygon, for the following reasons: >=20 > =C2=A0 * It adds significantly more meaning to clearance =3D=3D 0 than th= at > setting > =C2=A0=C2=A0=C2=A0 explicitly states >=20 > =C2=A0 * As implemented it triggers on nearby polygons that aren't meant > to be > =C2=A0=C2=A0=C2=A0 connected >=20 > =C2=A0 * As implemented the message doesn't make clear what the problem i= s > (refers > =C2=A0=C2=A0=C2=A0 only to flag and doesn't mention clearance) and gives = a wrong > prescription > =C2=A0=C2=A0=C2=A0 for the case of a nearby polygon that isn't supposed t= o be > connected. >=20 > =C2=A0 * It doesn't catch thin connections (as happens for DRC elsewhere) > anyway >=20 > =C2=A0 * Complete misses with polys that are supposed to be connected are > caught by > =C2=A0=C2=A0=C2=A0 connectivity anyway >=20 > Changing this to honor the literal meaning of clearance =3D=3D 0 while > not adding > any unexpected implicit meaning would be fairly low-risk: it wouldn't > change > any existing board, and would only impact users who have deliberately > set > clearance to zero.=C2=A0 So far as I know none of the available footprint > libraries > ship footprints with clearance set that way by default. >=20 > Thoughts? >=20 > Britton --=-9TxtTWBQZd7SWXWc7ikg Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Il giorno mar, 23/01/2024 alle 20.= 52 -0900, Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT co= m] ha scritto:
A while back there was = some discussion here about different ways of
connecting pins/= pads to polygons (e.g. ground pads to ground plane).
At least= some people like to do this by setting the clearance for the
pin/pad to zero, then simply drawing the ground plane over the part.
It's a nice way to do it because it removes the need to have littl= e
hard-to-select traces everywhere to connect e.g. ground pin= s to ground
plane (which in turn makes it much less painful t= o move parts around
after the fact.

Yes, please, keep the zero clearance feature working - my = last 10 years projects rely on that :-) 

This used to work without any DRV violations, but a = fix to the polygon
clearance tests by Charles Parker in de49a= 513 seems to show that it
only ever worked by accident.

However the current code in master contains this co= de that explicitly
allows zero-clearance vias to contact poly= gons:

  case VIA_TYPE:
&nbs= p;   if (clearance =3D=3D 0)
    {
      /* Vias with zero clearance are= allowed, make sure it's connected. */
   &nbs= p;  if (obj_touches_poly(&thing1, polygon, GetLayerNumber(PCB->= Data, layer)))
        bre= ak;
      else
 &= nbsp;    {
      = ;  /* not connected to the polygon, raise an error*/
&nb= sp;       new_polygon_not_connected_violation= (layer, polygon);
       = break;
      }
 =    }

I think this same condition sho= uld apply to PAD_TYPE and PIN_TYPE objects as
well, because i= t's essentially correct to take zero to mean zero, and incorrect
<= div>to do otherwise.

What I don't agree with i= s the subsequent requirement that the object touch the
nearby= polygon, for the following reasons:

  * = It adds significantly more meaning to clearance =3D=3D 0 than that setting<= br>
    explicitly states

=
  * As implemented it triggers on nearby polygons that aren't mea= nt to be
    connected

  * As implemented the message doesn't make clear what the probl= em is (refers
    only to flag and doesn't men= tion clearance) and gives a wrong prescription
  &n= bsp; for the case of a nearby polygon that isn't supposed to be connected.<= br>

  * It doesn't catch thin connections (as= happens for DRC elsewhere) anyway

  * Co= mplete misses with polys that are supposed to be connected are caught by
    connectivity anyway

=
Changing this to honor the literal meaning of clearance =3D=3D 0 while= not adding
any unexpected implicit meaning would be fairly l= ow-risk: it wouldn't change
any existing board, and would onl= y impact users who have deliberately set
clearance to zero.&n= bsp; So far as I know none of the available footprint libraries
ship footprints with clearance set that way by default.
Thoughts?

Britton
--=-9TxtTWBQZd7SWXWc7ikg--