Alpenglow Industries
  • Store
    • Through-Hole Soldering Kits
    • SMT Soldering Kits
    • Tools and Accessories
    • Solderless Kits
    • Seasonal Blinkies
    • Programmable Kits for Makers
    • Textile and Yarn Tools
    • All Alpenglow Products
    • Bright Wearables
    • Makerbytes Soldering Kits
  • About
  • Blog
  • Instructions
    • How To Solder
    • Soldering Kits
    • Solderless Kits
    • Build A Blob
    • Tools
    • Coin Cell Power
    • SwitchTrick
    • SMT Garden
    • Foxy Pride
    • FUnicorn
    • Krampus
  • Contact

How to Import an Image into Altium without Losing Your Freaking Mind, Part 3

2/3/2021

1 Comment

 
Alrighty!  We're onto our last installment (for now).  Are you have buyer's remorse yet?  Are you wondering exactly where your $7k plus $2k yearly maintenance fees are going?  Are you ready to kick whoever thinks getting images onto circuit boards isn't necessary or important?  Me too!

Saving Your Image for the Future

Now that you have a really nice image in Altium using Method 1 or Method 2, you may want to save it to use it again, especially if the image happens to be a logo!  There are 2 ways you can go about this.
  1. Create a new Project for your logo. The project just contains a PCB file, and you can keep several versions, sizes, and layouts of your logo in it.  Top and bottom overlay layers, text in different orientations, etc.  This is my preferred method because I think it's the most flexible.
  2. Create a footprint that's the image.  A lot of people do this, it makes it easy if you're in a company where a lot of people need access to it.  However, if you make small boards that are space-constrained and you're always squeezing your logo in small places, it's not possible to easily resize it.  That's why I prefer #1.

​That about wraps it up.  There used to be some script that imported logos into Altium as a bitmap, but I never had very good results with it and am not sure it's still supported.

Got yet another way of creating a logo or image in Altium?  Let us know in the comments!
<-- Back to Method 2
1 Comment

How to Import an Image into Altium without Losing Your Freaking Mind, Part 2

2/2/2021

0 Comments

 

Method 2 - BMP, JPG, or PNG using Microsoft Word

We're kicking it old-school in this one using good old Microsoft tools, Paint and Word.  Buckle up!

In Method 1, we went over how to import images with smooth edges, keeping them smooth and resizable, and with a low vertex count.  In this method, we'll go over the best way to import images that are more complex, where it's OK if they look a little pixelated.  Again, if you have better ways of doing this, tell us in the comments!

Part A - Quick &  Easy PNG from a Word doc

Let's say you have a PNG image already completely ready for import.  It should be either a full monochrome or a grayscale image, and the grey/black pixels should be the ones that you'll want to reproduce in silk.  Even though I only used "black paint" to create the below image, it contains a fair bit of grey to make the rough areas appear lighter, and to make the edges of the heart appear smooth.
Picture
  • Insert your image into Word.  You can do this via a copy/paste operation, or via Insert Image.
  • Make it big.  Large images scale down in Altium better than small ones scale up.  Use the handles or Size and Position tool, make your image take up about half a sheet of paper.
  • Copy the image.  Just select it and CNTL-C to the clipboard.
  • Paste it into Altium.  Make your Top Overlay the active layer, zoom out a bit, and CNTL-V.  Be patient, there will be a conversion progress bar on the bottom and large or more complex images will take longer.  If your image didn't import well, go back to Word and use the Color -> Recolor tool under Picture Tools -> Format to adjust the black percentage.  Below is the original image above and it's resulting import, compared with the image set to 75% black and its resulting import.
  • Unionize.  When you initially paste the picture, all parts of it will be selected.  After clicking once to place the picture, right-click and create a union from all selected objects.
  • Resize.  Now you can click on any part of the image, right click, and choose Resize Union under Union Tools.  You'll have to select part of the union again, and then you'll have handles you can drag.  There might be some conversion when this happens, so try to always resize down, not up.
  • Move into place.  You should be able to move the entire image by clicking on it to select the union, then dragging the entire thing.  Or you can use the Move tool.
Note that the more vertices your image has, the laggier Altium will get.  Be sure you save often, try to minimize moving it, and turn off the layer whenever you don't need to be seeing it.  I also try to insert images as close to the end of the layout process as possible, but with this layout, that wasn't possible.  Sometimes it's best to keep the image on a hidden mechanical layer, so you can keep the overlay layer visible, and move the image to the overlay/silk layer at the end.

Part B - JPG to BMP with Paint and Word

This goes through importing a photo into Altium.  The original image is a jpeg, from a Notorious RBG meme.  I did this the weekend after she died.  Yes, I create circuit boards for mental health.
Picture
  • Convert to a monochrome bitmap.  Open the image in Paint, Save As a bmp, and under "Save as type:" choose "Monochrome Bitmap".  It depends on your photo - it may or may not result in good feature preservation.  If you need an intermediate step, it might be best to save as a PNG and use the process above to try various black %s.  
