Package-level declarations

Types

Link copied to clipboard
abstract class AbstractModel : Model

This was created to implement methods of Model which no longer exist. Therefore, it no longer serves any purpose.

Link copied to clipboard
abstract class AbstractPrinter(name: String, printerProfileName: String, printProfileName: String, filamentProfileName: String) : Printer
Link copied to clipboard

Settings which are used by foocad-core. These have no dependencies on the gui application.

Link copied to clipboard
object DummyModel : Model
Link copied to clipboard
class FolderPrinter(name: String = "", printerProfileID: String = "", printProfileID: String = "", filamentProfileID: String = "", folder: File = File(""), useSubFolders: Boolean = true) : AbstractPrinter

Makes a copy of the gcode file to a specific folder.

Link copied to clipboard
class GCode(file: File)
Link copied to clipboard
interface GCodeState
Link copied to clipboard
Link copied to clipboard
class KlipperPrinter(name: String = "", printerProfileID: String = "", printProfileID: String = "", filamentProfileID: String = "", url: String = "", apiKey: String = "", useSubFolder: Boolean = true) : AbstractPrinter, UploadPrinter

https://moonraker.readthedocs.io/en/latest/web_api/#file-upload

Link copied to clipboard
interface Model : Customisable

Each foocad script should contain a single class of type Model.

Link copied to clipboard
interface ModelWithSetup : Model

Multi-piece models may wish to implement the setup method, which is called before any piece is built. Some initialisation isn't possible within the init block. For example, anything that using Custom fields (because these fields are set AFTER the class is created, but before setup and build are called.

Link copied to clipboard

A decoration to Model, which lets it define slicerOverrides without using @Slice annotations.

Link copied to clipboard
class OctoPrinter(name: String = "", printerProfileID: String = "", printProfileID: String = "", filamentProfileID: String = "", url: String = "", apiKey: String = "", useSubFolder: Boolean = true) : AbstractPrinter, UploadPrinter
Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Piece(val about: String = "", val slice: String = "", val print: String = "", val printable: Boolean = true, val picture: Boolean = false)

Add this annotation to build methods of a Model. The method must take no parameters, and return a Shape3d.

Link copied to clipboard
interface PiecesModel : Model

A decoration to Model, which lets it define the pieceNames without using @Piece annotations.

Link copied to clipboard
interface PostProcessor

If a model implements this interface, then it can post-process the gcode. For example, it can add messages into the gcode when a particular layer has been reached so that the operator can change filament.

Link copied to clipboard
interface Printer

A printer capable of printing gcode models.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.FUNCTION])
annotation class Slice(val brimWidth: Double = UNSET_DOUBLE, val brimWidthInterior: Double = UNSET_DOUBLE, val layerHeight: Double = UNSET_DOUBLE, val firstLayerHeight: Double = UNSET_DOUBLE, val infillEveryLayers: Int = UNSET_INT, val solidInfillEveryLayers: Int = UNSET_INT, val temperature: Int = UNSET_INT, val firstLayerTemperature: Int = UNSET_INT, val bedTemperature: Int = UNSET_INT, val firstLayerBedTemperature: Int = UNSET_INT, val slowdownBelowLayerTime: Int = UNSET_INT, val maxSpeedReduction: Int = UNSET_INT, val minPrintSpeed: Int = UNSET_INT, val perimeters: Int = UNSET_INT, val onlyOnePerimeterTop: Int = UNSET_INT, val spiralVase: Int = UNSET_INT, val topSolidLayers: Int = UNSET_INT, val bottomSolidLayers: Int = UNSET_INT, val fillDensity: Int = UNSET_INT, val supportMaterial: Int = UNSET_INT, val supportMaterialThreshold: Double = UNSET_DOUBLE, val supportMaterialBuildplateOnly: Int = UNSET_INT, val travelSpeed: Double = UNSET_DOUBLE, val perimeterSpeed: Double = UNSET_DOUBLE, val smallPerimeterSpeed: Double = UNSET_DOUBLE, val externalPerimeterSpeed: Double = UNSET_DOUBLE, val infillSpeed: Double = UNSET_DOUBLE, val solidInfillSpeed: Double = UNSET_DOUBLE, val topSolidInfillSpeed: Double = UNSET_DOUBLE, val supportMaterialSpeed: Double = UNSET_DOUBLE, val supportMaterialInterfaceSpeed: Double = UNSET_DOUBLE, val bridgeSpeed: Double = UNSET_DOUBLE, val gapFillSpeed: Double = UNSET_DOUBLE, val firstLayerSpeed: Double = UNSET_DOUBLE, val maxVolumetricSpeed: Double = UNSET_DOUBLE)
Link copied to clipboard
Link copied to clipboard

Optional values which are passed to the slicer command line program.

Link copied to clipboard
Link copied to clipboard

Used by ModelExtensions.

Functions

Link copied to clipboard
fun Model.buildPiece(pieceName: String?): Shape3d

Builds a piece by looking for a method called pieceName with a Piece annotation.

Link copied to clipboard
Link copied to clipboard
fun Model.pieceAnnotation(pieceName: String? = null): Piece?
Link copied to clipboard

Returns piece names by looking Piece annotations on methods.

Link copied to clipboard

The same as pieceNames, but includes the "default" pieceName of null as the first item in the list.

Link copied to clipboard
fun Model.printPieceName(pieceName: String?): String?
Link copied to clipboard

Returns SlicerValues by looking for Slice annotations on the build method.

Returns SlicerValues by looking for Slice annotations on the method named pieceName or the build method if pieceName is null.