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.

export

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:

exported


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.

export_list


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

viewer

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:

wrong_suffix


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.

vrml_export

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.

PLaSM is Free Software and may be distributed under GNU LGPL