Invert/negative of a gerber? - Page 1
Forum section: electronics / general

author: eV1Te
author_rank: Regular Contributor
timestamp: October 08, 2014, 09:02:56 pm
content: I have been struggling for a while now with a Gerber problem. How can I invert a layer (for example the solder mask) when i export it to a Gerber in Altium Designer.Like this:

author: Precipice
author_rank: Frequent Contributor
timestamp: October 08, 2014, 09:10:39 pm
content: That's an unusual thing to want to do... (I don't think I've seen it as an option for gerbers - maybe for pdf output?)Can you go via camtastic? There certainly seems to be a 'draw negative' button that does what it says on the screen.

author: eV1Te
author_rank: Regular Contributor
timestamp: October 08, 2014, 09:40:17 pm
content: If you refer to the "N" keyboard command, yes that does exactly what I want, but it is only a view option in Altium, nothing is saved or changed in the file.The reason I want to do this is because I want to use a PCB in an application similar to a front-panel. I want to have the entire board in gold plated copper and then use the high-resolution solder mask for text and graphics (instead of the low-res silk screen).

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: October 08, 2014, 09:59:44 pm
content: Quote from: eV1Te on October 08, 2014, 09:40:17 pmYou need to tell the manufacturer that it's a negative layer - they do this at the plotting stage.

author: Precipice
author_rank: Frequent Contributor
timestamp: October 08, 2014, 10:22:33 pm
content: As Mike said - just instruct the PCB shop, they're quite used to this sort of thing.However, what's all this about silkscreen being low res? Altium's fine with proper fonts, and does inverse text quite competently. Images will be the same resolution, whatever layer.

author: eV1Te
author_rank: Regular Contributor
timestamp: October 09, 2014, 12:05:09 am
content: Quote from: Precipice on October 08, 2014, 10:22:33 pmIt is not about the resolution in Altium, it is about the physical process how the fab manufactures the layers.The solder mask is done by photo-lithography in the same manner as the copper when it is etched, which has very high resolution and high placement accuracy.But the solder mask is just printed with something similar to an inkjet printer, it has much lower quality and the placement can be off by much more, since the labels are not important for the electrical function.

author: eV1Te
author_rank: Regular Contributor
timestamp: October 09, 2014, 12:08:51 am
content: Quote from: mikeselectricstuff on October 08, 2014, 09:59:44 pmI can try that, but for prototyping I use services such as OSH Park, where the upload process and preview is completely automatic.It would be nice to be able to make the layer negative before sending it, just to be sure that the result is correct. What kind of gerber/plotting software does the manufacturers use, is there a free Gerber editor that can do this maybe?

author: ludzinc
author_rank: Unknown
timestamp: October 09, 2014, 12:35:04 am
content: Here'e another approach - some times the soldermask isn't quite up to the task.http://www.paulallenengineering.com/blog/ugly-labeling-fix

author: gxti
author_rank: Frequent Contributor
timestamp: October 09, 2014, 03:25:27 am
content: Quote from: eV1Te on October 08, 2014, 09:40:17 pmIf you want your lettering to be in copper (gold) and the surrounding to be masked, like in the video you linked, then you do not need to invert your outputs. This is the normal configuration for soldermask layers - positive areas are openings in the mask (no soldermask). You would only need to invert if you wanted to draw soldermask letters on a copper field.

author: eliocor
author_rank: Unknown
timestamp: October 09, 2014, 09:17:59 am
content: Rather simple (even if known by very few people):1) Open your Gerber file with a text editor2) search for string "%IPPOS*%"3) replace "POS" with "NEG"4) save your file

author: Batang
author_rank: Regular Contributor
timestamp: October 09, 2014, 10:22:37 am
content: So if I understand correctly you want the gold/copper to be exposed in the form of text etc.If that is the case just place text on the top (or bottom if that is the case) solder mask layer.See included pics for example.Cheers.

author: eV1Te
author_rank: Regular Contributor
timestamp: October 09, 2014, 08:31:52 pm
content: Thanks for the interesting links and comparisons,but some of you misunderstood my strange request.I want the entire board to be without solder mask and just have the letters written with the colored solder mask.Hence the entire board would be in gold and only the text and the markings in black solder mask, therefore I need to invert the mask.This is obviously not for a real circuit as it would be easy to short things together, it is purely for a visual/esthetic application.I tried the trick with the %IPNEG*% and %IPPOS*% in the Gerber. But it gives me errors, not everything is inverted and some things just becomes wrong, I guess it is not compatible with certain objects or fonts.

author: eliocor
author_rank: Unknown
timestamp: October 09, 2014, 08:45:31 pm
content: Never got any trouble with %IPNEG*%.I have to use it because my photoresist is negative: copper tracks on my master should be transparent.Can it depend on your gerber viewer which is not 100% compatible with gerber standards?

author: Precipice
author_rank: Frequent Contributor
timestamp: October 09, 2014, 08:53:00 pm
content: Quote from: eV1Te on October 09, 2014, 08:31:52 pmI'd abandon soldermask, make a layer with what you want on it, and call it the soldermask!

