Benbox Laser Machines/CO2 Lasers/3D Printers

Software => T2 Engraving => Topic started by: Kunaphil on November 08, 2016, 04:52:27 PM

Title: GBR files
Post by: Kunaphil on November 08, 2016, 04:52:27 PM
Can anyone tell me if the T2 Software can support GBR files? Or, can these be converted? ::)

thanks,

Phil
Title: Re: GBR files
Post by: Zax on November 08, 2016, 05:11:49 PM
I've never heard of GBR files, which probably tells you that T2Laser doesn't support them.

Let me do some research and see if they're easily supported. It depends if the format is open source or documented, many require expensive licenses or libraries that excludes them.

Edit: OK, Gerber files... now I know what they are and it appears the standard may be published which means I can write an importer if others are interested, otherwise a converter may be available.

Edit2: So there are 3 versions, the Standard (1st version) is very similar to PLT so I could add that fairly easily, the Extended (2nd version) is slightly more complex and the latest revision X2 even more so. Which version would you be interested in?

Latest spec: https://www.ucamco.com/files/downloads/file/81/the_gerber_file_format_specification.pdf
Title: Re: GBR files
Post by: Kunaphil on November 09, 2016, 06:06:29 AM
Zax,  I am not sure.  I have some Gerber files that are fairly old, and most of the software now days can't convert them. 
Title: Re: GBR files
Post by: ggallant571 on November 09, 2016, 06:56:02 AM
I am quite confused. Gerber file are used for PCB artwork. GRBL files are slang for a particular invocation of a G-CODE interpreter. Is your intention to etch PCB boards or cut solder templates?
Title: Re: GBR files
Post by: Zax on November 09, 2016, 07:41:17 AM
Perhaps the easiest way is for you to post a couple of examples, then I can see if it is something I will support.
Title: Re: GBR files
Post by: Kunaphil on November 09, 2016, 10:31:28 AM
here is one.
Title: Re: GBR files
Post by: Zax on November 09, 2016, 10:51:43 AM
These look like the original format which is now deprecated. I think your best bet is to convert them to DXF, let me see if I can import them.
Title: Re: GBR files
Post by: Kunaphil on November 09, 2016, 04:03:24 PM
Any luck with importing the files?
Title: Re: GBR files
Post by: Zax on November 09, 2016, 04:40:07 PM
I was able to view them but couldn't save as DXF, can you save as PDF from the program you use to generate them? If not, does it have any other options for save.
Title: Re: GBR files
Post by: Kunaphil on November 10, 2016, 07:16:33 AM
Zax,
Unfortunately I don't have the program that these were generated on.  They were given to me and the originator is deceased.  I will try to convert them and see what happens.  Thank you for your help.

Phil
Title: Re: GBR files
Post by: Zax on November 10, 2016, 07:37:04 AM
I was able to load both layers using ViewPlot software, unfortunately the trial only allows viewing and not export. The license is over $600 so not cheap.

I did find another program that is free, it converts to EPS but then you need to convert that to DXF. Perhaps you can find a viewer which will save PDF and then import those to T2Laser.

It is something I could add if there's more interest but considering it is an old format I don't think it will be popular.
Title: Re: GBR files
Post by: Kunaphil on November 10, 2016, 10:08:52 AM
Zax,
I do know that this format is pretty much dead, but I know that there are a lot of files out there on the  web and some people that are interested in purchasing a laser to be able to make printed circuit boards.  I will look around to find a program that I can convert these.  By the way, I see that you have upgraded the t2 laser software again.  can you tell what improvements have been made or are they just bug fixes? 
thanks again,

Phil
Title: Re: GBR files
Post by: Kunaphil on November 10, 2016, 10:42:53 AM
Zax, can you tell me what the free program is?
Title: Re: GBR files
Post by: Zax on November 10, 2016, 11:00:33 AM
It was called GBR2EPS (I think), I did not try it.

In the Updates thread I try to post what changes are made to each version, the latest 1.3k is mainly bug fixes.

If there isn't a simple converter available and enough people want the format I could support it, but it seems like the easier method is to save as DXF or PDF and load it to T2Laser.
Title: Re: GBR files
Post by: Kunaphil on November 11, 2016, 06:55:44 AM
Gallant,
Yes, it is my intension to etch circuit boards. Sorry for the confusion.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 08:25:22 AM
Gallant,
Yes, it is my intension to etch circuit boards. Sorry for the confusion.

