Author Topic: Invert/negative of a gerber?  (Read 28291 times)

0 Members and 1 Guest are viewing this topic.

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Invert/negative of a gerber?
« on: October 08, 2014, 09:02:56 pm »
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:
 

Offline Precipice

  • Frequent Contributor
  • **
  • Posts: 403
  • Country: gb
Re: Invert/negative of a gerber?
« Reply #1 on: October 08, 2014, 09:10:39 pm »
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.
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #2 on: October 08, 2014, 09:40:17 pm »
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.  :palm:

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).   :-+
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13747
  • Country: gb
    • Mike's Electric Stuff
Re: Invert/negative of a gerber?
« Reply #3 on: October 08, 2014, 09:59:44 pm »
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.  :palm:

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).   :-+
You need to tell the manufacturer that it's a negative layer - they do this at the plotting stage.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Precipice

  • Frequent Contributor
  • **
  • Posts: 403
  • Country: gb
Re: Invert/negative of a gerber?
« Reply #4 on: October 08, 2014, 10:22:33 pm »
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.
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #5 on: October 09, 2014, 12:05:09 am »
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.

It 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.

 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #6 on: October 09, 2014, 12:08:51 am »
You need to tell the manufacturer that it's a negative layer - they do this at the plotting stage.

I 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?
 

Offline ludzinc

  • Supporter
  • ****
  • Posts: 506
  • Country: au
    • My Misadventures In Engineering
Re: Invert/negative of a gerber?
« Reply #7 on: October 09, 2014, 12:35:04 am »
Here'e another approach - some times the soldermask isn't quite up to the task.

http://www.paulallenengineering.com/blog/ugly-labeling-fix
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: Invert/negative of a gerber?
« Reply #8 on: October 09, 2014, 03:25:27 am »
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).   :-+

If 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.
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 519
  • Country: it
    • rhodiatoce
Re: Invert/negative of a gerber?
« Reply #9 on: October 09, 2014, 09:17:59 am »
Rather simple (even if known by very few people):

1) Open your Gerber file with a text editor
2) search for string "%IPPOS*%"
3) replace "POS" with "NEG"
4) save your file
 
The following users thanked this post: reboots, I wanted a rude username

Offline Batang

  • Regular Contributor
  • *
  • Posts: 53
  • Country: my
Re: Invert/negative of a gerber?
« Reply #10 on: October 09, 2014, 10:22:37 am »
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.
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #11 on: October 09, 2014, 08:31:52 pm »
Thanks for the interesting links and comparisons,but some of you misunderstood my strange request.   :P 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.
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 519
  • Country: it
    • rhodiatoce
Re: Invert/negative of a gerber?
« Reply #12 on: October 09, 2014, 08:45:31 pm »
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?
 

Offline Precipice

  • Frequent Contributor
  • **
  • Posts: 403
  • Country: gb
Re: Invert/negative of a gerber?
« Reply #13 on: October 09, 2014, 08:53:00 pm »
Thanks for the interesting links and comparisons,but some of you misunderstood my strange request.   :P I want the entire board to be without solder mask and just have the letters written with the colored solder mask.

I'd abandon soldermask, make a layer with what you want on it, and call it the soldermask!
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #14 on: October 09, 2014, 09:00:35 pm »
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?

This 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.

 

Offline Batang

  • Regular Contributor
  • *
  • Posts: 53
  • Country: my
Re: Invert/negative of a gerber?
« Reply #15 on: October 10, 2014, 02:28:40 am »
Quote
I'd abandon soldermask, make a layer with what you want on it, and call it the soldermask!

Excellent idea.
 

Offline eliocor

  • Supporter
  • ****
  • Posts: 519
  • Country: it
    • rhodiatoce
Re: Invert/negative of a gerber?
« Reply #16 on: October 10, 2014, 10:12:46 am »
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_Viewer and
VisualCAM: http://www.wssi.com/index.php?option=com_content&task=view&id=176&Itemid=176
follow the standard!!!
« Last Edit: October 10, 2014, 11:03:11 am by eliocor »
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #17 on: October 10, 2014, 01:47:23 pm »
Quote
I'd abandon soldermask, make a layer with what you want on it, and call it the soldermask!

Excellent idea.

That 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?

 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: Invert/negative of a gerber?
« Reply #18 on: October 10, 2014, 04:12:18 pm »
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.
« Last Edit: October 10, 2014, 04:16:26 pm by gxti »
 

Offline Precipice

  • Frequent Contributor
  • **
  • Posts: 403
  • Country: gb
Re: Invert/negative of a gerber?
« Reply #19 on: October 10, 2014, 05:10:48 pm »
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).
 

Offline eV1TeTopic starter

  • Regular Contributor
  • *
  • Posts: 186
  • Country: se
  • Your trusted friend in science!
    • richardandersson.net
Re: Invert/negative of a gerber?
« Reply #20 on: October 10, 2014, 10:10:45 pm »
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)


« Last Edit: October 10, 2014, 10:27:09 pm by eV1Te »
 
The following users thanked this post: Mechatrommer, HWgeek

Offline eliocor

  • Supporter
  • ****
  • Posts: 519
  • Country: it
    • rhodiatoce
Re: Invert/negative of a gerber?
« Reply #21 on: October 11, 2014, 12:19:45 am »
Quote from: gxti on Yesterday at 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
« Last Edit: October 11, 2014, 12:29:16 am by eliocor »
 

Offline Batang

  • Regular Contributor
  • *
  • Posts: 53
  • Country: my
Re: Invert/negative of a gerber?
« Reply #22 on: October 11, 2014, 11:57:31 am »
As already suggested, use fills and inverted text on a mechanical layer and then rename the extension for a mask layer.

Cheers.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf