Mail Archives: geda-user/2015/08/18/01:12:01
--001a11c332dafab64f051d8ef174
Content-Type: text/plain; charset=UTF-8
DJ
Thanks for your detailed response.
I did some more tests.
It appears that the absolute position is written to the footprint origin
value in the footprint file. I wrote one origin to 2870.00mil and
1525.00mil.
I did this by placing the component - setting the cursor to the same
location as the diamond
and coincident with Ctl-M, and saving a new footprint. I was surprised by
the results and I have
no idea why a absolute position would have any value - especially if your
PCB outline was smaller
then these dimensions.
Based on your latest comments about using absolute coordinates in the past
- could what
I have been seeing with the footprint origin - is this a legacy 'feature'
that has been made non-functional
with new PCB releases?
If I hand edit the origin back to (0,0) in the footprint file and restart
PCB and place the
same component at the cursor - no problem. I experience no difference
using this component
in PCB. And as I mentioned previously, I find other library footprints with
non-zero origin values also.
(however, there are differences in the "Elements[ ]" arguments).
I'd like to suggest that before more speculations are made on how it should
work - please test in your version of PCB.
I may have something particular with my environment. Testing origin values
can be done easily/quickly.
Dave
On Mon, Aug 17, 2015 at 4:06 PM, DJ Delorie <dj AT delorie DOT com> wrote:
>
> > A lot of this doesn't make sense. I'm hearing 2 things.
>
> As a bit of background, consider that the original footprint "file"
> allowed more than one footprint, and we use the same information for
> cut buffers and "save buffer to file" stuff. Each pcb, paste buffer,
> and file has its own local coordinate system, and cutting and pasting
> translates between those coordinate systems.
>
> > 1) If the 0,0 origin coordinates are an absolute position from the
>
> Keep in mind the difference between a footprint and an element.
>
> A footprint is a pattern in a library.
>
> An element is a specified instance of a footprint along with other
> information.
>
> So it makes no sense to talk about the "origin" of a footprint - it's
> in a library, it's just a pattern, the only magic about the origin is
> that it's the mathematical 0,0 point that other things in the
> footprint are measured from.
>
> When you paste a footprint onto a pcb it becomes an element. At that
> point, the 0,0 of the footprint is mapped to wherever the crosshair
> is, and becomes the "location" of the element.
That has not been seen by my experiments. The value for the footprint
origin
does not appear to matter.
>
> > But that doesn't happen when you import schematics to the PCB.
>
> Actually it does if you use gsch2pcb. The File->Import method
> relocates every element so that they're not all up in the corner.
>
> > The diamond shape origin is in the center of this 805 component - no
> > matter where this component is randomly placed onto the PCB grid.
> > The component origin cannot be linked to absolute PCB coordinates.
>
> The element's internal measurements are all relative to the element's
> origin, as if it had its own local coordinate system. We do this just
> to keep the internal logic easier. We *used* to keep the internal
> coordinates absolute, and had to recalculate the position of every
> pin, pad, and silk every time you moved the element.
>
> > 2) I thought I heard that the origin written to the footprint file,
> > happens to be the absolute position of the cursor when captured into
> > the buffer.
>
> When you're editing a footprint via pcb, at one point you "cut
> selected objects to buffer". At that moment, the location of the
> crosshair becomes the 0,0 point for the coordinate system that the cut
> buffer uses. If you paste the buffer as-is, you'll notice that the
> "ghost" image before you click is relative to the crosshair in the
> same way it was relative to when you cut it.
>
> When you convert a buffer to a footprint, the footprint is created
> relative to the 0,0 of the buffer, of course. The *net* result is
> that the location of the crosshair when you initially cut it becomes
> the origin of the footprint.
>
>
> > How and why would anyone create parts at 0,0 in the extreme upper
> > left corner of a PCB?
>
> Again, elements vs footprints. A footprint should have a reasonable
> 0,0 point and should be stored with a 0,0 in the Element[] coordinate
> slot.
>
> Once on a pcb, it's not a footprint, it's an element, and the
> "location" information in the Element[] coordinate slot is used to
> keep track of its location.
>
> > I am guessing that the origin
> > coordinates written to the footprint file, are related to relative
> > coordinates based on a local origin and the cursor position.
>
> If you happen to have something other than 0,0 in the footprint file,
> when you paste that footprint onto the pcb, it will be pasted away
> from the crosshair by that amount. *After* it's pasted, that
> coordinate will be updated to be the new location of the element.
>
That has not been evident in my tests. I cannot see/feel any difference.
>
> > BUT - and this is the kicker - it does not seem to matter if you
> > have an non-zero offset in your footprint file.
>
> That would make sense, since the coordinates in the footprint file
> only have a real meaning after you place it on a pcb.
>
> It's possible to have more than one Element[] in a footprint file, but
> we discourage that ;-)
>
--001a11c332dafab64f051d8ef174
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div><div><div><div>DJ<br><br></div>Thanks for y=
our detailed response. <br><br>I did some more tests.=C2=A0 <br><br></div>I=
t appears that the absolute position is written to the footprint origin<br>=
</div><div>value in the footprint file.=C2=A0 I wrote one origin to 2870.00=
mil and 1525.00mil.<br></div><div>I did this by placing the component - set=
ting the cursor to the same location as the diamond<br>and coincident with =
Ctl-M, and saving a new footprint. I was surprised by the results and I hav=
e <br>no idea why a absolute position would have any value=C2=A0 - especial=
ly if your PCB outline was smaller <br>then these dimensions.<br><br></div>=
<div>Based on your latest comments about using absolute coordinates in the =
past=C2=A0 - could what<br>I have been seeing with the footprint origin=C2=
=A0 - is this a legacy 'feature' that has been made non-functional =
<br>with new PCB releases?<br></div><div><br></div>If I hand edit the origi=
n back to (0,0) in the footprint file and restart PCB and place the <br>sam=
e component at the cursor - no problem.=C2=A0 I experience no difference us=
ing this component <br>in PCB. And as I mentioned previously, I find other =
library footprints with non-zero origin values also.<br></div><div>(however=
, there are differences in the "Elements[ ]" arguments).<br></div=
></div><br></div><div>I'd like to suggest that before more speculations=
are made on how it should work - please test in your version of PCB.=C2=A0=
<br>I may have something particular with my environment. Testing origin va=
lues can be done easily/quickly.<br></div><div><div><div><div><div><div><di=
v><div><div><div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra"=
>Dave<br><br></div><div class=3D"gmail_extra"><div class=3D"gmail_quote">On=
Mon, Aug 17, 2015 at 4:06 PM, DJ Delorie <span dir=3D"ltr"><<a href=3D"=
mailto:dj AT delorie DOT com" target=3D"_blank">dj AT delorie DOT com</a>></span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex"><span class=3D""><br>
> A lot of this doesn't make sense. I'm hearing 2 things.<br>
<br>
</span>As a bit of background, consider that the original footprint "f=
ile"<br>
allowed more than one footprint, and we use the same information for<br>
cut buffers and "save buffer to file" stuff.=C2=A0 Each pcb, past=
e buffer,<br>
and file has its own local coordinate system, and cutting and pasting<br>
translates between those coordinate systems.<br>
<span class=3D""><br>
> 1) If the 0,0 origin coordinates are an absolute position from the<br>
<br>
</span>Keep in mind the difference between a footprint and an element.<br>
<br>
A footprint is a pattern in a library.<br>
<br>
An element is a specified instance of a footprint along with other<br>
information.<br>
<br>
So it makes no sense to talk about the "origin" of a footprint - =
it's<br>
in a library, it's just a pattern, the only magic about the origin is<b=
r>
that it's the mathematical 0,0 point that other things in the<br>
footprint are measured from.<br>
<br>
When you paste a footprint onto a pcb it becomes an element.=C2=A0 At that<=
br>
point, the 0,0 of the footprint is mapped to wherever the crosshair<br>
is, and becomes the "location" of the element.</blockquote><div>=
=C2=A0<br>That has not been seen by my experiments.=C2=A0 The value for the=
footprint origin <br>does not appear to matter.=C2=A0 <br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex">
<span class=3D""><br>
> But that doesn't happen when you import schematics to the PCB.<br>
<br>
</span>Actually it does if you use gsch2pcb.=C2=A0 The File->Import meth=
od<br>
relocates every element so that they're not all up in the corner.<br>
<span class=3D""><br>
> The diamond shape origin is in the center of this 805 component - no<b=
r>
> matter where this component is randomly placed onto the PCB grid.<br>
> The component origin cannot be linked to absolute PCB coordinates.<br>
<br>
</span>The element's internal measurements are all relative to the elem=
ent's<br>
origin, as if it had its own local coordinate system.=C2=A0 We do this just=
<br>
to keep the internal logic easier.=C2=A0 We *used* to keep the internal<br>
coordinates absolute, and had to recalculate the position of every<br>
pin, pad, and silk every time you moved the element.<br>
<span class=3D""><br>
> 2) I thought I heard that the origin written to the footprint file,<br=
>
> happens to be the absolute position of the cursor when captured into<b=
r>
> the buffer.<br>
<br>
</span>When you're editing a footprint via pcb, at one point you "=
cut<br>
selected objects to buffer".=C2=A0 At that moment, the location of the=
<br>
crosshair becomes the 0,0 point for the coordinate system that the cut<br>
buffer uses.=C2=A0 If you paste the buffer as-is, you'll notice that th=
e<br>
"ghost" image before you click is relative to the crosshair in th=
e<br>
same way it was relative to when you cut it.<br>
<br>
When you convert a buffer to a footprint, the footprint is created<br>
relative to the 0,0 of the buffer, of course.=C2=A0 The *net* result is<br>
that the location of the crosshair when you initially cut it becomes<br>
the origin of the footprint.<br>
<span class=3D""><br>
<br>
> How and why would anyone create parts at 0,0 in the extreme upper<br>
> left corner of a PCB?<br>
<br>
</span>Again, elements vs footprints.=C2=A0 A footprint should have a reaso=
nable<br>
0,0 point and should be stored with a 0,0 in the Element[] coordinate<br>
slot.<br>
<br>
Once on a pcb, it's not a footprint, it's an element, and the<br>
"location" information in the Element[] coordinate slot is used t=
o<br>
keep track of its location.<br>
<span class=3D""><br>
> I am guessing that the origin<br>
> coordinates written to the footprint file, are related to relative<br>
> coordinates based on a local origin and the cursor position.<br>
<br>
</span>If you happen to have something other than 0,0 in the footprint file=
,<br>
when you paste that footprint onto the pcb, it will be pasted away<br>
from the crosshair by that amount.=C2=A0 *After* it's pasted, that<br>
coordinate will be updated to be the new location of the element.<br></bloc=
kquote><div><br></div><div>That has not been evident in my tests.=C2=A0 I c=
annot see/feel any difference.<br></div><div>=C2=A0<br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex">
<span class=3D""><br>
> BUT - and this is the kicker - it does not seem to matter if you<br>
> have an non-zero offset in your footprint file.<br>
<br>
</span>That would make sense, since the coordinates in the footprint file<b=
r>
only have a real meaning after you place it on a pcb.<br>
<br>
It's possible to have more than one Element[] in a footprint file, but<=
br>
we discourage that ;-)<br>
</blockquote></div><br></div></div></div></div></div></div></div></div></di=
v></div></div>
--001a11c332dafab64f051d8ef174--
- Raw text -