When creating your models in SOLIDWORKS there may be occasions when you want to make use of a logo image in your design. For instance you might want to have your company logo engraved or embossed on your model, or create a 3D model of your logo for sales and marketing.
The challenge is converting a bitmap image file (could be a JPG, GIF, PNG, BMP, or another type of bitmap) into a vector file that you can generate sketch entities from and then create a solid or surface body.
In this example I’m going to cover a couple of methods I used to convert our corporate logo, a PNG image, into a 3D model.
Method #1: Trace your bitmap in SOLIDWORKS
In a previous post we demonstrated the SOLIDWORKS Autotrace Add-in, which allows you to insert a bitmap picture into your sketch and then automatically trace over it to create your sketch entities. Here is a quick summary of how to do that:
- Start a new part
- Insert a new sketch on a plane i.e. front plane
- Insert a new sketch picture from Tools > Sketch Tools > Sketch Picture
- Select your bitmap file, in this case I’ll select the Javelin logo PNG file
- Then select F on the keyboard to fit the image into the display
- In the Sketch Picture Property Manager select the right arrow in the upper-right corner
- Then under Trace Settings pick a selection tool, in this example I selected the Use to select colour (dropper icon) and then selected the white background of the image
- Select the Begin Trace button and you’ll see an outline of the image as sketch entities
- Use the sliders to adjust colour and recognition tolerance and repeat steps 7 and 8 until you are happy with the outline
- Then select Apply
In this example the results were not that great, you can see in the image below that the sketch outline has captured the basic form of the logo and the sketch is comprised of lines and splines. So some tidy up and adjustment to the sketch is required.
NOTE: You can also apply the sketch trace over multiple passes if it makes sense, e.g. to capture the internal area of objects. Learn more about using AutoTrace effectively in this blog post »
An alternative method that will likely produce better results is to convert your bitmap to a vector image.
Method #2: Import your bitmap as a vector image
There are two main vector formats that you can import into SOLIDWORKS, these are:
- AI/Adobe Illustrator — in order to import/open an Illustrator file you actually need Illustrator installed on your machine!
- DWG/DWG — this is the Autodesk propriety file type associated with AutoCAD, and you don’t need a license of AutoCAD or DraftSight to use it in SOLIDWORKS, so I’ll be using this type of vector file as an example
Step A: Converting your bitmap to a DXF (vector) file
First thing to do is to convert your bitmap into a vector file, this can be done with an online converter tool. I typically use the Convertio website to convert bitmaps into DXF:
- Go to Convertio.co
- Select Choose Files
- In the open dialog select your bitmap file e.g. javelin-logo.PNG and pick Open
- For the to selection, you can select CAD > DXF
- Then pick Convert and the file will be generated after a few seconds
- Pick the Download button to obtain the file
NOTE: it is always a good idea to run a virus scan on any unknown files you obtain from the internet before you use it.
Step B: Import DXF into a SOLIDWORKS Sketch
Now that you have your logo vector DXF file you can now import it directly into SOLIDWORKS. This is a simple step as SOLIDWORKS has a wizard for importing DWG/DXF data:
- Select File > Open and choose your DXF file (you might need to filter the file type to select it)
- In the DWG/DXF Import Wizard dialog:
- Select import to a new part as 2D sketch
- And uncheck the Import as reference option
- Select Finish (to skip the next wizard step)
The DXF will now be imported into a Sketch, and as you can see in the example below there are more reference points and a better representation of the logo bitmap file than using the Autotrace:
Step C: Clean up your SOLIDWORKS logo sketch
Depending on how you are going to use the SOLIDWORKS logo sketch some cleanup might be required, in this example I’ve extruded the sketch to produce a model and you can see that the curves of the letters are comprised of smaller curves and points rather than single curves. This means I have additional faces than required.
To solve this I just edit the sketch, delete the curves, and apply a spline using the reference points. Then colour the model and the design is complete:
Get Certified SOLIDWORKS Services from Javelin
Javelin Experts can help you to: