Skip to content

mohnjoosemiller/STLread_for_Octave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stlread() for Octave

Description

stlread() is a function for octave that takes in a binary (NOT ASCII) .stl'a and outputs the vertices and a list of each face's vertices.

stlread() outputs 2 matrices that can be immediately ploted using patch()

Usage

Retrieving the vertices and faces is easy

%assuming you have a file "sample.stl"
[vertices, faces, c] = stlread('sample.stl');

In order to plot these you might follow with

patch( 'Faces', faces, 'Vertices', vertices );

Limitations

Thanks to edits by @zmughal code runs ~100x faster now. most STLs <40 MB should be quick.

Future

stlview() function is being tested. it may be incorporated into the stlread() function, or become an independent function.

About

An STLread function for octave

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages