slicer

package module
v0.0.0-...-e07cf4b Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 8 Imported by: 0

README

slicer

Fast 3D mesh slicer written in Go. Writes slices to grayscale PNG files.

Install Go

First, install Go, set your GOPATH, and make sure $GOPATH/bin is on your PATH.

brew install go
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
Install Slicer
$ go get -u github.com/fogleman/slicer/cmd/slicer
Example Usage
$ slicer --help

# slice model.stl with slices that are 0.1 units thick, rendering PNGs that
# cover 100x100 units in size with resolution of 10 pixels per unit
$ slicer -s 0.1 -w 100 -h 100 -x 10 model.stl 
Example Slice

Example

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layer

type Layer struct {
	Z     float64
	Paths []Path
}

func SliceMesh

func SliceMesh(m *fauxgl.Mesh, step float64) []Layer

func (Layer) SVG

func (layer Layer) SVG() string

type Path

type Path []fauxgl.Vector

func (Path) Chop

func (p Path) Chop(step float64) Path

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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