STLParser

class STLParser

Parses STL files, and returns a Polyhedron. Note, STL comes in two flavours, binary and text. To distinguish between the two, we check the first 5 bytes, and if it reads solid, then it is assumed to be an ascii file. However, I have seen binary STL files with an (erroneous?) header. In this case, use parseBinaryFile, instead of the more usual parseFile (which attempts to guess the flavour).

https://en.wikipedia.org/wiki/STL_(file_format)

I use STLParse when I want to take an existing model created by somebody else, and play with it from within FooCAD.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

If your model doesn't render correctly, it may be due to the STL file being inside out. i.e. the points making up the faces are in to wrong order.

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun parse(file: File): Polyhedron
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun parseFile(filename: String): Polyhedron