From BlenderWiki

Jump to: navigation, search
Import Adobe Illustrator, PDF, SVG
Import vector files as mesh polygons
UI location File > Import-Export > Adobe Illustrator/PDF/SVG
Usage Select a file to import, adjust settings for smothness / bevel /extrude
Version 0.9 Author(s) Howard Trickey
Blender 2.65 License GPL
Category Import-Export Distribution Extern
Note(s) Similar functionality to the official SVG importer, but handles more input formats and combines several actions of a common workflow - converting the curves to polygons, extruding, beveling.


Executable information
File name io_vector/__init__.py, geom.py, model.py, vecfile.py, offset.py, pdf.py, triquad.py, art2polyarea.py
Current version download https://sites.google.com/site/howardtrickey/pythonvector/io_vector_09.zip
Python modules math
External Python Modules or dependencies none
Data none


Links and troubleshooting
Bug reports http://projects.blender.org/tracker/index.php?func=detail&aid=27246&group_id=153&atid=467
Warning Does not import bitmap images or text from the input files
Links Author's web page
github project

BlenderArtists thread

Release Log https://github.com/howardt/HWTPYVEC/blob/master/README
Known Issues Currently there's a bug which requires that after choosing a file, you adjust at least one other parameter before anything happens. Some SVG functionality is missing.


Purpose

This addon script reads Adobe Illustrator Files (all versions), PDF files, and SVG files, and converts the shapes into a mesh object as polygons. It tries to deal with holes properly. There is a primitive attempt to match the polygon colors to those specified in the input file.

There are different parameters that can be set in the Tool panel to affect the import. Some affect how curves are converted into the necessary straight line approximation, and others allow for optional extrude / bevel / cap the back operations after the shapes are imported.

The beveling operation is smart enough to work even when the edges would cross each other.

Installation

  • Find your blender installation's addons directory (something like 2.65/scripts/addons under wherever you installed blender
    • If you downloaded a zip file:
      • Copy the attached zip file there and then run unzip filename; it will create an io_vector subdirectory
    • If you downloaded the individual .py files that make up the addon:
      • Make an io_vector subdirectory of addons and copy all the files there
  • Start Blender, go to user Preferences, and enable Import-Export: Adobe Illustrator/PDF/SVG

Usage

From Blender's File menu, select Import > Vector files (.ai, .pdf, .svg)

In the File Path option in the Tool panel, select an Adobe Illustrator (any version should work), PDF, or SVG file that contains some shapes and hit the 'Accept' button Perhaps change some of the Import Options in the tool panel for this addon. Current options:

  • Smoothness: the bigger the number, the closer the approximation to curves by line segments
  • Scale: the number of Blender units for the longest side of the converted art
  • Subdivision:
    • Uniform: divide in half 'smoothness' times
    • Adaptive: like Uniform, but divide until curves are flat enough
    • Even: divide both curves and lines to try to make segments of uniform length
  • Filled paths only: ignore paths that aren't filled
  • Ignore white-filled: ignore paths that are filled with white (probably the background)
  • Combine paths: look at all paths together to decide where the holes are (will be slower)
  • Use colors: use the fill colors of solidly filled paths to make Blender materials for those polygons
  • Extrude depth: amount to extrude sides downward
  • Bevel amount: amount to bevel the top face inwards
  • Bevel pitch: angle from horizontal for bevel sides
  • Cap back: put a cap on the back side, if extruding

Note: For the current version, due to a bug, you have to make some change to an import parameter after picking a file. But then you can play with the values of the parameters to see what happens.