Skip to main content
Topic: Cutting mylar stencils with a silohuette cameo (Read 198519 times) previous topic - next topic

Re: Cutting mylar stencils with a silohuette cameo

Reply #90
[quote author="teletypeguy"]Hey Jesus:

Wow, a gui front end -- I can't test it yet, as the cameo is at the office, but that's frickin-awesome.  Thanks!

It seems to only want to open .txt files, but it's easy enough for me to change xyz.spt to xyz.spt.txt.

gil[/quote]

No problem.  After just a few weeks I already forgot how to do the whole thing with gerber2graphtec and I had to check my own instructions in this thread.  Hopefully this simple GUI will help with that in the future.  I used the .txt extension for consistency with earlier posts.  You can use any default extension(s) you want by changing line 185 in g2g_gui.py.

Jesus

Re: Cutting mylar stencils with a silohuette cameo

Reply #91
I just tried the GUI.. and the new OPTIMIZED.py script (just re-placed the original one correct?)  (I made back-up of original as well just to be safe) ;)

results were pretty good/comparable to the originals (maybe a bit better in some areas)

the time seemed faster as well.. but I left and came back so cant be certain as to HOW much faster...

couple things..

the gerber file you choose HAS to have the .g extension?  not that I mind.. just curious.. I am having to go back and change the extension so the GUI will use the gerber I choose/pick..


also.. I am seeing this in the command window:  (Im on Windows XP)

Problem during opening C:Program Filespstoeditdrvmagick.dll:The specified pro
cedure could not be found.

Problem during opening of pstoedit driver plugin: C:Program Filespstoeditdrvm
agick.dll. This is no problem as long the driver in this library is not needed.
Possibly you need to install further libraries and/or extend the LD_LIBRARY_PATH
 (*nix) or PATH (Windows) environment variables.
        1 file(s) copied.

I checked the directory.. that .dll is 100% 'there' in the same path it says...

any ideas?

here is my GUI settings by the way (again Im on Windows XP.. notice the no (x86) in the pathing..


Im VERY stoked that 'all' of this has turned out so well....

this will save me TONS of time and money is prototyping!!


thanks again to everyones hard work.. (and sharing it!)




update:

I just realized it didnt even cut the correct gerber file I picked in the GUI?  it picked an OLDER one I had done before?

I also am noticing.. I dont see a new .pdf file being created ..  hmmm......


*I think I found the problem..  the name had a SPACE in it..  (grabbed a different random file for testing..didnt notice the space in name)

fixed that and now things are as normal.. waiting to see the final results for GUI and new optimized.py on the new stencil.

Re: Cutting mylar stencils with a silohuette cameo

Reply #92
[quote author="xl97"]
the gerber file you choose HAS to have the .g extension?  not that I mind.. just curious.. I am having to go back and change the extension so the GUI will use the gerber I choose/pick..
[/quote]

Not really.  Both the Gerber file and the output file can have any extension.  You can always show all the files in the open file dialog box by typing "*.*" in the "File name:" field and pressing the Enter key.  If you prefer you can change lines 180 and 185 or g2g_gui.py to allow for any extensions you would like.  For example, you can change line 180 to:

input_filename=tkFileDialog.askopenfilename(title='Select paste mask Gerber file', filetypes=[('Gerber File', '*.g*'),("All files", "*.*")] )

In Altium and Traxmaker the Gerber file extensions start with 'g'.  What program are you using?  What is the default extension for the paste mask?

[quote author="xl97"]
also.. I am seeing this in the command window:  (Im on Windows XP)

Problem during opening C:Program Filespstoeditdrvmagick.dll:The specified procedure could not be found.
[/quote]

Sorry, I don't have an XP computer available now.  Something you can try is adding C:Program Filespstoedit to the path.  Instructions are all over the net.  For example:

http://http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx

[quote author="xl97"]
here is my GUI settings by the way (again Im on Windows XP.. notice the no (x86) in the pathing..
[/quote]

To make sure you are cutting the right file, provide a full path for the output: Instead of just 'result.txt' use 'C:/gerber-files-to-cut/result.txt'.

[quote author="xl97"]
this will save me TONS of time and money is prototyping!!
[/quote]

:)  I think the stencils are also adequate for small production runs.  Even it the stencil breaks, they are so cheap and fast to cut...  I have applied solder paste to four PCBs with the same stencil using a metal spatula.  After cleaning the stencil with isopropyl alcohol, it still looks like new.

[quote author="xl97"]
I also am noticing.. I dont see a new .pdf file being created ..  hmmm......
[/quote]

The temporary files used by gerber2graphtec  (_tmp_gerber.pdf and _tmp_gerber.pic) are created in the current active folder.  For g2g_gui.py they should be in the folder where the script is installed.

Jesus

Re: Cutting mylar stencils with a silohuette cameo

Reply #93
hi,

i've been following this for a couple days, and boy do i wish i understood the half of it, because it would be super awesome to know.

i am wanting to make a super detailed stencil with my machine altho not for the same purposes. I build my stencils in Adobe Illustrator so my issue is that i can't export to a Gerber file .GBR

But I can export my file to several different formats including:
.EPS
.DXF
.PLT
.GSD
.HPG
.RTL
.to name a few

Is there some way i could use one of these formats to run in that program on my mac?

Re: Cutting mylar stencils with a silohuette cameo

Reply #94
@jesuscf-

thanks.. I'll try to check out that link and see what the problem is..

I did find out (last part of my previous post), that I cold NOT have a space int he file name (using a random gerber file "I" didnt create or name as a test).. found out fixing the space also fixed the error of not getting a.pdf created..etc..


Also.. I use Eagle as mypcb design software..  however.. it 'really' depends on the CAM job you use to export/create your gerber files..

usually people use the CAM job file that comes from the pcb fab house they plan on using..

this names the gerber files to whatewver THEY use or are looking for (as far as the naming convention)..

I use the CAM job file from iTeadStudios..

not really a 'problem'.. just an odd break in workflow when I realize I need to go back and change the extension is all :)


