stl

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package stl gets processes pb.STLFiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type STL

type STL struct {
	// MBB is the minimum bounding box for the entire STL file.
	MBB gl.Box
	// Mesh is the mesh of triangles.
	Mesh *gl.Mesh
	// The dimensions for the model.
	ModelDimX, ModelDimY, ModelDimZ int
	// The dimensions for each subregion.
	DimX, DimY, DimZ int
	// MMPV is the millimeters per voxel of the model.
	MMPV float64
	// SubregionScale represents the scale for each subregion.
	SubregionScale float64
}

STL represents a converted STL file to a mesh.

func New

func New(p *pb.STLFile, dim, nX, nY, nZ int64) (*STL, error)

New parses a pb.STLFile and returns an STL. dim represents the number of voxels in the widest dimension. nX, nY, nZ represent the number of subdivisions in each dimension.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL