delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/05/21/08:30:38

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=6S1fYimGzeHaqUCEhNEDfAZr1snH1W2AKFzMoJ/0Jv8=;
b=kAfnRkiVKnKoOgiTWrhuMn8GS1JwUZ3b2tnapp9qOh7Btv3BoML1wg/rQXRPGY9fSo
7715J6SBM4GFzPLfdr9qEy1a4o+mW4f/9V+xLOmOYz8NtLOufUMmDLKksC3QUip4DRos
HA+q80ceoS3azLfNlrkUPwigsdvzWv+YzZ9Vv4lHP7aBSha/P+AB668f3jh+zyeApS4d
uc9kxi5x7O5fGzGcv+uL1cyYGA8Ni64GQOtmmeDFIHzA4IE8csJf9z2bg1uGdIADJkNc
bGrxeXwAcUaxh2oG8BUGI8C+aqt7HoFGPs+cKwyEWzQwRFvLZtxLxgF0lmKqt+uuepht
AL7Q==
MIME-Version: 1.0
X-Received: by 10.60.45.203 with SMTP id p11mr1264703oem.10.1369139382970;
Tue, 21 May 2013 05:29:42 -0700 (PDT)
In-Reply-To: <CAG4ve9Jm00oyLb7uLgQjSTjfBpXOL9a0tXkjAQx09325ibChPg@mail.gmail.com>
References: <CACPio-6QgmXwj8LwYoR6zq1hfXHh8ymmnDNhrJd5oEVg6pt0Gg AT mail DOT gmail DOT com>
<CACPio-7zTB0N7x8hGALcZzGgaCAexKr5DUb4imd=QAzH7Pj61A AT mail DOT gmail DOT com>
<CAG4ve9Jm00oyLb7uLgQjSTjfBpXOL9a0tXkjAQx09325ibChPg AT mail DOT gmail DOT com>
Date: Tue, 21 May 2013 08:29:42 -0400
Message-ID: <CACPio-7ucw-yxsykwOyV+p=+xUqKbwHLhQv1ODNS9Qd+gf3GPQ@mail.gmail.com>
Subject: Re: [geda-user] Re: refdes renumber
From: Nathan Stewart <therealnathanstewart AT gmail DOT com>
To: geda-user AT delorie DOT com
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

--001a11c255f69217ca04dd399ae8
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

I'm still not sure I follow your email. Autorenumber in gschem actually
modifies the field matching the expression in the tool. It  defaults to
"refdes=3DR?", or similar I believe. But you can modify other fields if you
change the expression. I've used it to renumber pinnumbers or pinseq in
symbols.

What I'm discussing is in PCB. Giving you the ability to renumber S1/C1 to
S2/C1 rather than incrementing the component field to S1/C2.

I have it working in my local copy, following really simple rules. I called
the command 'Resub' for 'Renumber Subcirtcuit' or  possibly 'Regular
expression Substitute'. Currently it must match a fixed string, and it must
be a prefix. It only works on the current selection.

Now you can do a PCB layout for a subcircuit which is used multiple times,
paste multiple instances into your master circuit, and then renumber the
subcircuits to match.

I'm conteplating making it work on regexes, anywhere in the refdes, but I'm
really not sure that adds anything useful.  More useful might be removing
the restriction to current selection, and figuring out how to
auto-increment multiple instances reliably so that components in the same
subcircuit instance stay in sync.
On May 20, 2013 10:45 AM, "=E1=CC=C5=CB=D3=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3=
=CB=C9=CA" <svetonomer AT gmail DOT com>
wrote:

> I use autorenumer tool in gschem. It works normal.
> But if use this tool when the .pcb file is existed, work of this
> avtonumber action are not corrected:
> After save schem and launch gsch2pcb .pcb file modifying as this:
>
> leha AT work ~/FAP2/design/geda $ gsch2pcb project
> ----------------------------------
> Done processing.  Work performed:
> fap.pcb.pcb is backed up as fap.pcb.pcb.bak4.
> No elements to add so not creating fap.pcb.new.pcb
> 10 elements had a value change in fap.pcb.pcb.
>
> leha AT work ~/FAP2/design/geda $ diff fap.pcb.pcb fap.pcb.pcb.bak4
> 827c827
> < Element["" "0805" "C3" "20p" 70.5090mm 15.7554mm -2.3001mm 0.3001mm 1
> 100 ""]
> ---
> > Element["" "0805" "C3" "1000p" 70.5090mm 15.7554mm -2.3001mm 0.3001mm 1
> 100 ""]
> 885c885
> < Element["" "0805" "C10" "0.1u" 63.0090mm 17.0554mm 1.1552mm 0.2908mm 1
> 100 ""]
> ---
> > Element["" "0805" "C10" "1000p" 63.0090mm 17.0554mm 1.1552mm 0.2908mm 1
> 100 ""]
> .....
> This means what gsch2pcb replace the VALUE attribute not REFDES.
> After gschem renumbering and save, gsch2pcb show the schem as new, she no=
t
> known about renumered action.
> Gschem not save .bak after renumber therefore renumber tool must replacin=
g
> REFDES attribute in PCB desing.
> Where existing similar util?
>
>
>
> 2013/5/16 Nathan Stewart <therealnathanstewart AT gmail DOT com>
>
>> Ok - I've been thinking a bit more about what I was trying to accomplish=
,
>> and how best to do it. My current thinking goes something like this:
>>
>> Using the technique I saw here:
>>
>> 1. Create a dummy schem containing the subcircuit you wish to layout. Do
>> not make the subcircuit portion of the refdes explicit. (ie, leave it S?=
 so
>> that the netlist looks like: S?/U1-7 S?/R1-2 S?/L1-1 ....
>> 2. Do the layout for the subcircuit.
>> 3. Load layout to pastebuffer.
>> 4. Paste (modifications to CopyPastebufferToLayout() described below)
>>
>> What I'm proposing here, is to modify CopyPastebufferToLayout() so that
>> if the the element names are of the form S?/Cn, AND the netlist matches
>> S[1-4]/Cn, but S1/Cn already exists, then we must be pasting S2/Cn, and =
so
>> on. I'm not absolutely certain if all the information needed to do that =
is
>> available in that function, or if that's in fact the best place to put i=
t.
>>
>> To my thinking, it fits the use case well, but perhaps I lack imaginatio=
n
>> for how other usages could break it, or if this is too specific to one w=
ork
>> flow to be put into the paste behavior.  It's possible that really simpl=
e
>> subcircuits could posses identical netlists, but different layouts.
>> Alternatively, I was just planning to rename the actual refdes based on
>> substring patterns (rather than do the logical renumber mapping like
>> ActionRenumber does).
>>
>> So a couple questions:
>> 1) Is this broad enough to be done in core paste functionality, and if
>> not, is there a better place for it?
>> 2) Is there anything else that should be pulled into doing this - it
>> occurs to me that conceptually, this is sort of an extension of 'import
>> schematic', in that you're tying elements of your layout into another
>> source file.
>> 3) One additional idea I had was possibly adding an optional attribute t=
o
>> a component which could tell PCB to go ahead and load all my "postage
>> stamps" on import of the schematic. Sort of like 'footprint' on steroids=
.
>> Any comments on this idea?
>>
>> Opening the floor to any comments, suggestions, and criticism.
>> Nathan
>>
>>
>>
>>
>>
>> On Wed, May 15, 2013 at 8:26 AM, Nathan Stewart <
>> therealnathanstewart AT gmail DOT com> wrote:
>>
>>> I started playing around with the renumber command. I changed the
>>> implementation slightly, so that if anything is selected, it restricts =
the
>>> renumbering to the selection.  I was getting into parsing refdes of the
>>> form Sn/Cn when I realized it  probably bears discussion.
>>>
>>> I was trying to get to being able to renumber subcircuit layouts. I kno=
w
>>> this has been done with scripts, but I dislike multi-homed work flows -
>>> tweak file in program A, modify it with program B, reload in A.
>>>
>>> The renumber also doesn't do exactly what I want anyway. It's going to
>>> homogenize the names on the board. I want to modify the refdes itself i=
n
>>> the layout I loaded to the buffer.  This could be done by supplying a
>>> prefix.
>>>
>>> Any thoughts on this one?
>>>
>>
>>
>