quick fix list for me:

1.) Change g2g_gui.py script to allow any gerber file extension:

*change lines 180 and 185 or g2g_gui.py to allow for any extensions you would like. For example, you can change line 180 to:
Quote
input_filename=tkFileDialog.askopenfilename(title='Select paste mask Gerber file', filetypes=[('Gerber File', '*.g*'),("All files", "*.*")] )

2.) Another attempt at fixing the .dll PATH error?

*try is adding C:Program Filespstoedit to the path
Quote
http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx





@ivin -

Im not sure about you being able to use the G2G python script based approach as I am not sure about it handling/reading any sort of output from Adobe Illustrator..

can you try to re-draw the stencil in Eagle?  and then use either of the methods explored in this thread?

Re: Cutting mylar stencils with a silohuette cameo

Reply #95
[quote author="xl97"]
I did find out (last part of my previous post), that I cold NOT have a space int he file name (using a random gerber file "I" didnt create or name as a test).. found out fixing the space also fixed the error of not getting a.pdf created..etc..
[/quote]

Oops!  I forgot to add some double quotes here and there to account for filenames with spaces.  Here is the fixed script.

Edited: made some changes to g2g_gui.py so it runs also on Windows XP.

[attachment=0]

Re: Cutting mylar stencils with a silohuette cameo

Reply #96
great!..

while "I" personally never used spaces (camel syntax of underscores)..  this will be a great 'catch-all'  :)

still havent looked into fixing that path error yet..  LOL  :(



update:

tried add the path to the environmental variables..


I followed the steps in the link provided (although its for Win 7)


added this line to the end of all there stuff that was already there:

;C:Program Filespstoeditdrvmagick.dll




didnt work.. still getting this message/error in the CMD prompt window:


'C:Program' is not recognized as an internal or external command,
operable program or batch file.
Problem during opening C:Program Filespstoeditdrvmagick.dll:The specified pro
cedure could not be found.

Problem during opening of pstoedit driver plugin: C:Program Filespstoeditdrvm
agick.dll. This is no problem as long the driver in this library is not needed.
Possibly you need to install further libraries and/or extend the LD_LIBRARY_PATH
 (*nix) or PATH (Windows) environment variables.
        1 file(s) copied.


now the file still cuts....?  and seems to be ok..  so Im not sure what is going on here?

thanks!

Re: Cutting mylar stencils with a silohuette cameo

Reply #97
[quote author="xl97"]
'C:Program' is not recognized as an internal or external command,
operable program or batch file.
Problem during opening C:Program Filespstoeditdrvmagick.dll:The specified pro
cedure could not be found.
[/quote]

After installing Windows XP in VirtualBox I was able to test the script.  I did encounter the "'C:Program' is not recognized" error.  For some reason os.system() in python works differently in XP and 7 if called from a GUI.  I had to create an intermediate batch file first (_tmp_gerber.bat) with the gerbv and pstoedit commands, and then run the batch file.  I updated the script in the previous post with the required changes.  I didn't encounter the second problem but I got a MSVCR100.dll not found error.  After installing the Microsoft Visual C++ 2010 Redistributable Package (X86) the MSVCR100.dll not found error was resolved.

Also, added double quotes to all files and fixed a bug while selecting the output file.

Jesus

Re: Cutting mylar stencils with a silohuette cameo

Reply #98
hmm..

Im not sure what is going on over here now.. LOL

somehow.. Im back to a non-working platform here..

I can NOT seem to generate a new .pdf file?  never updates.. and is still the OLD one from before..

going to update the new-new GUI.py file..

updating the .gui file seems to allow me to make .pdf's again.. (yeah)

but now I get this in the command window:

Quote
C:gerber-files-to-cutgerber2graphtec>"C:Program Filesgerbv-2.6.0bing
xe" --export=pdf --output=C:gerber-files-to-cutgerber2graphtec_tmp_gerb
 --border=0 "C:gerber-files-to-cutgerber2graphtecRepulsor-bottom_stenci
gbr"

C:gerber-files-to-cutgerber2graphtec>"C:Program Filespstoeditpstoedit
-q -f pic "C:gerber-files-to-cutgerber2graphtec_tmp_gerber.pdf" "C:ger
les-to-cutgerber2graphtec_tmp_gerber.pic"
Problem during opening C:Program Filespstoeditdrvmagick.dll:The specifi
cedure could not be found.

Problem during opening of pstoedit driver plugin: C:Program Filespstoedi
agick.dll. This is no problem as long the driver in this library is not ne
Possibly you need to install further libraries and/or extend the LD_LIBRAR
 (*nix) or PATH (Windows) environment variables.


I do see the new .bat file as well:

_tmp_gerber.bat


I 'have' added the path:

;C:Program Filespstoeditdrvmagick.dll  to the environment variables panel too..

at this point.. Im lost as to how to fix this error.. :)  I didnt even get to the point of the MSVCR100.dll error message yet..

