The stl Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The stl Reference Manual

This is the stl Reference Manual, generated automatically by Declt version 2.3 "Robert April" on Wed Mar 14 04:37:15 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

This is a small library for reading the triangle data in binary STL files.

Here is a small example showing how to read a file and compute the area of the triangles in it.


    CL-USER> (ql:quickload :stl)
    To load "stl":
      Load 1 ASDF system:
        stl
    ; Loading "stl"
    ...
    (:STL)
    CL-USER> (defparameter *cube* (stl:read-stl "~/3d_models/cube.stl"))
    *CUBE*
    CL-USER> (stl:stl-area *cube*)
    24.000002
    CL-USER>

Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 stl

Author

Jeremiah LaRocco <jeremiah.larocco@gmail.com>

License

ISC

Description

Load triangle data from binary stereolithography (STL) files.

Dependency

3d-vectors

Source

stl.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 stl.asd

Location

stl.asd

Systems

stl (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 stl/package.lisp

Parent

stl (system)

Location

package.lisp

Packages

stl


Previous: , Up: Lisp files   [Contents][Index]

3.1.3 stl/stl.lisp

Dependency

package.lisp (file)

Parent

stl (system)

Location

stl.lisp

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 stl

Source

package.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Functions

Function: bounding-box TRIANGLES
Package

stl

Source

stl.lisp (file)

Function: distance PT1 PT2

Compute the distance between two points.

Package

stl

Source

stl.lisp (file)

Function: read-stl FNAME

Read an STL file from fname and return the vector of triangles.

Package

stl

Source

stl.lisp (file)

Function: to-opengl TRIANGLES &key COLOR
Package

stl

Source

stl.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Generic functions

Generic Function: area OBJECT
Package

stl

Methods
Method: area (TRIANGLES simple-vector)

Compute the area of a vector of triangles.

Source

stl.lisp (file)

Method: area (TRI triangle)

Compute the area of a triangle.

Source

stl.lisp (file)

Method: area OBJECT
Source

stl.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Classes

Class: triangle ()
Package

stl

Source

stl.lisp (file)

Direct superclasses

standard-object (class)

Direct methods

area (method)

Direct slots
Slot: normal
Type

3d-vectors:vec3

Initargs

:normal

Slot: pt1
Type

3d-vectors:vec3

Initargs

:pt1

Slot: pt2
Type

3d-vectors:vec3

Initargs

:pt2

Slot: pt3
Type

3d-vectors:vec3

Initargs

:pt3

Slot: attribute
Type

fixnum

Initargs

:attribute

Initform

0


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Special variables

Special Variable: *float-byte-size*

Size of an STL float in bytes.

Package

stl

Source

stl.lisp (file)

Special Variable: *point-byte-size*

Size of an STL point in bytes.

Package

stl

Source

stl.lisp (file)

Special Variable: *triangle-byte-size*

Size of an STL triangle in bytes.

Package

stl

Source

stl.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Functions

Function: compute-triangle-normal TRI

Compute the normal of a triangle.

Package

stl

Source

stl.lisp (file)

Function: get-float ARR

Interpret four bytes in arr as a single-float.

Package

stl

Source

stl.lisp (file)

Function: get-point ARR

Create a point using x, y, and z values read from arr.

Package

stl

Source

stl.lisp (file)

Function: get-s4 ARR

Interpret four bytes in arr as an ’(signed-byte 32)

Package

stl

Source

stl.lisp (file)

Function: get-triangle ARR

Read a triangle from arr.

Package

stl

Source

stl.lisp (file)

Function: get-u2 ARR

Interpret two bytes in arr as an ’(unsigned-byte 32)

Package

stl

Source

stl.lisp (file)

Function: get-u4 ARR

Interpret the four bytes in arr as an ’(unsigned-byte 32)

Package

stl

Source

stl.lisp (file)

Function: zero-point PT
Package

stl

Source

stl.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   L   S  
Index Entry  Section

F
File, Lisp, stl.asd: The stl<dot>asd file
File, Lisp, stl/package.lisp: The stl/package<dot>lisp file
File, Lisp, stl/stl.lisp: The stl/stl<dot>lisp file

L
Lisp File, stl.asd: The stl<dot>asd file
Lisp File, stl/package.lisp: The stl/package<dot>lisp file
Lisp File, stl/stl.lisp: The stl/stl<dot>lisp file

S
stl.asd: The stl<dot>asd file
stl/package.lisp: The stl/package<dot>lisp file
stl/stl.lisp: The stl/stl<dot>lisp file

Jump to:   F   L   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   A   B   C   D   F   G   M   R   T   Z  
Index Entry  Section

A
area: Exported generic functions
area: Exported generic functions
area: Exported generic functions
area: Exported generic functions

B
bounding-box: Exported functions

C
compute-triangle-normal: Internal functions

D
distance: Exported functions

F
Function, bounding-box: Exported functions
Function, compute-triangle-normal: Internal functions
Function, distance: Exported functions
Function, get-float: Internal functions
Function, get-point: Internal functions
Function, get-s4: Internal functions
Function, get-triangle: Internal functions
Function, get-u2: Internal functions
Function, get-u4: Internal functions
Function, read-stl: Exported functions
Function, to-opengl: Exported functions
Function, zero-point: Internal functions

G
Generic Function, area: Exported generic functions
get-float: Internal functions
get-point: Internal functions
get-s4: Internal functions
get-triangle: Internal functions
get-u2: Internal functions
get-u4: Internal functions

M
Method, area: Exported generic functions
Method, area: Exported generic functions
Method, area: Exported generic functions

R
read-stl: Exported functions

T
to-opengl: Exported functions

Z
zero-point: Internal functions

Jump to:   A   B   C   D   F   G   M   R   T   Z  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
A   N   P   S  
Index Entry  Section

*
*float-byte-size*: Internal special variables
*point-byte-size*: Internal special variables
*triangle-byte-size*: Internal special variables

A
attribute: Exported classes

N
normal: Exported classes

P
pt1: Exported classes
pt2: Exported classes
pt3: Exported classes

S
Slot, attribute: Exported classes
Slot, normal: Exported classes
Slot, pt1: Exported classes
Slot, pt2: Exported classes
Slot, pt3: Exported classes
Special Variable, *float-byte-size*: Internal special variables
Special Variable, *point-byte-size*: Internal special variables
Special Variable, *triangle-byte-size*: Internal special variables

Jump to:   *  
A   N   P   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S   T  
Index Entry  Section

C
Class, triangle: Exported classes

P
Package, stl: The stl package

S
stl: The stl system
stl: The stl package
System, stl: The stl system

T
triangle: Exported classes

Jump to:   C   P   S   T