printer

package
v0.0.0-...-7e6833e Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package printer defines target printer profiles: everything the converter needs to retarget a project (model id, filament slot count, baseline slicer settings, filament profile names).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Profile

type Profile struct {
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	// ModelID is written as printer_model_id in Metadata/slice_info.config.
	ModelID       string `json:"printer_model_id"`
	FilamentSlots int    `json:"filament_slots"`
	// FilamentProfiles maps a material type (e.g. "PLA") to the slicer's
	// filament_settings_id.
	FilamentProfiles       map[string]string `json:"filament_profiles"`
	DefaultFilamentProfile string            `json:"default_filament_profile"`
	// ProjectSettings is a full Metadata/project_settings.config as saved
	// by the target printer's slicer.
	ProjectSettings map[string]any `json:"project_settings"`
}

func Builtin

func Builtin(name string) *Profile

func Builtins

func Builtins() []*Profile

func Load

func Load(path string) (*Profile, error)

func Resolve

func Resolve(nameOrPath string) (*Profile, error)

Resolve accepts either a built-in profile name or a path to a profile JSON file.

func (*Profile) FilamentProfile

func (p *Profile) FilamentProfile(materialType string) string

func (*Profile) MaterialTypes

func (p *Profile) MaterialTypes() []string

func (*Profile) Validate

func (p *Profile) Validate() error

Jump to

Keyboard shortcuts

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