--001a11c255f69217ca04dd399ae8
Content-Type: text/html; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

<p>I&#39;m still not sure I follow your email. Autorenumber in gschem actua=
lly modifies the field matching the expression in the tool. It=9A defaults =
to &quot;refdes=3DR?&quot;, or similar I believe. But you can modify other =
fields if you change the expression. I&#39;ve used it to renumber pinnumber=
s or pinseq in symbols. </p>

<p>What I&#39;m discussing is in PCB. Giving you the ability to renumber S1=
/C1 to S2/C1 rather than incrementing the component field to S1/C2.</p>
<p>I have it working in my local copy, following really simple rules. I cal=
led the command &#39;Resub&#39; for &#39;Renumber Subcirtcuit&#39; or=9A po=
ssibly &#39;Regular expression Substitute&#39;. Currently it must match a f=
ixed string, and it must be a prefix. It only works on the current selectio=
n. </p>

<p>Now you can do a PCB layout for a subcircuit which is used multiple time=
s, paste multiple instances into your master circuit, and then renumber the=
 subcircuits to match.</p>
<p>I&#39;m conteplating making it work on regexes, anywhere in the refdes, =
but I&#39;m really not sure that adds anything useful.=9A More useful might=
 be removing the restriction to current selection, and figuring out how to =
auto-increment multiple instances reliably so that components in the same s=
ubcircuit instance stay in sync. </p>

<div class=3D"gmail_quote">On May 20, 2013 10:45 AM, &quot;=E1=CC=C5=CB=D3=
=C5=CA =E8=C1=D2=D8=CB=CF=D7=D3=CB=C9=CA&quot; &lt;<a href=3D"mailto:sveton=
omer AT gmail DOT com">svetonomer AT gmail DOT com</a>&gt; wrote:<br type=3D"attribution"=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex">
<div dir=3D"ltr"><div><div><div><div><div><div>I use autorenumer tool in gs=
chem. It works normal.<br></div>But if use this tool when the .pcb file is =
existed, work of this avtonumber action are not corrected:<br></div>After s=
ave schem and launch gsch2pcb .pcb file modifying as this:<br>

<br>leha AT work ~/FAP2/design/geda $ gsch2pcb project <br>-------------------=
---------------<br>Done processing.=9A Work performed:<br>fap.pcb.pcb is ba=
cked up as fap.pcb.pcb.bak4.<br>No elements to add so not creating fap.pcb.=
new.pcb<br>

10 elements had a value change in fap.pcb.pcb.<br><br>leha AT work ~/FAP2/desi=
gn/geda $ diff fap.pcb.pcb fap.pcb.pcb.bak4<br>827c827<br>&lt; Element[&quo=
t;&quot; &quot;0805&quot; &quot;C3&quot; &quot;20p&quot; 70.5090mm 15.7554m=
m -2.3001mm 0.3001mm 1 100 &quot;&quot;]<br>

---<br>&gt; Element[&quot;&quot; &quot;0805&quot; &quot;C3&quot; &quot;1000=
p&quot; 70.5090mm 15.7554mm -2.3001mm 0.3001mm 1 100 &quot;&quot;]<br>885c8=
85<br>&lt; Element[&quot;&quot; &quot;0805&quot; &quot;C10&quot; &quot;0.1u=
&quot; 63.0090mm 17.0554mm 1.1552mm 0.2908mm 1 100 &quot;&quot;]<br>

---<br>&gt; Element[&quot;&quot; &quot;0805&quot; &quot;C10&quot; &quot;100=
0p&quot; 63.0090mm 17.0554mm 1.1552mm 0.2908mm 1 100 &quot;&quot;]<br>.....=
<br></div>This means what gsch2pcb replace the VALUE attribute not REFDES.<=
br>

</div>After gschem renumbering and save, gsch2pcb show the schem as new, sh=
e not known about renumered action. <br></div>Gschem not save .bak after re=
number therefore renumber tool must replacing REFDES attribute in PCB desin=
g.<br>

