|
Post by hcm2011 on Feb 10, 2019 22:36:52 GMT
There are many more size options from 1x1 to 4x6 but the file was too big to copy and paste. My worry about the bmp size was if other peoples computers saved on another format if that would screw up the code that I still have to write for the run section.
nomainwin
[start.main]
WindowWidth = DisplayWidth -100
WindowHeight = DisplayHeight-100
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
BackgroundColor$="black"
menu #main, "SIZE", "1X1", [onSIZE1X1], "1X2", [onSIZE1X2], "1X3", [onSIZE1X3], "1X4", [onSIZE1X4], "1X5", [onSIZE1X5], "1X6", [onSIZE1X6], "2X2", [onSIZE2X2], "2X3", [onSIZE2X3], "2X4", [onSIZE2X4], "2X5", [onSIZE2X5], "2X6", [onSIZE2X6], "3X3", [onSIZE3X3], "3X4", [onSIZE3X4], "3X5", [onSIZE3X5], "3X6", [onSIZE3X6], "4X4", [onSIZE4X4], "4X5", [onSIZE4X5], "4X6", [onSIZE4X6]
open "EASY-PCB VER1.01" for graphics as #main
print #main, "down; fill black; flush"
print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 0 16"
print #main, "color red; backcolor black"
print #main, "place 20 ";WindowHeight-625
print #main, "\SELECT BOARD SIZE FROM DROP DOWN LIST ABOVE"
print #main, "place 20 ";WindowHeight-575
print #main, "\NOTES:"
print #main, "place 20 ";WindowHeight-550
print #main, "\THE UNDO BUTTON WILL DISCARD ONLY THE MOST PREVIOUS ADDITION"
PRINT #main, "place 20 ";WindowHeight-525
print #main, "\THE CLEAR SCREEN BUTTON WILL DISCARD EVERYTHING AND REDRAW THE ORIGINAL GRID PATTERN"
print #main, "place 20 ";WindowHeight-100
print #main, "\CREATED BY HCM2011 EASY-PCB VER1.001 COPYRIGHT 2019"
wait
[quit.main]
Close #main
END
[onSIZE1X1]
WindowWidth = DisplayWidth-100
WindowHeight = DisplayHeight-100
UpperLeftX=int((DisplayWidth-WindowWidth)/2)
UpperLeftY=int((DisplayHeight-WindowHeight)/2)
BackgroundColor$="black"
graphicbox #SIZE1X1.graphicbox1, ((WindowWidth-100)/2),((WindowHeight-100)/2), 100, 100
textbox #SIZE1X1.field0, 0, 0, 150, 25
textbox #SIZE1X1.field1, 0, 25, 150, 25
textbox #SIZE1X1.field2, 0, 50, 150, 25
textbox #SIZE1X1.field3, 0, 75, 150, 25
textbox #SIZE1X1.field4, 600, 0, 150, 25
textbox #SIZE1X1.field5, 600, 25, 150, 25
textbox #SIZE1X1.field6, 600, 50, 150, 25
textbox #SIZE1X1.field7, 600, 75, 150, 25
textbox #SIZE1X1.field8, 0, 100, 150, 25
button #SIZE1X1, "DRAW TRACE", [TRACE11], UL, 0, 150, 200, 25
button #SIZE1X1, "DRAW SQUARE/RECTANGLE", [SQUARE11], UL, 0, 175, 200, 25
button #SIZE1X1, "DRAW PAD", [PAD11], UL, 0, 200, 200, 25
button #SIZE1X1, "DRAW HOLE", [HOLE11], UL, 0, 225, 200, 25
button #SIZE1X1, "DRAW TEXT", [TEXT11], UL, 0, 250, 200, 25
button #SIZE1X1, "UNDO LAST", [UNDO11], UL, 0, 275, 200, 25
button #SIZE1X1, "CLEAR SCREEN", [CLEAR11], UL, 0, 300, 200, 25
button #SIZE1X1, "SAVE", [SAVE11], UL, 0, 350, 200, 25
textbox #SIZE1X1.field9, 0, 375, 200, 25
textbox #SIZE1X1.field10, 0, 400, 200, 25
button #SIZE1X1, "RUN EASY-PCB CUTTER", [RUN11], UL, 0, 425, 200, 25
open "SIZE 1X1" for graphics as #SIZE1X1
print #SIZE1X1.graphicbox1,"down; fill red; flush BACKGROUND"
print #SIZE1X1.graphicbox1,"color black; down; size 1; line 9.5 0 9.5 100; line 19.5 0 19.5 100; line 29.5 0 29.5 100; line 39.5 0 39.5 100; line 49.5 0 49.5 100; line 59.5 0 59.5 100; line 69.5 0 69.5 100; line 79.5 0 79.5 100; line 89.5 0 89.5 100; flush LINES1"
print #SIZE1X1.graphicbox1,"color black; down; size 1; line 0 9.5 100 9.5; line 0 19.5 100 19.5; line 0 29.5 100 29.5; line 0 39.5 100 39.5; line 0 49.5 100 49.5; line 0 59.5 100 59.5; line 0 69.5 100 69.5; line 0 79.5 100 79.5; line 0 89.5 100 89.5; flush LINES2"
print #SIZE1X1, "fill black; color red; backcolor black; place 580 280"
print #SIZE1X1, "\X.10"
print #SIZE1X1, "place 680 280"
print #SIZE1X1, "\X1.00"
print #SIZE1X1, "place 555 300"
print #SIZE1X1, "\Y.10"
print #SIZE1X1, "place 555 400"
print #SIZE1X1, "\Y1.00"
print #SIZE1X1, "place 150 25"
print #SIZE1X1, "\X1 STARTING POINT 0.100 INCH FOR ALL ITEMS"
print #SIZE1X1, "place 150 50"
print #SIZE1X1, "\Y1 STARTING POINT 0.100 INCH FOR ALL ITEMS"
print #SIZE1X1, "place 150 75"
print #SIZE1X1, "\X2 ENDING POINT FOR TRACES 0.100 INCH"
print #SIZE1X1, "place 150 100"
print #SIZE1X1, "\Y2 ENDING POINT FOR TRACES 0.100 INCH"
print #SIZE1X1, "place 750 25"
print #SIZE1X1, "\RADIUS FOR CIRCLES AND HOLES 0.100 INCH"
print #SIZE1X1, "place 750 50"
print #SIZE1X1, "\WIDTH FOR SQUARES AND RECTANGLES 0.100 INCH"
print #SIZE1X1, "place 750 75"
print #SIZE1X1, "\HEIGHT FOR SQUARES AND RECTANGLES 0.100 INCH"
print #SIZE1X1, "place 750 100"
print #SIZE1X1, "\TEXT TO BE CUT ON BOARD"
print #SIZE1X1, "place 150 125"
print #SIZE1X1, "\TRACE WIDTH IN 0.100 INCH"
print #SIZE1X1, "flush GRID"
print #SIZE1X1, "place 200 400"
print #SIZE1X1, "\COM PORT"
print #SIZE1X1, "place 200 425"
print #SIZE1X1, "\BAUD RATE (9600)"
print #SIZE1X1, "trapclose quit"
print #SIZE1X1, "font ms_sans_serif 0 16"
wait
[TRACE11]
print #SIZE1X1.field0, "!contents? x1$"
print #SIZE1X1.field1, "!contents? y1$"
print #SIZE1X1.field2, "!contents? x2$"
print #SIZE1X1.field3, "!contents? y2$"
print #SIZE1X1.field8, "!contents? tsize$"
print #SIZE1X1.graphicbox1, "color green"
print #SIZE1X1.graphicbox1, "down"
print #SIZE1X1.graphicbox1, "size "; tsize$
print #SIZE1X1.graphicbox1, "line "; x1$;" ";y1$;" ";x2$;" ";y2$
print #SIZE1X1.graphicbox1, "flush"
wait
[SQUARE11]
print #SIZE1X1.field0, "!contents? x1$"
print #SIZE1X1.field1, "!contents? y1$"
print #SIZE1X1.field5, "!contents? width$"
print #SIZE1X1.field6, "!contents? height$"
print #SIZE1X1.graphicbox1, "color green; backcolor green"
print #SIZE1X1.graphicbox1, "place "; x1$;" ";y1$
print #SIZE1X1.graphicbox1, "down"
print #SIZE1X1.graphicbox1, "boxfilled "; width$;" ";height$
print #SIZE1X1.graphicbox1, "flush"
wait
[PAD11]
print #SIZE1X1.field0, "!contents? x1$"
print #SIZE1X1.field1, "!contents? y1$"
print #SIZE1X1.field4, "!contents? diameter$"
print #SIZE1X1.graphicbox1, "color green; backcolor green"
print #SIZE1X1.graphicbox1, "place "; x1$;" ";y1$
print #SIZE1X1.graphicbox1, "down"
print #SIZE1X1.graphicbox1, "circlefilled "; diameter$
print #SIZE1X1.graphicbox1, "flush"
wait
[HOLE11]
print #SIZE1X1.field0, "!contents? x1$"
print #SIZE1X1.field1, "!contents? y1$"
print #SIZE1X1.field4, "!contents? diameter$"
print #SIZE1X1.graphicbox1, "color blue; backcolor blue"
print #SIZE1X1.graphicbox1, "place "; x1$;" ";y1$
print #SIZE1X1.graphicbox1, "down"
print #SIZE1X1.graphicbox1, "circlefilled "; diameter$
print #SIZE1X1.graphicbox1, "flush"
wait
[TEXT11]
print #SIZE1X1.field0, "!contents? x1$"
print #SIZE1X1.field1, "!contents? y1$"
print #SIZE1X1.field7, "!contents? text$"
print #SIZE1X1.graphicbox1, "color green; backcolor white"
print #SIZE1X1.graphicbox1, "place "; x1$;" ";y1$
print #SIZE1X1.graphicbox1, "down"
print #SIZE1X1.graphicbox1, "\ "; text$
print #SIZE1X1.graphicbox1, "flush"
wait
[UNDO11]
print #SIZE1X1.graphicbox1, "segment drawSegment"
print #SIZE1X1.graphicbox1, "delsegment "; drawSegment - 1
print #SIZE1X1.graphicbox1, "redraw"
wait
[CLEAR11]
print #SIZE1X1.graphicbox1, "cls"
print #SIZE1X1.graphicbox1, "redraw"
print #SIZE1X1.graphicbox1,"down; fill red; flush BACKGROUND"
print #SIZE1X1.graphicbox1,"color black; down; size 1; line 9.5 0 9.5 100; line 19.5 0 19.5 100; line 29.5 0 29.5 100; line 39.5 0 39.5 100; line 49.5 0 49.5 100; line 59.5 0 59.5 100; line 69.5 0 69.5 100; line 79.5 0 79.5 100; line 89.5 0 89.5 100; flush"
print #SIZE1X1.graphicbox1,"color black; down; size 1; line 0 9.5 100 9.5; line 0 19.5 100 19.5; line 0 29.5 100 29.5; line 0 39.5 100 39.5; line 0 49.5 100 49.5; line 0 59.5 100 59.5; line 0 69.5 100 69.5; line 0 79.5 100 79.5; line 0 89.5 100 89.5; flush"
wait
[SAVE11]
print #SIZE1X1.graphicbox1, "delsegment BACKGROUND"
print #SIZE1X1.graphicbox1, "delsegment LINES1"
print #SIZE1X1.graphicbox1, "delsegment LINES2"
print #SIZE1X1.graphicbox1, "delsegment GRID"
print #SIZE1X1.graphicbox1, "redraw"
print #SIZE1X1, "getbmp drawing "; ((WindowWidth-100)/2); " ";((WindowHeight-100)/2);" 100 100"
bmpsave "drawing", "EASY-PCB1X1.bmp"
notice "FILE SAVED AS EASY-PCB1X1.bmp IN THE EASY-PCB DIRECTORY FOLDER. RENAME BEFORE SAVING ANOTHER PCB"
wait
[RUN11]
print #SIZE1X1.graphicbox1, "delsegment BACKGROUND"
print #SIZE1X1.graphicbox1, "delsegment LINES1"
print #SIZE1X1.graphicbox1, "delsegment LINES2"
print #SIZE1X1.graphicbox1, "delsegment GRID"
print #SIZE1X1.graphicbox1, "redraw"
Com = 16384
print #SIZE1X1.field9, "!contents? ardcom$"
print #SIZE1X1.field10, "!contents? ardbaud$"
open "com";ardcom$;":";ardbaud$;",n,8,1,ds0,cs0,rs" for random as #commHandle
'ENTER PRINT CODE HERE
close #commHandle
wait
|
|