author: eV1Te
author_rank: Regular Contributor
timestamp: October 09, 2014, 09:00:35 pm
content: Quote from: eliocor on October 09, 2014, 08:45:31 pmThis is how it looks like in Altium if I open the original Gerber and the same Gerber with %IPNEG*% on one of the first rows in the document.

author: Batang
author_rank: Regular Contributor
timestamp: October 10, 2014, 02:28:40 am
content: QuoteExcellent idea.

author: eliocor
author_rank: Unknown
timestamp: October 10, 2014, 10:12:46 am
content: You are right: I have tried several gerber viewers and all of them do not respect the standard, ignoring the command or misinterpreting it!!!At this date it seems only (among the ones I have now tried)GC-Prevue:http://www.graphicode.com/GC-Prevue_Gerber_ViewerandVisualCAM:http://www.wssi.com/index.php?option=com_content&task=view&id=176&Itemid=176follow the standard!!!

author: eV1Te
author_rank: Regular Contributor
timestamp: October 10, 2014, 01:47:23 pm
content: Quote from: Batang on October 10, 2014, 02:28:40 amThat is a good idea, but which layer can I use that is inverted by default then? Even if I draw my graphics on a Mechanical layer it will still not be inverted?However I noticed a function in the Gerber viewer in Altium that says "Film Wizard" under "Tools". There you can create an entire photo-lithography film from the Gerber and also select to have it inverted depending on which process you use. But it automatically centers the Gerber and moves the origin to somewhere else. Does anyone has experience with this feature?

author: gxti
author_rank: Frequent Contributor
timestamp: October 10, 2014, 04:12:18 pm
content: Using a different layer to do the same thing will not change anything. Positive objects on the soldermask layer are openings in the mask because that's how the fab treats it, not because it gets inverted on export, which it doesn't.Fundamentally, gerbers are a collection of primitive objects like circles and lines. You can annotate it as representing a "negative image" but it doesn't change the primitives so whether it works or not depends on whether the guy who uses the file looks at your annotation or not. The only way to truly invert it while not relying on its interpretation would be to create positive primitives that approximate, but can never exactly match, the negative image you want. Just like how polygon fills work. It's not impossible, but it's not so simple as just ticking a box.

author: Precipice
author_rank: Frequent Contributor
timestamp: October 10, 2014, 05:10:48 pm
content: I thought that, too, but the benefit of not having to worry about the existing soldermask objects, and simply throwing the text you want, inverted on a new layer would be easier.Having just had a quick play, it works nicely - but I can't immediately see a way to stop a polygon on a soldermask layer flooding over everything. It doesn't seem to respect keepout... Might be able to do something cunning with regions?Fills will do the job, though, just draw them where you want, slightly overlapping the inverted text rectangles.I guess it depends if OP wants to just have a few buts of text, or loads of them, as to how much of a pain this will be.(as for the 'inversion' hint in the gerbers - laser printers spent a lot of time wrestling between write-white and write-black rasterisers. This stuff is horribly hard).

author: eV1Te
author_rank: Regular Contributor
timestamp: October 10, 2014, 10:10:45 pm
content: So I finally solved the problem of inverting Gerber layers in Altium, it required a trick to maintain the origin, but here is a guide for anyone attempting the same in the future:This of course messes up footprints etc. but for a front panel where you only have text on one side and no electrical functions this can be interesting to test. When I have time I will order a test board to see how it looks.Run the "Film Wizard":Click the button for Neg./Mirror layer, mark the Layer and click OK:You will then have two layers, of which one that is inverted, much bigger and with the wrong origin, but otherwise correctly drawn:To fix the incorrect origin we can use the "Align Selective" function under "Edit":Then we click one of the objects in each of the layers (the order is improtant) and the inverted "film layer" will jump to the same location as the orginal:We can then save the "film layer" as a new Gerber, and if we open it in Altium it looks correct and it also uploads to PCB fab correctly (just tested the online preview at OSH park which looks good)

author: eliocor
author_rank: Unknown
timestamp: October 11, 2014, 12:19:45 am
content: Quote from: gxti onYesterdayat 17:12:18>Fundamentally, gerbers are a collection of primitive objects like circles and lines. You can annotate it as representing a "negative image" but it doesn't change the primitives so whether it works or not depends on whether the guy who uses the file looks at your annotation or not. The only way to truly invert it while not relying on its interpretation would be to create positive primitives that approximate, but can never exactly match, the negative image you want. Just like how polygon fills work. It's not impossible, but it's not so simple as just ticking a box.Not exactly as you wrote... %IPPOS*% and %IPNEG*% are gerber primitives, not annotations for the operator as you state.You can see a clever usage of those commands at the following link:http://www.artwork.com/gerber/274x/rs274x.htm

author: Batang
author_rank: Regular Contributor
timestamp: October 11, 2014, 11:57:31 am
content: As already suggested, use fills and inverted text on a mechanical layer and then rename the extension for a mask layer.Cheers.