ho provato a modificare qualche riga di un ULP: origins.ULP ho un problema con le coordinate
se dal comando info un componete risulta avere origine x=25,5 y=8
dall'ULP risulta x=25,6 y=8,16
notasi che originariamente veniva diviso per 2,54 nel codice,in modo da uscire con le misure in inches
Togliendo questa divisione e altre e tenendomi quindi la posizione in micron o in decimi o centisimi non cambia,ottengo sempre 2,56 e una fila di zeri di varia lunghezza.
Cosa vuol dire?
era
if (isSMD != 0) { real xr, yr; xr = E.x / 10; // x coord in micrometers yr = E.y / 10;
"blisca" ha scritto nel messaggio news:l1svrh$l5c$ snipped-for-privacy@speranza.aioe.org...
ecco qui ,risolto,per estrarre le coordinate ho utilizzato la forma u2mm(E.x) ,e sembra corretto- Chi volesse provare salvi la parte sottostante alla fila di asterischi col nome di origins_mm_ita.ulp ,o altro nome .ulp
/* * $Id: //DukePro/eagle/ulp/origins.ulp#4 $ * $DateTime: 2011/07/23 09:51:45 $ * * This will emit a list of parts with SMD pads and their origins. */ #usage "Produces a CSV list of parts with SMD pads, their orgins," " and whether each is placed on the top of the board or the bottom."
string partName[], partPackage[],partValue[]; real partX[], partY[], partA[]; int partMirror[]; int numParts = 0; real xExtent = 0.0; real yExtent = 0.0;
void CollectPartData(void) { board(B) { int xExtentInt = 0; int yExtentInt = 0;
/* * Look for the wires in the Dimension layer. Identify the largest * X value. */ B.wires(W) { if (W.layer == 20) { if (W.x1 > xExtentInt) xExtentInt = W.x1; if (W.x2 > xExtentInt) xExtentInt = W.x2; if (W.y1 > yExtentInt) yExtentInt = W.y1; if (W.y2 > yExtentInt) yExtentInt = W.y2; } }
// Convert from tenths of micrometers to mils xExtent = xExtentInt / 1; yExtent = yExtentInt / 1;
B.elements(E) { int isSMD = 0;
isSMD = 0; E.package.contacts(C) { if (C.smd) { isSMD = 1; break; } } if (isSMD != 0) { real xr, yr; xr = 10000*u2mm(E.x) ; // x coord in micrometers yr = 10000*u2mm(E.y) ;
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.