How do you plan to achieve the laser etching? These laser diodes are not powerful enough to remove the copper, and if you want to use photosensitive PCBs you could use pcb2gcode and its isolation routing feature to activate the photosensitve film (make sure you get positive photoresist as the area exposed to the laser will become soluble and removed with the developer, allowing the etchant to remove the copper that pcb2gcode intended to be milled away)
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 08:32:59 AM
(Or find a way to invert it and use the more readily available negative film. I only seem to be able find somewhat expensive positive pcb's complete with film applied)
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 08:58:40 AM
You could check out flatcam, seems they have some interest in combining lasers and gerber

http://flatcam.org/download

http://flatcam.org/discussion#!/usage:laser-drawing-with-uv
http://flatcam.org/discussion#!/developers:flatcam-as-a-regular-plot

Other options include Gerbv  to convert to .png (and either raster it from there, or use Inkscape to convert .png to .svg). Although it looked like flatcam might be able to go straight from gerber to .svg.
Title: Re: GBR files
Post by: Zax on November 11, 2016, 10:59:27 AM
Are there any more votes to add this import to T2Laser?
Title: Re: GBR files
Post by: Agastar on November 11, 2016, 11:02:10 AM
yes, I could use it for etching PCBs as well.
Title: Re: GBR files
Post by: Zax on November 11, 2016, 11:05:14 AM
OK... Agastar has spoken, so I will see what I can do.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 11:35:28 AM
Apart form the windows only part I'd use a PCB function; I did look at the gerber in this thread and they are using the obsolete RS-274D format, and looking at your rendering is apparent that they are also incomplete without aperture files. So you would need aperture files or definitions for RS-274D. Support for RS-274X or 2X you could look to the flatcam source for inspiration.  Let me know if you do implement it, I could help test KiCam output.
Title: Re: GBR files
Post by: ggallant571 on November 11, 2016, 11:37:49 AM
Will you support both the obsolete 274D and the current 274X formats.
Title: Re: GBR files
Post by: Zax on November 11, 2016, 11:51:00 AM
I was only planning to support the 274D format (yes, the obsolete... don't use it, forget it was ever made one) and although several programs I tried didn't load them because of the missing aperture file I think it's possible to workaround that as the one software I used seemed to display it OK. Of course I am not familiar with what it should look like but we will see when I convert it to G-code.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 12:03:46 PM
the one software I used seemed to display it OK

Not quite, seemed to me the filled area was vertical and horizontal hatched with quite a wide gap, and all traces had the same width - which is possible, but unlikely. The aperture file would essentially contain information of the line width used to stroke the different paths.
Title: Re: GBR files
Post by: Zax on November 11, 2016, 12:24:52 PM
That may be true, and now I start looking at their format this really isn't suitable for vector engraving, it's basically a filled vector and as you say, without the aperture file it's going to be a "guess".

I think it may be better suited to saving as a PNG or something and raster engraving.

What I really need are several complete files and an image showing what it should look like so I can make an informed decision on how best to support it, or if it even makes sense.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 12:50:40 PM
I noticed gerbv said it detected RS-274D and decided to try to load it, but failed to render it as the aperture definitions were missing.

Does Kunaphil have aperture files for these boards?

Given the need for filled sections I would think rastering would be a good approach anyway. Although I will be looking at a way to do the outlines as vectors and filling in with rastering aftewards, in an attempt to get the best possible edge definition. Having a zigzagged edge would be the theoretical equivalent of antennas every 0.1mm, probably more of a theoretical problem for most designs, but still, no reason not to aim for perfection.

Title: Re: GBR files
Post by: Kunaphil on November 11, 2016, 01:25:15 PM
All,
I am sorry.  I didn't include the .apt file.
Here it is.

thanks,
Phil
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 01:32:16 PM
That looks to be working rather well, but have you given any though on the negative/positive photoresist as it would greatly affect the rest of the process.

Edit: Rendering is screenshot from GC Prevue, should be able to print to .pdf and raster the image from there
Title: Re: GBR files
Post by: Kunaphil on November 11, 2016, 01:38:32 PM
beikeland,

the method I have been using is painting the copper board with black paint and burning it off with the laser.  then I use the etching solution to remove the exposed copper.  I have done this in the past with more simple boards and has worked well.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 01:53:02 PM
That would be a positive process then, and you would need the inverted image, or isolation routing mentioned before. The means to achieve the exposed copper is of less importance, I just suck at spray painting so I use the dry film laminated onto the board, or ready made boards with the film pre-applied.

The isolation routing would be preferable as you don't etch more than you have to, but for some applications leaving isolated/floating islands of copper fill may be undesirable.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 01:57:07 PM
(Well, it might not be 100% correct to call it a positive process, but still you need to not laser the actual tracks)
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 02:05:43 PM
I'll attach a .pdf here if you want to look at rastering or outling it.

NB. Its *NOT* to scale.
Title: Re: GBR files
Post by: Zax on November 11, 2016, 02:20:47 PM
Does the free version allow saving as PDF or perhaps as PNG?

If so, that may be the best solution. Using Sketch Plus you could raster and then vector trace the outlines to produce very clean lines.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 02:25:37 PM
Does the free version allow saving as PDF or perhaps as PNG?
Nah, not for Gc Prevue at least, gerbv didn't agree with the aperture file either. But a .pdf printer works reasonably well. Imports as vectors to Inkscape, so should be possible to rasterise it at an appropriate dpi if the actual dimensions are known - or to derive the appropriate dimensions from a known component footprint.
Title: Re: GBR files
Post by: beikeland on November 11, 2016, 05:55:43 PM
About the FlatCam I mentioned before, it seems to be perfect for Gerber files, (except it does not seem to support the obsolete format).

Check out this thread for an example of gerber data imported, an outline inside the copper fill, and a fill inside the the contour, should make the outer edges as smooth as possible, and still provide infill. There were other options than horizontal lines, needs some experiementing. For now that functionality is hard to achieve outside the development version. But it shows potential, and it seems the devs are trying to polish up the interface for that bit.

http://benboxlaser.us/index.php/topic,1076.msg13286.html#msg13286

edit, no longer perfect for gerbel files  ;D
Title: Re: GBR files
Post by: Kunaphil on November 12, 2016, 07:22:49 AM
So....... ::)
Is this still a viable possibility to support gerber?

Thanks,
Phil
Title: Re: GBR files
Post by: Zax on November 12, 2016, 08:20:27 AM
It is still possible, but I don't know the best solution as I have no experience with this format.

If I import as vector you will only get the outline and not the aperture (fill) which appears to be required. It's a hybrid format, where vector data is used to generate a raster image.

Do you want the result to be an inverse of the data, or is this something that varies for different files?


Title: Re: GBR files
Post by: beikeland on November 12, 2016, 08:48:49 AM
Its an obsolete format and we've shown you ways to convert it to usable files using free software. I can't speak for Zax, but to me it doesn't make sense to invest time and effort into supporting the functionality. Even with the aperture files there is still an unknown dimension and origin. which is the reason the format was obsoleted in the first place.

I'd recommend trying GC prevue, print to .pdf in black and white, invert, scale and raster the resulting .pdf.
Title: Re: GBR files
Post by: Kunaphil on November 12, 2016, 08:57:10 AM
Zax,

the files are sometimes inverted and sometimes not.  what if the 274x would be supported as it is not a dead format?
I will figure a way to convert what I have as these are the only 274d files I have.

biekeland,

If I posted the complete projected, could you convert them to .pdf?

thank you,
Phil
Title: Re: GBR files
Post by: beikeland on November 12, 2016, 09:02:13 AM
If I posted the complete projected, could you convert them to .pdf?

Sure, shouldn't take too long. But you can download the free software and try it yourself if you want to.
Title: Re: GBR files
Post by: Zax on November 12, 2016, 09:18:39 AM
The newer format has many more options to convert it or save as an image you can import to T2Laser.

I don't think most users would get anything from having a native import over other features I can work on.
Title: Re: GBR files
Post by: Kunaphil on November 12, 2016, 09:32:08 AM
just downloaded the gc prevue.  not familiar with it.  just learning how to navigate through it.
Here are the files.

thank you again,

Phil
Title: Re: GBR files
Post by: beikeland on November 12, 2016, 09:57:34 AM
just downloaded the gc prevue.  not familiar with it.  just learning how to navigate through it.
I'll try to get some screenshots and document the conversion - could be useful for others who find the thread later.
Title: Re: GBR files
Post by: Kunaphil on November 12, 2016, 10:00:11 AM
that would be most excellent 8)
Title: Re: GBR files
Post by: beikeland on November 12, 2016, 10:17:50 AM
If I posted the complete projected, could you convert them to .pdf?
Sure, shouldn't take too long. But you can download the free software and try it yourself if you want to.
As I said, they are not to scale, somehow despite the files saying absolute inches and they are imported as such, and the on screen measurements work okay, the prints come out much too large, and using a print ratio smaller than 1:1 crashed the software. Maybe you can find a way to figure it out, or just turn the .pdfs into raster at a DPI that gives you a good fit with known component sizes.
Title: Re: GBR files
Post by: beikeland on November 12, 2016, 10:25:35 AM
I'll try to get some screenshots and document the conversion - could be useful for others who find the thread later.
that would be most excellent 8)

