[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb: experience with import-schematics



DJ Delorie wrote:

> Well, you'll have to help with this then...
(...)
>for (i=0; i<MAX_ELEMENTNAMES; i++)
> {
> pe->Name[i].X = e->Name[i].X - mx;
> pe->Name[i].Y = e->Name[i].Y - my;
> pe->Name[i].Direction = e->Name[i].Direction;
> pe->Name[i].Scale = e->Name[i].Scale;
> }

Ok, found it.
The names need an additional shift by the coordinates of the mark of the new 
element. This translates the code snippet to:

      for (i=0; i<MAX_ELEMENTNAMES; i++)
	{
	  pe->Name[i].X = e->Name[i].X - mx + pe->MarkX ;
	  pe->Name[i].Y = e->Name[i].Y - my + pe->MarkY ;
	  pe->Name[i].Direction = e->Name[i].Direction;
	  pe->Name[i].Scale = e->Name[i].Scale;
	}

The mark of footprints in the default lib are located at 0/0. So the bug 
does not show with them. By contrast, footprint made with the GUI typically 
have a large offset. (What determines its size?)

Should I produce a patch file?

---<)kaimartin(>--- 
-- 
Kai-Martin Knaak                                  tel: +49-511-762-2895
UniversitÃt Hannover, Inst. fÃr Quantenoptik      fax: +49-511-762-2211	
Welfengarten 1, 30167 Hannover           http://www.iqo.uni-hannover.de
GPG key:    http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmk&op=get



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user