F2STL LISP: Convert 3D Face to STL File for 3D Printing (Free Download)
Converting a triangulated CAD terrain surface into a file a 3D printer or web viewer can actually open used to mean a paid plug-in or a manual export detour. F2STL is a free AutoLISP routine that reads selected 3DFACE entities directly out of your drawing and writes a standards-compliant ASCII STL file, the same format used across 3D printing, CAM, and CAE pipelines. If you already have a triangulated TIN or DTM surface built from 3DFACEs in AutoCAD, BricsCAD, or ZWCAD, this tool gets it into STL format in one command.
FACE2STL-bgol (3DFACE to STL Exporter)
Command Type: AutoLISP routine, works in AutoCAD, BricsCAD, ZWCAD, and most AutoLISP-compatible CAD platforms.
Developed by: BGol Community, bgol.in
Inspired by the general concept of 3DFACE-to-STL export utilities used in CAD terrain/survey workflows. This is an original, independently written routine, new file name, new command name, new source code, created so the CAD community has a free, editable, open-source alternative.
Overview
F2STL exports selected 3DFACE entities into a plain ASCII STL (stereolithography) file, the standard format used for 3D printing, rapid prototyping, and CAM/CAE data exchange. It bridges CAD-built terrain and surface models (typically triangulated 3DFACE meshes such as a TIN/DTM) to the wider 3D-printing and manufacturing ecosystem, without needing a paid conversion tool.
How to Use
- Load
FACE2STL-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
F2STLat the command line and press Enter. - Select the 3DFACE entities you want to export (window/crossing select works well for a full triangulated surface).
- In the save dialog that appears, choose a destination folder and file name for the .stl output.
- The routine writes one facet per selected 3DFACE (automatically split into two triangles when a face has four distinct corners) and reports how many faces were exported.
- Open the resulting .stl file in any STL viewer, desktop or web-based, or send it straight to a 3D printing/slicing tool.
Why Use It
- 3D-printing bridge: turns CAD surface/terrain geometry into a physically printable or web-viewable 3D model with one command.
- No paid add-ons: avoids needing a dedicated export plug-in just to get a TIN/DTM surface into STL format.
- Client-friendly sharing: STL files can be reviewed by non-CAD users through free online STL viewers.
Where to Use It
- Exporting a triangulated terrain surface (TIN, built from 3DFACEs) for 3D-printing a physical topographic or site model, a common deliverable format alongside standard topography outputs.
- Sharing 3D survey/design surfaces with stakeholders who don't have a CAD license.
- Any workflow handing off CAD 3D-face geometry to a manufacturing or rapid-prototyping pipeline, including terrain models generated from GIS solutions project data.
Notes
- Only 3DFACE entities are processed; anything else in the selection set is ignored automatically.
- Facet normals are computed per-triangle from the cross product of two edge vectors, then normalized to unit length, as required by the STL spec.
- Coordinates are written at 6 decimal places for good downstream precision; edit the
rtosprecision values in the .lsp if you need more or fewer digits. - Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.
Credits
Developed and shared for the CAD community by BGol Community. Website: bgol.in. Free and open-source, use it, modify it, share it, for personal or commercial work alike.
Frequently Asked Questions
F2STL is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Only 3DFACE entities are processed. If your selection set includes other object types, F2STL automatically ignores them and exports just the 3DFACE geometry.
Coordinates are written at 6 decimal places by default. If you need more or fewer digits, you can edit the rtos precision values directly inside the .lsp file.
Yes. F2STL is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.
Drag and drop FACE2STL-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type F2STL at the command line to run it.
๐ค About BGol Community
BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.
๐ Made with โค๏ธ by BGol Community of Advanced Surveying
Free, open-source, and built for the CAD community, for personal or commercial use, always.