Picture
You might think that instead of Saving As, you could just go to Image Properties and select “Black and White” instead of color.  You would be wrong.  This is what happens.
Picture
  • Adjust the image.  Use Paint or GIMP or your favorite photo editor to clean up the image.  I had to go through several steps - remember, what you see in BLACK is what will appear on the silk layer.  I wanted to make a board where her face and collar were in white on the silkscreen, and the background behind her head, her hair, and her robes were in black soldermask.  I had to add an outline around her head and invert the colors.  It was painstaking because I'm not good at this shit.  Also - you can only use black pixels!  No greyscale.  Here's the progression:
  • Insert image into Word, and follow steps from Part A.  The image I inserted into Word is the inverted image above.
  • Make shiny gold parts.  Lastly, I wanted her crown to be gold, as befits the Notorious RBG.  I also wanted it to be sharp and clean, which meant I had to redraw it on the soldermask layer.  I traced over the image in silk, using lines and arcs with large width to create the circlular balls on top of her crown.  Then I went back into GIMP, removed the crown from the main image, and re-imported the new image from Word.  I made her earrings bling too.
Picture
If you're wondering, I haven't released these boards yet, I have one revision to make.  They'll be really cool when ready, though, I promise!  If you want to be notified, sign up for our newsletter.

But wait!  There's more!  What?  Really?  Just a bit.  We talk about how to save your nice shiny image for future use in Part 3.
<-- Back to Method 1
Onto Part 3! -->
0 Comments

How to Import an Image into Altium without Losing Your Freaking Mind, Part 1

2/2/2021

1 Comment

 
What - you think paying $7000 once plus $2000 yearly for THE premium circuit board layout software on the market would mean it would be no big deal to stick a logo or graphics on your PCB?  Or at least that your money was enough to pay them for a nice step-by-step tutorial?  HA.  Think again.  It's such a painful process that I finally had to make myself a cheat sheet, which I continuously add to as I figure out new tricks.  And then last week I spent way too much time on the heart design above and was like - fuck it.  I'm sharing this with the world because it's just ridiculous that importing graphics is this much of a pain in the ass.  So if you've banged your head against the wall importing a logo into Altium Designer, here's a How To guide with 2 different ways, using a bitmap, png, jpg, and dxf.  Got another method?  Got improvements on the below?  Tell me in the comments!  For the Love of Bob, no one should have to go through hours of misery trying to figure this out. 

​Also - kudos to the KiCad designers and whoever made their import tool.  While it could be better, it puts Altium to shame.

Method 1 - PNG to DXF

I think this is the best method I've been able string together.  It's best for an image with very clear edges, in which a clean outline can be created from the image or image components.  For anything that has pixelated or rough edges (think a wood-carved ink stamp), this method creates a dxf (and therefore final image polygon) with waaaaaay to many vertices.  Altium has a hard time handling this and you’ll bog the entire program down and cause crashes.  For something a little “rougher” - hand-drawn, or a graphic from a photo - proceed to Method 2.
  • Start with a black and white PNG file.  It doesn't have to be fully monochrome, and you might get smoother edges in the next step if you keep it grayscale.  Here's what I started with:
Picture
  • Convert your PNG to a DXF. I’ve had great luck using Convertio, which you can install as an extension to Chrome.  I have NOT had any luck in Inkscape using “Save as” and then selecting DXF as the file type.  I'm not sure why, I’m sure there’s a way if I spent more time on it.
  • Import your DXF as a layer into Altium.  Sometimes there’s fuckery with the scaling and initial placement, so it may be best to try this in a new PCB file.  Go to File -> Import -> DXF/DWG.  Import it to a mechanical layer, I use Mechanical Layer 2.  Make sure you select an import center point that allows your entire image to be in your working area (up and right of 0,0).  Some files will send your image all over the place - you may have to hunt for it.  Shortcut keys V-F and V-D are useful for finding your image and your document.  Also make sure your scaling is correct, and the image is big enough for you to actually see.
  • Unionize.  You’ll note your DXF is all outlines of your original image.  Group it as a Union and then use the Union Resize tool to make it the size you want.  It should scale quite cleanly, unlike the other methods below.
  • Select your outlines.  In order to properly convert your shape to a fill or region, it's best to have a completely closed outline.  If you don't, it's not the end of the world as long as the outer edge of your outline is closed.  There are some tricks here to selecting - if you have a complicated shape that’s close to other shapes and hard to select on its own, move your entire image to a copper layer.  Then use the Select Connected Copper tool to select a complex outline.   Note that only the outer outline of the # sign is selected.
