delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2024/02/04/10:15:27

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Mailer: exmh version 2.9.0 07/11/2018 (debian 1:2.9.0-1) with nmh-1.7.1
X-Exmh-Isig-CompType: repl
X-Exmh-Isig-Folder: inbox
From: "karl AT aspodata DOT se [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Solder mask commands?
In-reply-to: <0b116853-49cd-4af3-9770-83f61a026778@linetec.nl>
References: <CAC4O8c_FTDR8o603fWdhz0Rh_OgKybeTKuDM5cnJXNknQCYLoQ AT mail DOT gmail DOT com> <0b116853-49cd-4af3-9770-83f61a026778 AT linetec DOT nl>
Comments: In-reply-to "Richard Rasker (rasker AT linetec DOT nl) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
message dated "Sat, 03 Feb 2024 17:29:39 +0100."
Mime-Version: 1.0
Message-Id: <20240204151304.3E77986212AA@turkos.aspodata.se>
Date: Sun, 4 Feb 2024 16:13:04 +0100 (CET)
X-Virus-Scanned: ClamAV using ClamSMTP
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

This is a multipart MIME message.

--==_Exmh_1707059534_3810
Content-Type: text/plain

Richard:
...
> Question: is it possible to set the solder mask gap to match pad sizes 
> for all elements in one go?

Yes, with a simple script.

...
> The only alternative I see is to create a script that seeks out lines 
> with pad elements, then takes the thickness, and copies that to the mask 
> parameter - but that is quite a bit of work, especially given that I'll 
> be migrating to pcb-rnd pretty soon.

 Do all of your Pad lines look like this, i.e. they have 10 arguments 
between the []'s ?

$ grep -i Pad styrkort.pcb | head -1
        Pad[-1.3000mm 0.9500mm -0.9000mm 0.9500mm 1.0000mm 0.5000mm 1.4000mm "1" "1" "onsolder,square"]
$

Try attached script.

Regards,
/Karl Hammar

--==_Exmh_1707059534_3810
Content-Type: text/x-perl ; name="zero.sm.pl"
Content-Description: zero.sm.pl
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="zero.sm.pl"

#!/usr/bin/perl -w

use strict;

while (<>) {
    if (m/^(\s*Pad\[\s*)(.*)(\s*\].*)$/) {
	my $pre =3D $1;
	my $mid =3D $2;
	my $post =3D $3;

	my @fld =3D split(/\s+/, $mid, 8);
	$fld[6] =3D $fld[4];
	$_ =3D $pre . join(" ", @fld) . $post . "\n";
    }
    print;
}
--==_Exmh_1707059534_3810--


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019