STL-IO -- CAD files import & export in the STL format

by val

5

logo

STL-IO

A Godot/GDScript addon to import/export in the STL file format.

"Buy Me A Coffee"

Setup

  1. copy the addons/stl-io directory into your addons
  2. activate it in the plugins settings.

Overview

This addon is pretty simple with 3 classes:

  • STLIO has the plumbing to enable the editor
  • STLIO.Importer for manual imports
  • STLIO.Exporter for manual exports

Usage

In The Editor

STL files should be usable as ArrayMesh resources as soon as the addon is activated.

Import

The importer returns either a Variant that is either an ERROR or an ArrayMesh.

var mesh :ArrayMesh = STLIO.Importer.LoadFromPath('/path/to/file.stl')

STLIO.Importer.LoadFromBytes is also available for custom use cases.

Export

The exporter exports all surfaces of an ArrayMesh to its destination.

var mesh :ArrayMesh = ...
STLIO.Exporter.SaveToPath(mesh, '/path/to/file.stl')

STLIO.Exporter.SaveToBytes is also available for custom use cases.

See Also

For more, check out the sample viewer.

FAQ

Q: Nice icon!

A: Thanks, it comes from flaticon.com

Q: Support for colors or unofficial data in the header or the facet attr field?

A: Not in this first version no. Also I lack sample data to test this, please file an issue and I'll be happy to work on it 😃

Q: Any STL resources to share?

A: STLA Files, or just wikipedia.

Changelog

1.0.2

  • fixed imported files in godon asset
Previous entries

1.0.1

  • fixed tri count in exported file - now loads in selfcad and orca slicer

1.0.0

  • importer & exporter ready

0.1

  • first working version

Version

1.0.2

Engine

4.4

Category

3D Tools

Download

Version1.0.2
Download Now

Support

If you need help or have questions about this plugin, please contact the author.

Contact Author