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.8.0 04/21/2012 (debian 1:2.8.0~rc1-2) with nmh-1.5 X-Exmh-Isig-CompType: repl X-Exmh-Isig-Folder: inbox From: karl AT aspodata DOT se To: geda-user AT delorie DOT com Subject: Re: [geda-user] Valve / nixie symbols In-reply-to: References: <56DCAE39 DOT 7020204 AT m0n5t3r DOT info> Comments: In-reply-to "Erich Heinzle (a1039181 AT gmail DOT com) [via geda-user AT delorie DOT com]" message dated "Mon, 07 Mar 2016 11:59:38 +1030." Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20160307015049.097EF8153704@turkos.aspodata.se> Date: Mon, 7 Mar 2016 02:50:48 +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 Precedence: bulk Erich Heinzle: ... > I will try to refine the pin location behaviour for kicad symbol > conversion, to mirror that which has already been done for the eagle to > geda converter, which has some snap to grid functionality. ... This is how I snap the active pin end to some grid in perl: my $grid = 100; sub rnd( $ ) { my $dbl = shift; int( $dbl + 0.5 ); } sub snap( $ ) { my $dbl = shift; rnd( $dbl/$grid ) * $grid; } Just round it to nearest grid multiple. You don't need to snap the other end of the pin, since that is only for display. Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57