ctb

package
v0.0.0-...-a64a187 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package ctb handle input and output of Chitubox DLP/LCD printables

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter struct {
	*pflag.FlagSet

	EncryptionSeed uint32
	Version        int
}

func NewFormatter

func NewFormatter(suffix string) (cf *Formatter)

func (*Formatter) Decode

func (cf *Formatter) Decode(file uv3dp.Reader, filesize int64) (printable uv3dp.Printable, err error)

func (*Formatter) Encode

func (cf *Formatter) Encode(writer uv3dp.Writer, printable uv3dp.Printable) (err error)

Save a uv3dp.Printable in CTB format

type Keyring

type Keyring struct {
	Init uint32
	Key  uint32
	// contains filtered or unexported fields
}

func NewKeyring

func NewKeyring(seed uint32, slice uint32) (kr *Keyring)

Key encoding provided by: https://github.com/cbiffle/catibo/blob/master/doc/cbddlp-ctb.adoc

func (*Keyring) Next

func (kr *Keyring) Next() (k byte)

func (*Keyring) Read

func (kr *Keyring) Read(buff []byte) (size int, err error)

type Print

type Print struct {
	uv3dp.Print
	// contains filtered or unexported fields
}

func (*Print) LayerExposure

func (ctb *Print) LayerExposure(index int) (exposure uv3dp.Exposure)

func (*Print) LayerImage

func (ctb *Print) LayerImage(index int) (layerImage *image.Gray)

func (*Print) LayerZ

func (ctb *Print) LayerZ(index int) (z float32)

Jump to

Keyboard shortcuts

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