delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/07/10/11:23:30

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=20120113;
h=date:from:to:subject:message-id:mail-followup-to:references
:mime-version:content-type:content-disposition:in-reply-to
:user-agent;
bh=lRHnB1wdRFaC95YRMUMcDBGuzFWBtryS/dgemz6Vke0=;
b=SVXmn73EotTooONLerk8gqtMOrMlwT3drfpEVfXr6rute+HaPdKWIOtyPJoVlOrVzO
R4r1/p4amaZp92zZePi4qGNNRT/SgJ38zgdTwlFEWdKX9v6UOiOiDZbR85Gj55DW8Muy
MCyIuOHk0x+dTAucUiDXD4AyK05c68xHY4iJCCwT769Y/c/tADxpPhrGFkbKk8yoatYR
rjO164p13Jal//6NLGiAyvUsxhxu6bB0a7hGwAW42sP5kcDhVsaURXJ+gUyb0Mm1TZDg
77or4PpisF/4ryiACO6dRnML/rGqev9x2Cej+2Ts+l/xeGwCqOMvcetOYyItVMNdogmH
o7Yw==
X-Received: by 10.152.87.13 with SMTP id t13mr20602618laz.66.1436541790800;
Fri, 10 Jul 2015 08:23:10 -0700 (PDT)
Date: Fri, 10 Jul 2015 18:23:08 +0300
From: "Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] why I parse sch: gnetlist, writing backends (Back
annotation)
Message-ID: <20150710152308.GA17023@localhost.localdomain>
Mail-Followup-To: geda-user AT delorie DOT com
References: <559E86A4 DOT 3040109 AT ecosensory DOT com>
<DC183265-AD4B-4707-970F-1EE5D3578126 AT noqsi DOT com>
<201507091843 DOT t69IhGF6028321 AT envy DOT delorie DOT com>
<6392CE1A-AFA0-4D62-979C-3F35786422BD AT noqsi DOT com>
<201507092127 DOT t69LRHRC001744 AT envy DOT delorie DOT com>
<559EFE69 DOT 1040601 AT zoot DOT drehmel DOT com>
<201507092332 DOT t69NWUEN006109 AT envy DOT delorie DOT com>
<alpine DOT DEB DOT 2 DOT 00 DOT 1507100501200 DOT 6924 AT igor2priv>
<20150710132650 DOT GA15876 AT localhost DOT localdomain>
<alpine DOT DEB DOT 2 DOT 00 DOT 1507101547500 DOT 6924 AT igor2priv>
MIME-Version: 1.0
In-Reply-To: <alpine.DEB.2.00.1507101547500.6924@igor2priv>
User-Agent: Mutt/1.5.23 (2014-03-12)
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

--ew6BAiZeqk4r7MaW
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline

On Fri, Jul 10, 2015 at 03:49:27PM +0200, gedau AT igor2 DOT repo DOT hu wrote:
>
>
> On Fri, 10 Jul 2015, Vladimir Zhbanov (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com] wrote:
> >
> >TL;DR
> >Have you ever tried to read 'info geda-scheme'?
>
> No.
>
> But I do div down in random unknown code written in random unknown-to-me
> languages from time to time to fix something or make small modifications, so
> I know when it takes much longer than it should. With scheme, it does.
>
> I did it once, it enables me to access most of the data I need, so I won't
> need to do it ever again.
>
> Regards,
>
> Igor2

If your task was outputting coords of line segments in your schematic,
it is as easy as the script attached. With little modifications you can
output it to any file. You can use it in gschem or with the gaf utility
if you want to make it a stand-alone program.

And for the record: gnetlist is g-netlist. It's for netlisting (for work
with pin, nets, components) rather than accessing any schematic objects.

My wish to all participants of these thread (hope it's non-offensive):
please, try to be less ignorant, better ask here rather than flood the
list with your private opinions on how everything around is bad.

Thanks,
  Vladimir

--ew6BAiZeqk4r7MaW
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="line-coords.scm"


(use-modules (geda page))
(use-modules (geda object))

(for-each
  (lambda (object)
    (and (line? object)
      (format #t "X1: ~A Y1: ~A X2: ~A Y2: ~A\n"
              (car (line-start object))
              (cdr (line-start object))
              (car (line-end object))
              (cdr (line-end object))
              )))
  (page-contents (active-page)))

--ew6BAiZeqk4r7MaW--

- Raw text -


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