</div>Where existing similar util?<br><div><div><div><div><div><div><br></d=
iv></div></div></div></div></div></div><div class=3D"gmail_extra"><br><br><=
div class=3D"gmail_quote">2013/5/16 Nathan Stewart <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:therealnathanstewart AT gmail DOT com" target=3D"_blank">therealna=
thanstewart AT gmail DOT com</a>&gt;</span><br>

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div>Ok - I&#39;ve bee=
n thinking a bit more about what I was trying to accomplish, and how best t=
o do it. My current thinking goes something like this:<br>

<br></div>Using the technique I saw here:<br><br>
1. Create a dummy schem containing the subcircuit you wish to layout. Do no=
t make the subcircuit portion of the refdes explicit. (ie, leave it S? so t=
hat the netlist looks like: S?/U1-7 S?/R1-2 S?/L1-1 ....<br></div><div>


2. Do the layout for the subcircuit.<br></div><div>3. Load layout to pasteb=
uffer. <br></div><div>4. Paste (modifications to CopyPastebufferToLayout() =
described below)<br><br></div><div>What I&#39;m proposing here, is to modif=
y CopyPastebufferToLayout() so that if the the element names are of the for=
m S?/Cn, AND the netlist matches S[1-4]/Cn, but S1/Cn already exists, then =
we must be pasting S2/Cn, and so on. I&#39;m not absolutely certain if all =
the information needed to do that is available in that function, or if that=
&#39;s in fact the best place to put it. <br>


<br></div><div>To my thinking, it fits the use case well, but perhaps I lac=
k imagination for how other usages could break it, or if this is too specif=
ic to one work flow to be put into the paste behavior.=9A It&#39;s possible=
 that really simple subcircuits could posses identical netlists, but differ=
ent layouts.=9A Alternatively, I was just planning to rename the actual ref=
des based on substring patterns (rather than do the logical renumber mappin=
g like ActionRenumber does).<br>


<br></div><div>So a couple questions:<br></div><div>1) Is this broad enough=
 to be done in core paste functionality, and if not, is there a better plac=
e for it? <br></div><div>2) Is there anything else that should be pulled in=
to doing this - it occurs to me that conceptually, this is sort of an exten=
sion of &#39;import schematic&#39;, in that you&#39;re tying elements of yo=
ur layout into another source file. <br>


</div><div>3) One additional idea I had was possibly adding an optional att=
ribute to a component which could tell PCB to go ahead and load all my &quo=
t;postage stamps&quot; on import of the schematic. Sort of like &#39;footpr=
int&#39; on steroids. Any comments on this idea? <br>


<br></div><div>Opening the floor to any comments, suggestions, and criticis=
m.<span><font color=3D"#888888"><br></font></span></div><span><font color=
=3D"#888888"><div>Nathan<br></div><div><br></div>
<div><br></div><div><div><br></div></div></font></span></div><div><div><div=
 class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">
On Wed, May 15, 2013 at 8:26 AM, Nathan Stewart <span dir=3D"ltr">&lt;<a hr=
ef=3D"mailto:therealnathanstewart AT gmail DOT com" target=3D"_blank">therealnatha=
nstewart AT gmail DOT com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir=3D"ltr"><div>I started playing around with the renumber command. I=
 changed the implementation slightly, so that if anything is selected, it r=
estricts the renumbering to the selection.=9A I was getting into parsing re=
fdes of the form Sn/Cn when I realized it=9A probably bears discussion.<br>



<br></div><div>I was trying to get to being able to renumber subcircuit lay=
outs. I know this has been done with scripts, but I dislike multi-homed wor=
k flows - tweak file in program A, modify it with program B, reload in A. <=
br>



<br></div><div>The renumber also doesn&#39;t do exactly what I want anyway.=
 It&#39;s going to homogenize the names on the board. I want to modify the =
refdes itself in the layout I loaded to the buffer.=9A This could be done b=
y supplying a prefix. <br>



<br>Any thoughts on this one?<br></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</blockquote></div>

--001a11c255f69217ca04dd399ae8--

- Raw text -


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