delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/03/06/20:50:59

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: <CAHUm0tNohrmDf2oLQAWer_LYSPj9DZzquTdYM-kTgpaM9qO5Lg@mail.gmail.com>
References: <56DCAE39 DOT 7020204 AT m0n5t3r DOT info> <nbijrc$t4t$1 AT ger DOT gmane DOT org> <CAHUm0tNohrmDf2oLQAWer_LYSPj9DZzquTdYM-kTgpaM9qO5Lg AT mail DOT gmail DOT com>
Comments: In-reply-to "Erich Heinzle (a1039181 AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
message dated "Mon, 07 Mar 2016 11:59:38 +1030."
Mime-Version: 1.0
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

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


- Raw text -


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