Supriya Ghosh (Editor)

PLaSM

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Developer(s)
  
PLaSM Team

Operating system
  
Linux, Windows, Mac

Development status
  
Active


Written in
  
C++ with Python wrappers

Type
  
Solid modeling software

License
  
GNU General Public License

PLaSM (Programming Language of Solid Modeling) is an open source scripting language for solid modeling, a discipline that constitutes the foundation of computer-aided design 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, and elementary as well as advanced geometric transformations.

Contents

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

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))

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:

Advantages of scripting

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.

    The following plot is generated for n = 20:

    Public Git repositories

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

    References

    PLaSM Wikipedia