Picture
  • Convert to a Polygon.  Make the active layer the one that you want your image to be on.  Use Tools -> Convert -> Convert -> Create Polygon from Selected Primitives.  If it’s a very simple shape, you can use Create Region from Selected Primitives instead, but be aware that you can’t do cutouts or connect it to a net.  For this shape, where we want the center of the # sign to be cut out, we use Create Polygon.  You should then have a shape that looks like this:
Picture
  • Define the cutout.  You'll have a weird fatty outline that’s still not filled in, and it might not look completely connected in places.  It’s OK, ignore the weirdness.  If you have a cutout like we do, don’t do anything with the polygon yet.  Select the center outline using the Select Connected Copper tool, and then Tools -> Convert -> Create Cutout from Selected Primitives.  (You can also create a Board Cutout this way if you way to).  It will look like nothing happened, but don’t worry, something did.
Picture
  • Verify the cutout.  Click anywhere to deselect, and you’ll note there’s now a dashed line around the center traces.  Click in the middle of the cutout and verify that you can now choose “Polygon Pour Cutout” and verify it’s on the Top Overlay layer.
Picture
  • Adjust Polygon settings.  Now back to your Polygon.  Click anywhere between the cutout and your polygon outline, and select the polygon.  Uncheck “Remove Dead Copper” and select “Solid” for the fill mode tab.  If you have very pointy bits like we do, uncheck “Remove Necks less than…” and if your object is very small, you may need to uncheck “Remove Islands less than…”.  
Picture
  • Repour!  Click Repour.  If you’ve set up the checkboxes and the cutout correctly, you should have a nice clean pour of your object:
Picture
  • Move and save your outlines.  There's a fair chance you might want a do-over at some point, and saving your outlines will save you time.  If you’ve moved them to a copper layer like we did above, you'll want to move them to a mechanical layer.  Select the whole thing, then deselect the polygon and the cutout, leaving just the outlines selected.  Then choose a mechanical layer under "Properties" for your selected outline.  You can make it a hidden one if you don't want to see them or be able to accidentally select them again.
Picture
  • Type the text.  I decided that one of my installed fonts looked better than the handwriting, so I deleted the "You're" objects and used a normal Altium text object.  One note - initially the font was not showing up properly and some default was used.  I looked at the font on my system and realized it was an OpenType font instead of a TrueType.  I installed the TrueType version, and the text showed up fine.  Another note - it showed up fine until I went to make an Assembly Drawing PDF.  For whatever freaking reason that I will never understand, I had to uncheck the "Display TT Fonts" checkbox for the Top Layer.  Then it exported to the PDF properly.  WTF.  No idea.  Altium.  
Picture
Picture
The "# 1 ! " were all imported from the DXF according to this process.  The "1" and "!" were converted to Regions instead of Polygons, since they didn't need cutouts.  Curious about the rough heart outline?  That was imported according to Method 2 - Bitmaps to Copy/Paste from Word.  The smooth heart board outline was drawn by hand in Altium, outlining the rough heart by using the Arc (Any Angle) tool and a couple of straight lines.  I had tried to use an imported dxf for the board outline, and everything seemed fine.  I saved my work, shut down Altium properly, then when I opened it the next day, I was greeted with the following vision of pink puke:
Picture
WTF, Altium?  Pro tip: at this point I closed the PCB file and went into the History folder in my project, and started unzipping previous saves until I found one that was normal.  Fortunately, it just seemed to have barfed when I created the board outline.  So I decided to play it safe and draw a low-vertex-count one by hand.  That one has been fine.
​Onto Method 2! -->
1 Comment

    Archives

    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    September 2021
    August 2021
    July 2021
    June 2021
    February 2021
    January 2021
    October 2020
    June 2020
    February 2020
    August 2018

    Categories

    All
    Arduino Libraries
    Badges!
    Beginning-electronics
    Binary
    Feminism
    FUnicorns
    Irreverent
    LCD Fonts
    PCBs
    Racism
    Vote!

    RSS Feed

How to Buy Our Things:
​Our Storefront
Tindie Storefront
Digi-Key Marketplace
Alpenglow Yarn (our yarn tools)


© 
2018-2022 Alpenglow Industries
Stay in Touch:
About Us
Blog
Contact Us
Newsletter
  • Store
    • Through-Hole Soldering Kits
    • SMT Soldering Kits
    • Tools and Accessories
    • Solderless Kits
    • Seasonal Blinkies
    • Programmable Kits for Makers
    • Textile and Yarn Tools
    • All Alpenglow Products
    • Bright Wearables
    • Makerbytes Soldering Kits
  • About
  • Blog
  • Instructions
    • How To Solder
    • Soldering Kits
    • Solderless Kits
    • Build A Blob
    • Tools
    • Coin Cell Power
    • SwitchTrick
    • SMT Garden
    • Foxy Pride
    • FUnicorn
    • Krampus
  • Contact