www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/07/11:35:33

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Subject: Re: [geda-user] A new PCB file format
To: geda-user AT delorie DOT com
References: <CANEvwqikzNgQh-F3vyPevNEva+RkxR2UaCBi9of4am0b928NPg AT mail DOT gmail DOT com>
From: "Dan McMahill (dan AT mcmahill DOT net) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Message-ID: <568E93BC.9010804@mcmahill.net>
Date: Thu, 7 Jan 2016 11:35:08 -0500
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101
Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <CANEvwqikzNgQh-F3vyPevNEva+RkxR2UaCBi9of4am0b928NPg@mail.gmail.com>
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;
s=q20140121; t=1452184520;
bh=CqHb/FJ7SF6Hvsuj1iqZ7mbWBVMWfBtSVM0DHERN3JI=;
h=Received:Received:Subject:To:From:Message-ID:Date:MIME-Version:
Content-Type;
b=Ft5hC3UroFKMdIglHFrsvnlOgQg0lpX8a4F/M3Chqr8ZzWuQqwKhzmwzWSWLWrh2I
4+5foMJ5lvqBhHHO5IEWpGvJI9pIKw1RdaJ4Rtqt+3KuQaizUtNwB4PM3DPvJDhTno
OS2Eo0f0HAWwyBQvb85WNAe/uSo2c1k2M1nkUFW5KWUq7FJYjTQ4OMDLzohz7ucQX3
00sokK4VYWZNG3Zx/j/DP+7HA5QUnVocVz8+KMAPpvEm6ZSvrzL2q+hSKbUrx0Pi8z
iNk0bYM3FD2ZYLA2sc5mWRmTSepgIxMOUW0VLOxO76sJQVVVeMA3M1XTz9tltITgOw
ZqrKPNOG7FSRQ==
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

On 1/7/2016 12:20 AM, Marvin Dickens (mpdickens AT gmail DOT com) [via 
geda-user AT delorie DOT com] wrote:
> Hi Everybody,
>
> If your looking at tuning up or otherwise redesigning the file format
> for PCB
> I would really like gschem to understand the PCB file format and visa-versa.
> What I would like to be able to do is have a PCB layout up at the same
> time I
> have the schematic for that design up in gschem. If I select any part or
> portion
> of the layout in PCB that part or portion is visually highlighted in
> gschem and
> visa-versa.
>

people probably aren't aware of this, but I prototyped that 
functionality and the code has been in gschem for 5 or 6 years now.  You 
can select an element in the schematic and have it select in pcb.  I may 
have even gotten the opposite working too but can't recall.  Feel free 
to try it out and move the ball forwards.


Maybe it is time to mention one of my wishes and what steps I had taken 
to get there.

gschem has scheme embedded in it.  Setting aside the question of if 
scheme is the right language, the important piece is we have a script 
interface into the compiled portion.

With the script interface, you can define additional menus and menu 
items.  You can also add hooks that get executed when things happen. 
What sort of thing?  Component Selection!

The idea is gschem stays flexible and not tied to a particular backend 
but you provide enough of an API (scheme or other) to where you can load 
a module at run-time which puts gschem into a mode targetted at a 
particular backend (pcb, spice, gnucap, etc).  By isolating the details 
of the particular backend into a module which is loaded when the user 
requests it, we can do all sorts of cool things.  Picture a simulation 
environment where the simulator module has a list of all the supported 
analysis types and the associated parameters.  Now suppose gschem 
includes a dynamic attribute editor dialog.  The plug in just says "here 
gschem, here is a list of simulations and the setup variables they need, 
give me a dialog for the user".  At least some code has been written to 
make this possible.  Note that we have an existance proof in PCB for 
that.  The export dialog boxes are built on the fly based on a 
particular struct that the HIDs use.


Anyway, take a look at:

gschem/scheme/pcb.scm

load it and try.

It is not perfect for sure but I think it was a step in the right 
direction.  Again, one of the guiding principles was to make sure gschem 
includes functions that are needed (like a file selection dialog, hooks 
to select/deselect, generic attribute editor dialog, etc).  Then use 
those features to allow a particular flow to be customized.  This 
maintains the current workflows, maintains flexibility, doesn't tie 
gschem to any particular backend, but ENABLES flow specific 
functionality as add in's.

One barrier is the one of nets.  gschem unfortunately does not know 
about connectivity (or didn't last I checked).  That makes it harder to 
select a net on the schematic and try to then select that rats in a pcb 
layout, plot the simulated voltage on that node, or other things of this 
nature.  This is a failure in the data model used by gschem.  Good data 
model is important.  More so than the file format used to represent the 
data.



-Dan






- Raw text -


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