From Wikipedia, the free encyclopedia
Jump to: navigation, search
Developer(s) PLaSM Team
Development status Active
Written in C++ with Python wrappers
Operating system Linux, Windows, Mac
Type Solid modeling software
License GNU General Public License
Pisa Tower created with PLaSM

PLaSM (Programming Language of Solid Modeling) is an open source scripting language[1] for solid modeling,[2] a discipline that constitutes the foundation of computer-aided design [3] and CAD systems. In contrast to other CAD programs, PLaSM emphasizes scripting rather than interactive GUI work. Users can create arbitrarily complex designs using a wide range of simple 2D and 3D objects, advanced curves and curved surfaces, Boolean operations,[4] and elementary as well as advanced geometric transformations.[5]

The scripting approach is very different from working with an interactive Graphical User Interface (GUI). Although it means less user comfort, it is preferred by numerous CAD instructors as scripts reveal all details of the design procedure (not only the final design) and students are exposed to elementary computer programming.

PLaSM has been developed since the 1980s by the CAD group at the Universities Roma Tre and La Sapienza in Rome, Italy by Alberto Paoluzzi and his collaborators. It was used at the University of Rome to create an extensive database of ancient Rome architecture.

Illustration of usage[edit]

The way PLaSM is used is very different from interactive graphical applications. This is illustrated in the example below. The following code creates a cube of size H = 3:

H = 3
c = CUBE(H)

The following code creates a cylinder of radius 1 and height H * sqrt(3):

cyl = CYLINDER(1, H * SQRT(3))

The cylinder is further rotated by minus 45 degrees about the y-axis, and then once more by 45 degrees about the z-axis.

cyl = R(cyl, 2, -PI/4)
cyl = R(cyl, 3, PI/4)

The result is displayed using the VIEW command.

VIEW(STRUCT(c, cyl))
Cube and cylinder created with PLaSM

The following code subtracts the cylinder from the cube:

d = DIFF(c, cyl)

Their intersection is constructed as follows:

i = INTERSECTION(c, cyl)

Both objects are then displayed next to each other:

Difference and intersection of the two objects

Advantages of scripting[edit]

Scripting has many benefits, including:

  • simple reusability of parts of existing designs in newly created ones,
  • natural incorporation of model parameters,
  • replacing tedious manual tasks by simple automated procedures.

The last point is illustrated using an example where 400 columns of radius 0.1 and height 1 are created on a 20 × 20 grid.

# Define master cylinder and n:
c = CYLINDER(0.1, 1, 16)
n = 20
# Duplicate the cylinder n^2 times:
columns = []
for i in range(n):
    for j in range(n):
        d = T(c, 1, 2, 0)
# View the result:

The following plot is generated for n = 20:

400 columns generated using a short script

Public Git repositories[edit]

PLaSM sources are publicly available at GitHub.[6] (original functional language approach).

See also[edit]


  1. ^ A. Paoluzzi: Geometric Programming for Computer Aided Design, Wiley, 2003
  2. ^ Shapiro, Vadim (2001). Solid Modeling. Elsevier. Retrieved 20 April 2010. 
  3. ^ LaCourse, Donald (1995). "2". Handbook of Solid Modeling. McGraw Hill. p. 2.5. ISBN 0-07-035788-9. 
  4. ^ Tilove, R.B. & Requicha, A.A.G (1980). Closure of Boolean operations on geometric entities. Computer Aided Design. Retrieved 20 April 2010. 
  5. ^ Requicha, A.A.G & Voelcker, H. (1983). Solid Modeling: Current Status and Research Directions. IEEE Computer Graphics. Retrieved 20 April 2010. 
  6. ^ "plasm-language/pyplasm". 2012. Retrieved July 21, 2012. 

External links[edit]