So start off by importing the aperture file. You need to manually select the type for this when importing.
(https://dl.dropboxusercontent.com/u/8563525/pics/misc/gcprevue/2016-11-12%2019_00_40-Import%20-%20Verify%20File%20Information.png)
If you have reason to change the scale to mm/inches/mills/whatnot do so in the next dialogue. The defaults were okay here.

Then import the layers. Make sure the aperture file is selected as tool table, it should be by default if its imported first.
(https://dl.dropboxusercontent.com/u/8563525/pics/misc/gcprevue/2016-11-12%2019_01_47-Import%20-%20Assign%20Tool%20Tables.png)
Set colours and types of the layer in the next dialogue to make things easier.

After all files are loaded you should have something like this
(https://dl.dropboxusercontent.com/u/8563525/pics/misc/gcprevue/2016-11-12%2019_08_09-GC-Prevue%20-%20GWK1.png)

Then just print to cute pdf writer or other pdf output device. Take care to check the box for  "Print all data in black" and for the bottom layer check the box "print as bottom view" otherwise you'll get a mirrored image.
(https://dl.dropboxusercontent.com/u/8563525/pics/misc/gcprevue/2016-11-12%2019_12_46-Print%20Setup.png)

I'll just attach the screenshots here in case dropbox links fail at some point, but external images makes for better formatting.




Title: Re: GBR files
Post by: Kunaphil on November 12, 2016, 10:28:59 AM
Thank you so very much!  I do have standard components that I can get an approximate size.  I have been reading the gc tutorial, but haven't too much time to play with it.
Title: Re: GBR files
Post by: beikeland on November 12, 2016, 10:40:53 AM
If you measure the components on the screen in gc prevue and they match the real world, then you could just get the board dimensions from the screen as well.

The resistor is about 10mm across sounds reasonable. There are probably many ways to do measurements, to move the cursor to the starting point, press Z to zero relative measurement, and then move the cursor to the far end and read out the relative distance on the screen (top left-ish)
Title: Re: GBR files
Post by: Zax on November 13, 2016, 06:56:34 AM
I added the basic import (still need to understand how the apertures are used) and it looks OK to me, any idea if the sizes are correct?
Title: Re: GBR files
Post by: beikeland on November 13, 2016, 07:05:01 AM
still need to understand how the apertures are used
In this case the file describe different "pen" sizes and shapes. Sizes in mills.
So
Code: [Select]
D10   ROUNDED            10.000      10.000 Means you should stroke D10 with a 10 mills round "pen". Number is repeated for X and Y direction to allow elliptic shapes and rectangles in addition to circles and squares.
Title: Re: GBR files
Post by: Zax on November 13, 2016, 07:08:36 AM
Thanks, that's what I assumed from looking at the file.

What I am not clear on until I put it in the code and see the result compared to other viewers is whether you rotate the rectangle to the angle of the line segment or not. I think you do but may need some other examples to make sure I have it correct.

I'm only importing a single layer, does that make sense? You wouldn't want to overlay when lasering right?
Title: Re: GBR files
Post by: beikeland on November 13, 2016, 07:25:33 AM
Hmm, about the rotation, not sure - it would make sense, but it won't make a big difference. I recon most design using the obsolete format will have ample space between relatively wide tracks - so chances for any short circuits or high impedance tracks due to wider or thinner tracks should be near zero.

But I guess the answer could be fond in history books, did plotters and photoplotters have the capability to rotate the tool? As far as I understand a photoplotter has a wheel of apertures that rotate to change apertures, but unsure if each apertures in turn can rotate.
Title: Re: GBR files
Post by: Zax on November 13, 2016, 09:07:40 AM
I guess no rotation, this may be more interesting to code.
Title: Re: GBR files
Post by: beikeland on November 13, 2016, 09:10:50 AM
Another reason to think it makes little impact is that it would be very unusual to use a oblong or rectangular aperture for PCBs. In fact I was surprised to see they had used square ones.

Edit: thinking a little bit more about it, square makes sense to mark pin 1 on chips etc. but not really for tracks.
Title: Re: GBR files
Post by: Kunaphil on November 13, 2016, 10:14:46 AM
I  found my original email that was sent to me with the Gerber files.  The size of the board should be 6.5" X 3.25".
Title: Re: GBR files
Post by: Zax on November 13, 2016, 02:12:42 PM
I think it's looking about right...
Title: Re: GBR files
Post by: beikeland on November 13, 2016, 02:30:14 PM
Thats the bottom layer, it needs to mirrored - and the whole thing needs to be inverted (as the laser removes the paint, the etchant then removes the copper, so the unlasered bits will be kept in the final result).
Title: Re: GBR files
Post by: Zax on November 13, 2016, 02:49:52 PM
It imports as an image so you can select mirror X or Y and invert as needed. You can also use Sketch Plus to add vector around the design as you mentioned before to provide a nice clean edge. The G-code generation is working great too.

I have matched what is displayed in the commercial programs, but can easily change the defaults.
Title: Re: GBR files
Post by: beikeland on November 13, 2016, 03:13:11 PM
Looks good! Think the outline will really help with clean edges indeed!
Title: Re: GBR files
Post by: Zax on November 13, 2016, 03:16:44 PM
Thanks. I could use more files to test if anyone has some to post or a source I can download examples.

Currently I look for the aperture file in the same directory, with either the same prefix file name or the same name with the .apt extension.

I will look into adding the -X support, seems like it shouldn't be too difficult.
Title: Re: GBR files
Post by: beikeland on November 13, 2016, 03:18:33 PM
Impressed with the commitment!!
Title: Re: GBR files
Post by: Kunaphil on November 13, 2016, 03:58:00 PM
zax,
where do you find the mirror x and y?  Also, the board also needs to be rotated vertically as it won't fit on the printer.

thanks both of you for all your research and help.

Phil
Title: Re: GBR files
Post by: Kunaphil on November 13, 2016, 04:19:17 PM
here are more gerbers I think
Title: Re: GBR files
Post by: Zax on November 13, 2016, 04:35:41 PM
Flip (Mirror) X & Y as well as Rotate are available for images, either on the edit toolbar or menu.

So the way I wrote the Gerber file import allows any of these modifications can be used as needed to create the output G-code.

I will do some more testing and likely release it "as is" tomorrow and then look further into adding the newer spec if you think it's worthwhile.

Since T2Laser can be used with CNC mills (Z-axis support) it would also be able to create drill files or even remove the copper directly with the right machine.
Title: Re: GBR files
Post by: Kunaphil on November 13, 2016, 04:38:23 PM
Zax,

This is awesome!  I can hardly wait!


Phil
Title: Re: GBR files
Post by: Zax on November 14, 2016, 07:53:52 AM
I checked those hybrid_pcb files, and I'm seeing a strange result.

The file does indeed contain these shapes (a square and a round aperture) but the commercial viewer is ignoring them which I am sure is correct, but I haven't yet figured out how it know to do so. Perhaps something to do with layers?

So I will be delaying the release pending a fix for this issue.

If anyone has more files to test I can make the import more robust.
Title: Re: GBR files
Post by: Kunaphil on November 14, 2016, 10:26:11 AM
here are some more files.

Phil
Title: Re: GBR files
Post by: Zax on November 14, 2016, 10:31:53 AM
Excellent.

I fixed the bug above and a few others, it seems to be working great with the other 2 groups so I will test these now.

Here's the silk screen layer.
Title: Re: GBR files
Post by: Kunaphil on November 14, 2016, 02:54:44 PM
Zax,

Here is from another site.

Phil
Title: Re: GBR files
Post by: Agastar on November 14, 2016, 03:04:56 PM
OK... Agastar has spoken, so I will see what I can do.

LOL!!!
Title: Re: GBR files
Post by: Agastar on November 14, 2016, 03:23:30 PM
We need an "I am not worthy" / bowing emoji :)
Title: Re: GBR files
Post by: Zax on November 14, 2016, 04:12:42 PM
I'm going to release v1.3m (Malta), let me know what you think.

I've only been able to test it with the files loaded here but it seems to work pretty well.

If you have the -D format you need to make sure there's an aperture file in the same folder as the Gerber file, and it's name needs to be the same or at least the same prefix. You should also select the units and dimensions in the Settings / Advanced Settings / Gerber Options menu. It will try to auto-detect if you don't select the correct values.

The newer -X format contains the aperture and settings so you just load it and done.
Title: Re: GBR files
Post by: Zax on November 14, 2016, 04:25:35 PM
Here's the phono top file in T2Laser, as compared to the commercial viewer (which costs over $600).
Title: Re: GBR files
Post by: Kunaphil on November 14, 2016, 04:46:24 PM
Zax,
I  actually think that the T2 looks pretty good.  I think that it will work fine!
Title: Re: GBR files
Post by: Kunaphil on November 14, 2016, 04:47:34 PM
You have gone above and beyond!
Title: Re: GBR files
Post by: Zax on November 14, 2016, 04:58:20 PM
Thank you, I decided to keep going so now it supports both old and new formats.

It has some limitations, but can be enhanced over time as I get more and more files with different examples.
Title: Re: GBR files
Post by: Agastar on November 15, 2016, 11:27:00 AM
I'm going to try and remember to create the gerber files for my laser driver when I get home tonight and post them here for you. These are exported from Kicad and load into OSHPark.com so they should be a good test for the newer format at least.
Title: Re: GBR files
Post by: Zax on November 15, 2016, 11:37:19 AM
That would be awesome. I'm sure it needs some tweaks as I only had 1 set of files to test it with.
Title: Re: GBR files
Post by: beikeland on November 15, 2016, 03:29:51 PM
I'll make time to do a couple of tests for you this weekend too (on the newer format), just need to make new laminates with photoresist on them. I'll get in touch so you can dictate settings as you please.
Title: Re: GBR files
Post by: Zax on November 15, 2016, 03:53:09 PM
The old format should be pretty robust, the newer one has more detail and complexity so with only 1 test file it probably has some "unexpected" features. So your assistance would be appreciated.
Title: Re: GBR files
Post by: Kunaphil on November 15, 2016, 04:54:05 PM
I'll be here  also. 

this is  great!

Phil
Title: Re: GBR files
Post by: Agastar on November 15, 2016, 05:20:14 PM
Here you go. I included the drill file too which is also in gerber format

There are some examples that come with Kicad and I'll try to get you those converted to gerber too.

Title: Re: GBR files
Post by: beikeland on November 15, 2016, 06:03:57 PM
I downloaded this as it had both a side with a massive copper fill, and a side with just a few traces.
http://downloads.sourceforge.net/reprap/reprap-opto_endstop-2.1.zip
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 04:20:18 AM
This was exported from KiCad and said "invalid format" when trying to import.
Title: Re: GBR files
Post by: Zax on November 16, 2016, 06:17:46 AM
The files that don't load are entirely in negative space, for example:
X189230000Y-111760000D03*

I will change the code to allow this and auto-enable the relocate origin option so the drawing is shifted back to positive space.
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 07:39:08 AM
Oh, yeah I noticed that but I just offset it  -  but did google how to get it into positive space and the tracks are there, but the width of the tracks and all the pads seems to be missing.
Title: Re: GBR files
Post by: Zax on November 16, 2016, 07:55:01 AM
That's exactly what I am seeing too, it looks ok but if I shift the origin the traces become thin. Very strange.

Why is is not drawn with an origin? This seems like a CAD issue rather than my import but I can probably fix it.
Title: Re: GBR files
Post by: Agastar on November 16, 2016, 08:17:46 AM
Kicad does allow you to set the origin point. I'll start setting my origin points in my projects from now on :)
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 08:52:37 AM
Yeah, I did set the origin and re"plotted" them from KiCad with "Use auxillary axis as origin", so I could open it in T2, but still only thin tracks and no pads.  (and no change in grbv, except origin)
Title: Re: GBR files
Post by: Zax on November 16, 2016, 10:13:51 AM
This is the original one with the origin way off to the right and negative values.

"Relocate Origin" fixes those issues automatically and everything looks good... except (isn't that always the case) the apertures are outside of the frame so I need to decode those to calculate the extents for my sizing.

I rotated the output in attached.
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 10:16:26 AM
And if you send me the g-code I can try to run an exposure if you like?

That looks right, but when I just shifted the origin in kicad it looked lit so:
Title: Re: GBR files
Post by: Kunaphil on November 16, 2016, 11:29:11 AM
beikeland,

Can you post or let me know your procedures and laser settings for your process?  I tried and obviously don't have my laser set up either mechanically or software properly as when the cut was complete, lots of the traces came out very jagged and wiggly.

thanks,
Phil
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 12:27:05 PM
I think we'll be better suited to suggest improvements if you post a picture, preferable with some soft or scale indicator if the problems are very small. I machine is a bit wiggly still as some of the nylon wheels are not straight, but its hard to guess whats wrong without seeing the results.
Title: Re: GBR files
Post by: Kunaphil on November 16, 2016, 12:41:50 PM
I'll post a  picture when I get home tonight.  I do have a day job.... :'(   unfortunately..
Title: Re: GBR files
Post by: Agastar on November 16, 2016, 01:20:03 PM
I do have a day job.... :'(   unfortunately..

I'll second that! ugh... Well, it does pay for my hobbies lol
Title: Re: GBR files
Post by: Zax on November 16, 2016, 01:28:09 PM
All of the examples I've received are working correctly now, and relocate origin works too. It will automatically activate if any axis is negative to ensure the design stays in positive space. If it's shifted away from origin it will not be moved unless the relocate origin is selected.
Title: Re: GBR files
Post by: Zax on November 16, 2016, 01:29:11 PM
if you send me the g-code I can try to run an exposure if you like?

Would you want it negative/inverted, how about rotation... actually, let me just get an update out and you can test it directly in T2Laser.
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 02:01:56 PM
If you want me to test you'll have to send me the g-code. No inverting, no rotation. F2500 S128.

If you also want to see it etched you should use this instead as I was planning on using smd headers but KiCad didn't have any footprints, so I just hacked it with thicker traces:))

Already built the board, but it had a couple of screw+ups of course, but it works to tune in currents for drivers without the actual laser connected :)
Title: Re: GBR files
Post by: Agastar on November 16, 2016, 02:10:58 PM
I have smd headers like that, let me see if I can find the footprint for them.
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 02:22:52 PM
That would be great Agastar! Although the cheap Chinese ones were badly oxidized so I had to rub them on some sand paper and they're only solder on the bottom .. but hey, $2 for 200 pins and free shipping I won't complain too much :P

On a slightly related topic I just notice these boards were made of Bakelite, wonder if they would cut on the laser after they've been etched? Would be kinda cool if I could do both "drilling", slotting and outlining on the laser once Banggood stops screwing around asking for videos of me doing a one handed hand stand while adjusting the lens to show that it is not just out of focus. To quote Monty Python, "Its dead, thats whats wrong with it!!"
Title: Re: GBR files
Post by: Agastar on November 16, 2016, 02:41:24 PM
No problem, in the meantime, this guy has a really nice collection of 3d models, libraries, and footprints.
http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm (http://smisioto.no-ip.org/elettronica/kicad/kicad-en.htm)
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 02:54:04 PM
Cool, it had the smd pin strips at the bottom actually! Great stuff, think I need to fetch most of that :))
Title: Re: GBR files
Post by: beikeland on November 16, 2016, 05:21:40 PM
Is a known fature that Grbl ignores S0 on G0 moves? Found out where all the tiny shorts came from. Only using G1 moves now, much better.

Did a SOP14 adapter that required a bit of Xacto work due to the G0 moves with laser on, but with that out of the way I think I should be able to do TQFP tomorrow - fingers crossed :))
Title: Re: GBR files
Post by: Agastar on November 16, 2016, 06:23:21 PM
that should change in the future and G0 won't enable the laser.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 04:12:55 AM
Made a SOP14 adapter yesterday, Traces are coming out wider than "planned", do you think the solution is to enter a wider or narrower tool diameter in the software making the g-code? Seem to be getting the hang of the quality for applying the photoresist, exposure and etching now. Removing G0 moves helped a lot! Tried applying soldermask, but the openings for the SOP chip completely disappeared  so had to remove it again unfortunately.

(https://www.dropbox.com/s/hr07rkr1pu03lia/2016-11-17%2007.04.04.jpg?dl=1)
Title: Re: GBR files
Post by: Zax on November 17, 2016, 04:55:45 AM
@beikeland, I have attached the G-code for the file you posted using the settings requested. I used resolution 0.1 or 10 lines per mm and did not add any vector trace to it. I would be interested if it is fine enough and without any edge issues.

Screenshot also attached so you can verify the size and pattern.

The updated T2Laser version was posted yesterday so Agastar and Kunaphil can test it also.

Title: Re: GBR files
Post by: beikeland on November 17, 2016, 06:04:34 AM
From a distance it looks pretty good; but up close you see the jagged edges both partially due to the round beam, and the slight inaccuracies of the machines.
(https://www.dropbox.com/s/w17bmdz4nr537lz/2016-11-17%2015.51.34.jpg?dl=1)
And you can always leave it to me to screw up, so I overlapped the two runs by offsetting it some 30+ mm in X instead of Y, and I left the laser centered on the first run when I changed the firmware leaving a big blotch in the center where the laser energized when flashing :/

Anyways, closeups attached. I think offsetting the scanning by a tool width and tracing the outline after would yield a much crisper outline, but for hobby use its probably not worth the effort.

Code: [Select]
1.1d.20161104
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask)
$3=0 (dir port invert mask)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=2 (status report mask)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=1 (soft limits, bool)
$21=0 (hard limits, bool)
$22=1 (homing cycle, bool)
$23=3 (homing dir invert mask
$24=100.000 (homing feed, mm/min)
$25=500.000 (homing seek, mm/min)
$26=100 (homing debounce, msec)
$27=2.000 (homing pull-off, mm)
$30=255 (rpm max)
$31=0 (rpm min)
$32=1 (laser mode, bool)
$100=80.000 (x, step/mm)
$101=80.000 (y, step/mm)
$102=250.000 (z, step/mm)
$110=4000.000 (x max rate, mm/min)
$111=4000.000 (y max rate, mm/min)
$112=500.000 (z max rate, mm/min)
$120=800.000 (x accel, mm/sec^2)
$121=800.000 (y accel, mm/sec^2)
$122=10.000 (z accel, mm/sec^2)
$130=150.000 (x max travel, mm)
$131=200.000 (y max travel, mm)
$132=200.000 (z max travel, mm)

edit: forgot the picture of the board :/
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 06:06:39 AM
Hmm, looking at those pictures, would it be safe to assume my dot is quite oval seeing the traces are nice and thin along one axis but thicker along the other? The trace width is the same all over except the fake SMD pads for the headers.
Title: Re: GBR files
Post by: Zax on November 17, 2016, 06:42:36 AM
T2Laser already supports the vector outline after raster in the same G-code job, I just didn't select it.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 06:57:38 AM
Then I think its should quite usable now, when you can manage to separate your X from your Y and stuff like that :D

Last think I could think of would be having opening where the should be holes according to drill files, to assist with manual drilling.
Title: Re: GBR files
Post by: Kunaphil on November 17, 2016, 08:00:16 AM
beikeland,

the pictures you posted are almost  exactly what my results are.  I am sorry, I got home last evening too late  to take any pictures of my results.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 08:15:11 AM
Could you narrow it down? The microscope close up is probably close to as good as it gets anyway.

There is a wiggly part both on the T2 preview and final result, especially on the tracks running along the Y direction in middle, and I have no explanation for that. They are not part of the design in KiCad and they did not show up on the etched board I posted complete with components. My machine adds even more wavyness than what is shown on the T2 screenshot, and that will be fixed with new wheels.

I may have a feeling it has something to do with KiCad possibly exporting may segments instead of straight lines to help with auto-leveling features on CNC machines?
Title: Re: GBR files
Post by: Zax on November 17, 2016, 08:25:16 AM
I think those are artifacts of the vector to raster conversion.

It looks really clean on my screen as shown in this zoomed in picture.

In some cases I have found importing at 0.05 and then down-scaling the image to 0.1 improves the result, for the attached phono file (I turned off the aperture list to show what it looks like as vector, this is a setting in T2Laser and may be useful) it has many lines so doing this "trick" makes sure the result is completely filled solid. It probably doesn't matter to the end result.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 09:49:45 AM
I'll be happy to run whatever g-code you want, to aid the testing. The dry film is quite inexpensive, and its good practice to get better at laminating the film on the bare PCBs :)

(Just keep in mind the general wobbliness of my laser for now:)

No need to actually etch the copper to see the results really.
Title: Re: GBR files
Post by: Zax on November 17, 2016, 10:49:43 AM
This is the same file and parameters except with diagonal engraving, as with the horizontal I do not see any anomalies (wiggles) in the traces or pads. Any shown on-screen are artifacts and not there when you zoom in.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 11:11:37 AM
LW3 didn't like that, shows no toolpaths despite there being ample g-code in the file. Will look into it later.
Title: Re: GBR files
Post by: Kunaphil on November 17, 2016, 11:22:57 AM
beikeland,

What are your recommended settings in T2?  I am so new to this that I am not sure as  to what and how to cut  these properly.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 11:37:26 AM
I do most of my work on Linux so T2 isnt't something I can use. Which is partly why I asked Zax to send me the g-code generated so I could  just run it.

And I use a much weaker laser, about 15mW now I think (gussing). But Zax posted "I used resolution 0.1 or 10 lines per mm" and it was run with F2500 and S128 (S128 is about 15mW, so with a 2.5w laser with somewhat linear TTL driver it would be between S1 and S2)
Title: Re: GBR files
Post by: Zax on November 17, 2016, 04:53:26 PM
I found some complex Gerber files online to test with the latest release (v1.3n) of T2Laser.
Title: Re: GBR files
Post by: beikeland on November 17, 2016, 08:59:20 PM
Couldn't quite figure out why LW3 didn't want to run the diagonal g-code file.

But did run another attempt "my way" but forgot the dynamic power/constant power thingy was off again. and while there was very little difference on the T2 results from a line-by-line scan the difference is huge when running as vectors!

I presume its the overscan you've mentioned before that is the main reason for much improved results, regardless of that Grbl feature is on or off?
Title: Re: GBR files
Post by: Zax on November 18, 2016, 04:57:02 AM
That's probably true.
Title: Re: GBR files
Post by: beikeland on November 18, 2016, 05:15:11 AM
But as evident from the photoresist, there is little difference so you might consider activating it so users get the benefit when not doing scan based cuts (once they declare it a stable feature that is)?

The overall PCB process is getting pretty good now! Got the Soldermask almost usable now, and results more closer to the drawing by upping the dot-size in the settings making it less oversized.

But still need to have wheels replaced before I can do anything big due to the distortion that comes from the crooked wheels.
Title: Re: GBR files
Post by: Zax on November 18, 2016, 05:44:35 AM
That does look really good.

I have it on my list, and planned to include it with 1.3m but then there was an update so I decided to wait. Users can always compile their own firmware if they want and either use my defaults or their own, but for "newbies" I prefer to have stable options which is why I still include 0.9g J-Tech as a choice and the 1.1c (beta).
Title: Re: GBR files
Post by: Kunaphil on November 18, 2016, 11:18:28 AM
beikeland,

Where are you getting your replacement wheels.   One of the ones on the  gantry has  a  flat spot and I think that may be part of my problem.
Title: Re: GBR files
Post by: beikeland on November 18, 2016, 01:48:42 PM
You get replacements from Banggod after collecting about 20 odd weeks of video,  360 degrees coverage and sacrificing your first born; I don't have kids, so I'm still sending them videos..

But I've ordered openbuilds style V wheels of a different dimension and will attempt to adapt the profiles to become V slots and make new parts for the X carriage.
Title: Re: GBR files
Post by: beikeland on November 20, 2016, 11:02:56 AM
Looks like TQFP is doable, but I need to get the focus even better first. The oval dot is messing with my horisontal traces making them too thick.
(Those not familiar with the size, its 7x7mm and 0x8mm pin spacing, and the other pad is a 0805 resistor with a trace under it.)

(https://www.dropbox.com/s/hoxie8mpuys1g1t/2016-11-20%2019.41.43.jpg?dl=1)
Title: Re: GBR files
Post by: Kunaphil on November 25, 2016, 04:40:57 PM
Zax,
Is there a way to choose vector to raster instead of raster to vector?
Title: Re: GBR files
Post by: Zax on November 25, 2016, 06:24:32 PM
Gerber files are technically an image, described numerically. So that is what you are getting, at the precision set by the resolution value.

Sketch, can also be converted to raster by selecting "filled" from the menu.

What is it exactly you are trying to do? DXF to Raster? If so, it's much better to Inkscape to fill the drawing and save the image.

Title: Re: GBR files
Post by: Kunaphil on November 26, 2016, 10:42:11 AM
Zax,
I am not sure how to explain what I'm experiencing.  I have been fairly successful with getting rid of the wavy lines by mechanically tuning up the unit.  Belt tension is critical and also no slop in the carriages.  When I run the laser, I have been running horizontal raster, with an auto trace so when the raster cut is done, it will outline and cut around the traces.  What I am seeing is a little bit of material that is left over that should have been burned away.  My thought possibly would have the capability to vector cut, then raster.  Not sure if that would help or not.

Thanks again,

Phil
Title: Re: GBR files
Post by: Kunaphil on November 26, 2016, 11:19:41 AM
Here is a pic.
Title: Re: GBR files
Post by: beikeland on November 26, 2016, 11:25:44 AM
And the board does not move between the horizontal scanning and the outline?
Title: Re: GBR files
Post by: Kunaphil on November 26, 2016, 11:34:20 AM
Beikeland,
I am not sure I understand what you are asking.  It does run the horizontal raster and the it does the outlining, but when it is complete, I can see left over material that should have been "burned" and etched away.
Title: Re: GBR files
Post by: beikeland on November 26, 2016, 11:39:43 AM
To me it looks like either the outline is skewed or the board has shifted, but when I think about i haven't actually tried adding the outline to the etches I did with T2 as they would exceed the 10k line limit of the demo, and it wasn't enabled in the test I ran on a file made by Zax.
Title: Re: GBR files
Post by: Kunaphil on November 26, 2016, 11:54:40 AM
I have the engraver permanently mounted and the board clamped.  Pretty sure nothing moved.
Title: Re: GBR files
Post by: beikeland on November 26, 2016, 12:15:02 PM
Save the g-code and run it through a simulator?
Title: Re: GBR files
Post by: Kunaphil on November 26, 2016, 12:26:04 PM
What simulator?
Title: Re: GBR files
Post by: beikeland on November 26, 2016, 02:15:54 PM
I think I've used freeware called camotics or something like that for some of my cnc work earlier; not sure it will work for a laser - but it should render toolpaths non the less. Haven't spent any time looking for a replacement as Fusion 360 does CAD, CAM and Simulation for me now.
Title: Re: GBR files
Post by: Zax on November 26, 2016, 03:01:31 PM
It looks like a registration issue between the raster and vector, probably due to the tracing algorithm.

It's usually very accurate but it's possible that for small traces / pads it could be causing a problem.

What resolution are you using? I did tests at 0.05 (small circuit board someone provided) and engraved on poster board with the contour outline and didn't see an issue.
Title: Re: GBR files
Post by: Kunaphil on November 26, 2016, 03:34:10 PM
.05
Title: Re: GBR files
Post by: Kunaphil on November 27, 2016, 03:54:35 PM
Just tried to import the gerber again.  All I get is either a circle or a complete blanked out square.  Not sure what is happening.  I reloaded the software and get the same results.  Too cold in my garage tonight to troubleshoot. :-\
Title: Re: GBR files
Post by: Zax on November 27, 2016, 04:29:29 PM
Send me the file and I will test it (you can post it here too if you prefer).
Title: Re: GBR files
Post by: Kunaphil on November 27, 2016, 05:19:10 PM
Zax,

these are the same files that I have been working with.
Here they are again.
Title: Re: GBR files
Post by: Zax on November 27, 2016, 05:55:40 PM
Since they're the old format you need to make sure the units are correct.

Title: Re: GBR files
Post by: Kunaphil on November 27, 2016, 07:48:28 PM
Zax,
I'll give it try tomorrow.

Thanks,
Phil
Title: Re: GBR files
Post by: nottingham82 on January 09, 2017, 12:25:12 PM
hey zax.  I was trying to invert the colors on a black and white photo and my photo disappeared.  It was a png. I tried another photo and it worked fine.  So I tried a few more.  It seems to be hit and miss which ones will invert the colors and which ones disappear completely.  The files are out in my garage so i'll post them a little later for you to play with. 
Title: Re: GBR files
Post by: Zax on January 09, 2017, 02:42:23 PM
It is probably related to png format, I look forward to checking them out.
Title: Re: GBR files
Post by: nottingham82 on January 09, 2017, 02:48:37 PM
Sorry I posted this in the wrong thread.  I'll post the files in the updates thread
Title: Re: GBR files
Post by: MegaBlackJoe on January 01, 2018, 01:04:44 PM
How to get rid off empty pads when exporting from Eagle? Am I doing something wrong or is it smth wrong with software? 

Title: Re: GBR files
Post by: Zax on January 01, 2018, 01:15:07 PM
If you e-mail me the GBR file I will take a look.
Title: Re: GBR files
Post by: MegaBlackJoe on October 07, 2020, 07:46:07 AM
I am importing a gerber file at 0.1 resolution. I get these artifacts as shown on the screenshot. These should be circles and I can see random pixels added on top. Also some random pixels are added on traces. When I change the resolution to 0.05 the situation improves, but still some random pixels can be seen. 0.05 is a lot better but it also increases engraving time. I don't think such an accuracy is necessary, because most chinese lasers running a gbrl have a focal point that is larger than that. But still, if I don't adjust the resolution, artifacts will be transfered to the part. Is there anything that can be done here? It may not be just a GBR file issue, I have noticed the same when using images like bmp or png. Thank you.
Title: Re: GBR files
Post by: ggallant571 on October 07, 2020, 07:55:22 AM
Nottingham - I suspect it is the transparency laser. Try disabling it off before inverting.
Title: Re: GBR files
Post by: Zax on October 07, 2020, 09:50:20 AM
Are you using the default Gerber import settings?

I just loaded your file and it looks smooth.

The vector format is converted to raster based on the resolution, but 0.1 should be acceptable.
Title: Re: GBR files
Post by: MegaBlackJoe on October 07, 2020, 10:04:53 AM
Yes, I am using default settings. I have such a result (as shown on your screenshot) only if I use the resolution of 0.05 but when I use 0.1 resolution it's similar to my previous screenshot. Still even with the resolution of 0.05 you can see some random pixels. I have marked them yellow.
Title: Re: GBR files
Post by: Zax on October 07, 2020, 02:18:13 PM
I used 0.1 also but yes if I screen capture and magnify I do see what you are talking about. I removed the aperture and the path is clean so it must be the radius on the joints, whenever you convert a vector to raster there will be artifacts. They should not cause any issue as they will be less than 100 microns in size.
Title: Re: GBR files
Post by: MegaBlackJoe on October 09, 2020, 11:17:35 AM
All right, thank you, it explains everything.