Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time


PLASM (Programming LAnguage for Solid Modeling)

Plasm is a 'design language' for geometric and solid parametric design, developed by the CAD Group at the Universities 'La Sapienza' and 'Roma Tre' in Italy.

Get Plasm:

git clone git://
cd pyplasm

Linux compilation

Install prerequisites:

        libfreetype6  libfreetype6-dev libasound2  libasound2-dev alsa alsa-devel \
        python2.7 python2.7-dev python-setuptools \
        libxinerama-dev libxrender-dev libxcomposite-dev libxcursor-dev

sudo apt-get install $PREREQUISITES # OpenSuse: "sudo zypper install $PREREQUISITES"

Install some extra python packages:

sudo easy_install numpy
sudo easy_install scipy
sudo easy_install PyOpenGL

Check that your python is 2.7

python --version

Generate makefiles and make binaries:

cd /home/$USERNAME/pyplasm
mkdir build
cd build
cmake ../
sudo make install # if you get an error try the following "touch install_manifest.txt" and "chmod a+rw ./*"
cd ..

MacOsX compilation

  1. Install XCode tools from AppStore (optionally install also Xcode command line tools)

  2. Install brew from

  3. Install cmake with brew install cmake

  4. Install PyOpenGL with sudo easy_install pyopengl

  5. Install numpy/scipy with ScipySuperpack from (browse the page to find the correct version for your MacOsX)

  6. Generate XCode project , build and install:

    cd /home/$USERNAME/pyplasm
    mkdir build
    cd build
    cmake -GXcode ../
    xcodebuild      -project PyPlasm.xcodeproj -target ALL_BUILD  -configuration Release
    sudo xcodebuild -project PyPlasm.xcodeproj -target install    -configuration Release

Possible cmake errors:

If the command cmake -GXcode ../ fails with errors about OPENGL_INCLUDE_DIRS and PYTHON_INCLUDE_DIRS you need to specify it manually: for example, in Mac OsX 10.8 the right command line is:

cmake -GXcode -DOPENGL_INCLUDE_DIR=/Applications/ -DPYTHON_INCLUDE_DIR=/Applications/ ../

Windows 7/8 compilation


  • Visual Studio (Express edition is free)

  • Python 2.7.3 - 32 bit

  • PyOpenGL 3.0.2 - 32 bit

  • numpy 1.7.0 - 32 bit

  • SciPy 0.12.0 rc1 - 32 bit

  • Swig 2.0.9 (unzip Swig and move the folder to obtain C:/swigwin-2.0.9)

  • Cmake - 32 bit (during the installation select: "Add CMake to the system PATH for all users")

Run cmake-gui:

"Where is the source code"    <browse to the pyplasm directory>
"Where to build the binaries  <browse to the pyplasm directory>/build

Press configure:

"Build directory does not exist..." > Yes
"Specify the generator for this project": Visual Studio 11
Select: "Use default native compilers"
Wait...  "Configuring done"!
Select: "Ungrouped Entries" > "PYPLASM_REGENERATE_SWIG_WRAPPERS" and check it

Press configure again:

Select: "SWIG_EXECUTABLE" > "SWIG_EXECUTABLE-NOTFOUND" and specify: C:/swigwin-2.0.9/swig.exe

Press configure again:

Wait...  "Configuring done"!

Press generate:

Wait...  "Generating done"!

Run Visual Studio:

File > Open > Project/Solution... > ..\pyplasm\build\PyPlasm.sln
Wait till the project is loaded

In the upper fields:
"Solution Configurations": Release
"Solution Platforms": Win32

Wait till the project is built: "Build: 9 succeeded, 0 failed..."

In the "Solution Explorer" panel highlight: "INSTALL"
Wait till the project is built: "Build: 3 succeeded, 0 failed..."

Test pyplasm is working

python from pyplasm import * c=CUBOID([1,1,1]) VIEW(c) quit()
Something went wrong with that request. Please try again.