Re: Cutting mylar stencils with a silohuette cameo

Reply #99
[quote author="xl97"]hmm..

;C:Program Filespstoeditdrvmagick.dll  to the environment variables panel too..

at this point.. Im lost as to how to fix this error.. :)  I didnt even get to the point of the MSVCR100.dll error message yet..
[/quote]

";C:Program Filespstoeditdrvmagick.dll"  is incorrect.  It should be only ";C:Program Filespstoedit".

Re: Cutting mylar stencils with a silohuette cameo

Reply #100
correct it.. still same results..

do I need to reboot the machine perhaps?  (I havent been)

Re: Cutting mylar stencils with a silohuette cameo

Reply #101
[quote author="xl97"]correct it.. still same results..

do I need to reboot the machine perhaps?  (I havent been)[/quote]

Wait a minute!  My fresh installation of pstoedit on Windows XP has no drvmagick.dll:

Code: [Select]
 Directory of C:Program Filespstoedit

06/01/2013  10:05 AM    <DIR>          .
06/01/2013  10:05 AM    <DIR>          ..
04/28/2013  08:27 PM          640,512 drvlplot.dll
04/28/2013  08:27 PM          294,400 drvswf.dll
12/03/2004  10:55 PM              315 examplefigmap.fmp
08/13/2001  07:44 PM          211,231 latex2e.fmp
08/13/2001  07:44 PM          296,447 mpost.fmp
04/28/2013  08:27 PM          495,104 pstoedit.dll
04/28/2013  08:27 PM            8,192 pstoedit.exe
04/28/2013  08:18 PM            78,129 pstoedit.htm
08/10/2009  04:37 PM            3,772 readme.wri
04/28/2013  08:27 PM          462,848 stddrivers.dll
11/01/2001  10:10 PM            1,096 svg.fmp
06/01/2013  10:05 AM            1,709 unins000.dat
06/01/2013  10:05 AM          716,126 unins000.exe
04/28/2013  03:43 PM              143 unix.fmp
08/13/2001  07:44 PM              615 wemf.fmp
04/28/2013  03:43 PM              146 windows.fmp
              16 File(s)      3,210,785 bytes
              2 Dir(s)  1,336,655,872 bytes free

C:Program Filespstoedit>

Some forums suggest removing that dll to get rid of the error.

Jesus

Re: Cutting mylar stencils with a silohuette cameo

Reply #102
Quote
can you try to re-draw the stencil in Eagle? and then use either of the methods explored in this thread?

I managed to load my .DXF file into Eagle and go from there.

I was hoping that I would be able to use that wonderful GUI on the mac. but I’m not sure if its developed more for the PC. when i go to select a file it doesn’t give me the option to select the .GBR. I've tried this:

Quote
input_filename=tkFileDialog.askopenfilename(title='Select paste mask Gerber file', filetypes=[('Gerber File', '*.g*'),("All files", "*.*")] )

Its not changing my results, But I’m not sure if its relevent to the mac as i know nearly nothing about script.

Re: Cutting mylar stencils with a silohuette cameo

Reply #103
ok i've got it figured somehow

http://stackoverflow.com/questions/5542 ... ot-working

just have to delete the:

, filetypes=[('Gerber File', '*.g*'),("All files", "*.*")]

of corse i figure that out and then run into the next issue. where im on a mac and Cant run gerbv.exe or pstoedit.exe.

Im trying to figure out whats happening in this program. It's taking a Gerber file, converting it to a .PDF with gerbv then to a PIC with pstoedit, and run thru the rest of the code?

i guess i just dont really know whats happening in here.. Any possibility of a simplified breakdown of the flow of information?

Re: Cutting mylar stencils with a silohuette cameo

Reply #104
from what I understand.. you have the process correct...

it also created a .txt file that outputs all the coords the cutter needs to be at/go to for the stencils..

I believe the TXT data is what is sent to the CAMEO..