ID: | 3258 |
From: | ge...@igor2.repo.hu |
Date: | Thu, 8 Aug 2019 07:58:29 +0200 (CEST) |
Subject: | Re: [pcb-rnd] import modified footprint -- preserve rotation and |
in-reply-to: | 3256 from James Battat <jb...@wellesley.edu> |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-754868227-1565243909=:2358 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 8 Aug 2019, James Battat wrote: > I have done schematic capture in gschem and then imported that design int= o > pcb-rnd for layout (using "Import gschem schematics"). I completed the la= yout.=C2=A0 > Then I realized that I needed to modify a footprint, so I made a newly na= med > footprint, modified as needed and updated the footprint=3D attribute in g= schem.=C2=A0 > I then re-run "Import gschem schematics" in pcb-rnd.=C2=A0 This successfu= lly > imported the updated footprint. > > But: > * the rotation information of the fp is lost (newly imported orientation = does > not match the old fp orientation) Didn't it give you a warning about not being able to determine the=20 footprint orientation? That's a common thing with obsolete file formats=20 like geda/PCB's .fp element thing. > * thermals to ground pour are lost That is by design. We can't assume your new footprint is an edited version= =20 of the old footprint so we have to replace the data which means any local= =20 deviation is lost - including thermal bits.=20 A trivial example why thermals wouldn't work: I often use your flow of=20 replacing a footprint to go from thru-hole to SMD, so the same terminal=20 with the same terminal ID has different access to the layers and a thermal= =20 is a per layer thing. > > Is it possible to preserve either of these (presumably not if using the o= ld pcb > .fp format, but perhaps with the new .lht format?) What we preserve: - position (origin coordinate) - rotation (if we can determine it) - board side - attributes=20 Details: Rotation sometimes fails when importing alien file formats. If you see=20 rotation preservation fail with lht subcircuits, that's either a broken=20 footprint file (subc-aux layer missing) or a pcb-rnd a bug (please send me= =20 a test case!). The origin of the new subc may be different than from the old; the rule=20 here is that the origin of the new subc will land exactly where the origin= =20 of the old subc was. (I call this origin, not centroid, because sometimes= =20 the centroid for p&p differs) Refdes, value and footprint name are all included in attributes, these are= =20 not special fields. > Also, related question, is there a preferred/recommended file extension n= aming > convention for footprints vs. board layouts?=C2=A0 e.g. .fp for one and .= lht for the > other? pcb-rnd doesn't mind the file name^1, so you are free to choose what your= =20 own preference is. I know about two widely used preferences: 1. always end the file name in .lht to indicate the low level format (if=20 you open it with a text editor the first line tells you what it is, in=20 pretty much human readable form) - it's like a lot of programs call their= =20 files .xml while they all have custom, "incompatible" xml trees. In this=20 setup .fp is commonly used for geda/PCB elements. 2. use .fp and .pcb ending, regardless of the low level format, to=20 indicate the high level format (or purpose) of the file - it's like a lot= =20 of other programs call their xml files differently, for example an svg is= =20 really just a case of an xml, but we almost always cal it .svg. So both of these are equally common, and not just in case of pcb-rnd but=20 generally in IT. A trivial combination would be using something like=20 =2Efp.lht and .pcb.lht, but I haven't yet seen that in the wild with=20 pcb-rnd. Footnote: ^1: the only part where pcb-rnd does anything with the file name is when=20 it constructs default file names for save-as or export. There we follow=20 method 1., but that's just the default name, the user can change it to=20 anything. On any kind of load, pcb-rnd always looks at the file content,=20 not the name. HTH, Igor2 --0-754868227-1565243909=:2358--
Reply subtree:
3258 Re: [pcb-rnd] import modified footprint -- preserve rotation and from ge...@igor2.repo.hu