Anda di halaman 1dari 8

Blender Auto Pie Chart

(C) January 2008 - Fabrizio Zanier aka “fambros”

released under Blender Artistic License - www.blender.org

Vers. 0.0.1

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 1/8
Table of Contents
Introduction 3

Package Content 3

Dependencies 3

Installation 3

Usage 4

Examples 7

For the next release 8

Disclaimer
THIS ITEM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
FITNESS FOR A PARTICULAR PURPOSE.

The software, apc.blend, apc.py and this document are © 2008 Fabrizio Zanier and released under
Blender Artistic license which you should have received with the package. If this is not the case a copy
of said license is available at www.blender.org or directly from the author info@fzd.it.

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 2/8
Introduction
Auto Pie Chart (APC) is a Python script designed to build pie charts in Blender.

Package Content
The APC package should contain:
1. APC.pdf – The file you are reading.
2. APC.blend – An example Blender file with the script inside.
3. APC.py – The mesher script, as a separate text file.
4. APC.xls – The calculation sheet for Microsoft Excel ( © Microsoft Corporation )
5. APC.ods – The calculation sheet for OpenOffice.org Calc
6. Licence.txt – The Blender Artistic License under which this package is given.

Dependencies
APC needs the following software to work properly:

1. An operating system of your choice.


2. Blender 2.45 and maybe later version ( © The Blender Fund - www.blender.org ).
3. Python 2.5 or whatever Python is recommended with your version of Blender ( © - www.python.org )

Installation
Unpack the package in a directory of your choice. You might want to copy the Python (*.py) file in your
.blender/scripts directory. This is the preferred way of handling script in Blender.

Once you are done you can run the APC script in any blender file or load the APC.blend file, place your
mouse cursor on the left Blender window, the text window containing the script and press ALT-P.

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 3/8
Usage
Calculation sheet:

Before running the script in


Blender, you should open the
calculation sheet (*.xls or *,ods)
and insert your data in the first
column; the sheet is set up to get
from 2 up to 10 value, but you
can easily modify it inserting
more value.

The second column calculates


the percentage of the value. In
this version we do not need this
information for the GUI (we will
see in the next).

The third column calculates the


width of the angle in the slice.

The fourth column calculates the


rotation angle of the slice.

The data you get in the third and in the fourth columns are the data you need to create the pie chart.

At the moment you need to use this external file, in a future version the script will be able to load
external files (*.cvs or *.xml); or you will be able to insert the data directly in the GUI.

The GUI of the script:

The GUI of this first version is really easy, it


consist in five fields to insert values.

1 – Angle: this is the width of the slice angle, you


can get this value from the third column of the
calculation sheet.

2 – Rotation angle: this value set a rotation on Z,


for the first slice it will be zero and for the
following slices the value will be the sum of the
previous angle slices; anyway you will get this
data from the fourth column of the calculation
sheet.

3 – Radius: it's the pie chart radius and you can


vary it of each slice.

4 – H: It's the pie chart hight and you can vary it of each slice.

5 – Unit: It's the angle to set the precision of the mesh; smaller angle stays for more precision.

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 4/8
Building a pie chart:

Now we will build a pie chart, with 4 slices, using the values of the calculation sheet (see previous
page):

The first slice:

The second slice:

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 5/8
The third slice:

The fourth slice:

So, now we have a pie chart and with the power of Blender we can render a very professional and
personalized chart.

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 6/8
Examples
The images in this page show you some charts I did, just to understand what you can get from the
script.

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 7/8
For the next release
1 - Fix remove double
2 - Fix normal out
3 - Creation of an option to bevel the slice
4 - Creation of an option to insert the value or the percentage of the slice
5 - Creation of an option to move the slice out from the centre

Auto Pie Chart 0.0.1 © 2008 Fabrizio Zanier aka “fambros” 8/8

Anda mungkin juga menyukai