Xplode Help: Xplode basics

Xplode Version 2.1
by Franco Milicchio milicchio@dia.uniroma3.it
© D.I.A. Università degli Studi Roma Tre

The main window

The Xplode window is divided into two main areas, the upper part is the editor, and the lower part relates with the Plasm interpreter. This division is evident in the image below.

In the editor part are shown all the open files. A small attach near the file name indicates that the file has been modified since the last save.

As is possible to see in the image, Xplode has syntax highlighting capabilities: this means that different things in the editor are shown in different colors. A keyword (such as AA, CUBOID, ...) is shown in blue, a number in red, a string in cyan, and finally a comment is shown in gray. All other characters are black.

Another useful feature implemented since Xplode 2.0 is the parentheses matching. When the cursor reached the beginning or the end of an expression closed by a parenthesis, Xplode shows the expression highlighted with a light green background. Plasm parenthesis are round ( ), square [ ] and angled < >.


In case of error, Xplode shows the mismatched parenthesis in a magenta background.

The lower part of Xplode's main window is related with the Plasm interpreter and it's divided into two parts. The right part, the widget with the black background, is the Plasm interpreter's output. The right part shows all the exported objects in the current session (see below).

Xplode has a status bar, the lowest widget in the main window. This widget contains some useful informations: the current status (such as Ready, Searching...) and the current cursor location (line and column). Other two objects are located in the status bar: the Abort button and a progress bar. These objects are related to Plasm operations, see below for more informations.

Working with Xplode

Plasm is a language designed for geometric evaluations: the main task of Xplode is so making geometric evaluations as simple as possible. All the actions possible with a Plasm program are stored in the Plasm menu:


There are two methods of evaluation: expression and buffer. The Evaluate Expression menu item evaluates a selection in the current editor (nothing is evaluated if there's no selected text). The second menu item, Evaluate Buffer, evaluates the entire editor content. It's possible to use a keyboard shortcut as displayed on the right side of the Plasm menu.

When Plasm is evaluating an expression, the two widget on the right side of the status bar are enabled:


The progress bar on the right side indicates that Plasm is still working, so any other operation regarding Plasm (such as exporting objects and other evaluations) are currently disabled. The left side widget makes Xplode abort the current operation. For more informations about the abort button, see the Advanced use section.

Don't press the abort button unless you really know what you're doing and what it means.

The output of any evaluation is shown in the listener widget.

Exporting objects

Geometric objects must be exported in some kind of external format in order to be viewed. Plasm currently supports three exporting formats:

VRML (.wrl)
VRML stands for Virtual Reality Modeling Language and it's the oldest 3-D format by the W3C organization. In order to be viewed a VRML file must be opened with an appropriate viewer. Under Linux and Windows the Plasm binary package includes VRMLView, a stand-alone viewer. Under MacOSX the most common way is to download a plugin for your favorite browser. One of the most common VRML plugins is the Cortona plugin.
SVG (.svg)
SVG stands for Scalable Vector Graphics and it's the new 2-D vector graphics format by the W3C organization, designed to be the future image standard for the web. In order to be viewed a SVG file must be opened with a viewer. No viewer is provided with the Plasm binary package. The most simple way of viewing SVG files is through a SVG plugin for your favorite browser. The Adobe Corporation provides a plugin for many browsers.
Shockwave Flash (.swf)
The Shockwave Flash is a propietary 2-D format with animation capabilities. This format is copyrighted by the MacroMedia society. This file format can be viewed only with the Flash plugin for your browser. See the Macromedia web site http://www.macromedia.com/.

To export a polyhedral complex, use the Plasm menu item Export and fill in the export dialog box. If some text is selected, then the object to export will be set automatically to the highlighted text.


The default export format is set to be driven by the given file name suffix. When a new format is selected, the file name will automatically change appending the proper suffix and the user will be prompted for the file name. The default target directory is left to the Plasm interpreter settings. If you want to select a particular directory, click on the button located on the right of the target directory.

Plasm Bug: When exporting an object leaving the directory choice to Plasm, the exported file name could be wrong. It's recommended to select a particular target directory: in this case the shown file name corresponds to the real file name and path.

When the export phase in the listener appears the Plasm output:


On the right part, in the exported objects list appears the file path. An arrow on the left indicates that the file is newly exported and still not viewed.

Double-clicking on the file name, Xplode starts the appropriate viewer, and the arrow disappears:

When exporting an object to a suffix-driven format and using a non standard suffix, such as exported.a, Xplode asks the user whether to export it to a VRML format:


Xplode will fix the suffix appending the correct one. When viewing an exported file with a non standard suffix, Xplode will ask if the file can be viewed with the VRML viewer.

As seen in the previous paragraph, the VRML format is Plasm preferred external format. Xplode provides a fast way of exporting objects to VRML: the Plasm menu item VRML Export provides this feature. Xplode asks for an object name and then for a file name.


Note: When exporting an object, if some text is selected in the editor, Xplode will automatically complete the object name with the selection. If no text is highlighted, then the default object name is set to last_value.