ModelWithSlicerOverrides

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

Inheritors

Functions

Link copied to clipboard
abstract fun build(): Shape3d

Creates the default shape to be built/printed. A Model may be composed of many pieces, in which case, build should create the "main" piece, or possibly all pieces to be printed on a single plate.

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
abstract fun slicerOverrides(): SlicerValues?
abstract fun slicerOverrides(pieceName: String?): SlicerValues?
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.