소스 검색

Change how paneling works a bit

Now the paneling script copies the drc settings from the master
Which is important since ratsnest fills the copperlayers to the
outline according to the drc settings.

Also the Panel now contains two proper copies of the board sides
instead of mirrored copies.
master
Julian Daube 4 년 전
부모
커밋
01f09b8273
2개의 변경된 파일44개의 추가작업 그리고 16개의 파일을 삭제
  1. +41
    -13
      Panel/genpanel.ulp
  2. +3
    -3
      Panel/makefile

+ 41
- 13
Panel/genpanel.ulp 파일 보기

@@ -85,13 +85,13 @@ void delete(string atPoint)


// schliesst die outline
void closeBoundary(real radius, real hoehe, real mittelabstand_links, real mittelabstand_rechts)
void closeBoundary(real slotwidth, real radius, real hoehe, real mittelabstand_links, real mittelabstand_rechts)
{
str += "LAYER 20;\nDISPLAY NONE;\nDISPLAY 20;\n";
// setzt das grid auf mm fuer folgende operationen
str += "GRID mm 0.1;\n";

group(0, hoehe - 0.1, 100, 2);
group(0, hoehe - 0.1, 100, 4);
delete("(C> 0 0)");
delete(Point(10, hoehe));
delete(Point(50-10, hoehe));
@@ -99,13 +99,15 @@ void closeBoundary(real radius, real hoehe, real mittelabstand_links, real mitte
delete(Point(50+10, hoehe));
delete(Point(100-10, hoehe));
delete(Point(0,0));
delete(Point(50,0));

// reproduziere die seitenkanten
line(0, Point( 0, hoehe - radius), "( 0 0)");
line(0, Point(radius, hoehe), Point(25 - mittelabstand_links, hoehe));
line(0, Point(25 + mittelabstand_rechts, hoehe), Point(50 - radius, hoehe));
line(0, Point(0,0), Point(25-slotwidth/2, 0));
line(0, Point(50, 0), Point(25+slotwidth/2, 0));
// reproduziere die abgerundeten ecken
arc(0, Point(0, hoehe - radius), Point(radius, hoehe) , -90);
@@ -121,20 +123,29 @@ void hole(real drill, string point)
str += temp;
}

void placeJlcMark()
{
str += "LAYER 22;\nCHANGE FONT VECTOR;\nGRID mm;\nCHANGE SIZE 0.8;\nCHANGE ALIGN bottom-right;\nTEXT 'JLCJLCJLCJLC' MR0 (51 1);\n";
}

// prozessiert eine seite des PCBs
void side(string name, real originX, real originY, real radius, real hoehe, real abstand_l, real abstand_r) {
void side(string name, real originX, real originY, real slot, real radius, real hoehe, real abstand_l, real abstand_r) {
cut(originX, originY);
edit(name);
clearBrd();

paste(0, 0, 0);
closeBoundary(radius, hoehe, abstand_l, abstand_r);
closeBoundary(slot, radius, hoehe, abstand_l, abstand_r);

// sie panele sollen seitensymmetrisch sein
// damit die zerbrochen platine die trennungsartifakte
// immer auf der rechten bzw. linken seite aufweist
str += "GRID mm;\nGROUP ALL;\nCUT (0 0);\nPASTE MR0 (100 0);\n";
str += "GRID mm;\nGROUP ALL;\nCUT (0 0);\nPASTE R0 (50 0);\n";
// reproduziere die seitenkanten
line(0, Point( 0, hoehe - radius), "( 0 0)");
line(0, Point(100, hoehe - radius), "(100 0)");

// trennungshilfen setzten
real holedrill = 0.5;
real slotwidth = 0.5;
@@ -148,14 +159,13 @@ void side(string name, real originX, real originY, real radius, real hoehe, real
line(slotwidth, Point(50, hoehe-radius-1-numholes), Point(50, numholes));

// alle dimensionsmarken loeschen
str += "DISPLAY none;\ndisplay 47;\ngroup all;\ndelete (C> 0 0);\ndisplay all;\n";
str += "DISPLAY none;\ndisplay 47 48;\nGROUP all;\nDELETE (C> 0 0);\nDISPLAY all;\n";
str += "GRID last;\n";
// fuelle polygone
str += "rats;\n";
//str += "rats;\n";

// jlc markierung plazieren
str += "LAYER 21;\nCHANGE FONT VECTOR;\nGRID mm;\nCHANGE SIZE 0.8;\nTEXT 'JLCJLCJLCJLC' R180 (98 2);\n";
write();
placeJlcMark();
}

// verhindert, dass das skript auf was anderes als boards angewendet wird
@@ -168,21 +178,39 @@ board(B){
// um es spaeter wieder zu oeffnen
string master = B.name;

// save drc settings
string drcfile = "";
sprintf(drcfile, "%s/master_drc_settings", filedir(master));
str += "SET CONFIRM YES; DRC SAVE '" + drcfile + "'; SET CONFIRM OFF;";

// maskieren von Seite 1
str += "DISPLAY all;\n";
group(0, 110, 49.5, -10);
side("SideA.brd", 0,0, radius, hoehe, 6.9, 5.7);
side("SideA.brd", 0,0, 1.7, radius, hoehe, 6.9, 5.7);
// drc einstellungen laden
str += "DRC LOAD '" + drcfile + "';";

// datei speichern
write();

// zurueck zum master fuer seite 2
edit(master);
str += "DISPLAY all;\n";
// maskieren von Seite 2
group(50.5, 110, 100, -10);
side("SideB.brd", 50,0, radius, hoehe, 7.3, 5.9);
side("SideB.brd", 50,0, 0, radius, hoehe, 7.3, 5.9);

// DRC einstellungen laden
str += "DRC LOAD '" + drcfile + "';";

// datei speichern
write();
// master wieder oeffnen
edit(master);

// generierten code als skript zu eagle zurueckgeben
exit(str);
}


+ 3
- 3
Panel/makefile 파일 보기

@@ -2,7 +2,7 @@ EAGLE ?= /usr/bin/eagle
cwd := $(shell pwd)


all: SideA.zip SideB.zip
all: SideA.brd SideB.brd

%.zip: %.brd
# eagle has no option to run the cam processor with a certain
@@ -10,11 +10,11 @@ all: SideA.zip SideB.zip
$(EAGLE) -C "MANUFACTURING CAM;" $<

# generates the panel using the script for eagle
SideA.brd SideB.brd: master.brd
master_drc_settings.dru SideA.brd SideB.brd: master.brd
$(EAGLE) -C "RUN $(cwd)/genpanel.ulp; QUIT;" "$<"

master.brd: ../weihnachtsbaum2.0.brd
cp "$<" "$@"

clean:
rm -rf master.brd SideA.brd SideB.brd *.*#*
rm -rf master.brd master_drc_settings.dru SideA.brd SideB.brd *.*#*

불러오는 중...
취소
저장