A quick MEL script that exports selected polygon objects to a specified STL ASCII file. STL files are used mostly for 3D printing (also called rapid prototyping). The STL format is described here
1) Copy the script mayaExportSTL.mel to your Maya scripts directory. If you don't know where that is, run the command:getenv MAYA_SCRIPT_PATH;
in Maya's script editor, or command line at the bottom of the UI.
2) Start Maya.
3) To run this script and export an STL file either:
a) Create a shelf button: In Maya, open the script editor (use the button at the bottom right of the screen). From its File menu, open the script. Its contents will appear in the bottom window. Highlight the word mayaExportSTL. From its file menu do Save Selected to Shelf. You will be asked to name it; "STL" is a good name. b) Call the command directly: You can also just call mayaExportSTL from the Maya script editor.
4) Now to output an object in .stl format, first save the object, then select it, click the button you just made or call the command. The script will triangulate your object (which is why I recommend you save it first) and prompt you for an output file name.
5) It will write out a .stl file with the name your chose to the location you selected.
That's it! If you have any questions drop me a message (especially before leaving negative feedback :) )
This script was created in conjunction with Meng Han "Richard" Ho of Pratt Institute and was developed at the Pratt Institute Digital Arts Research Lab.