package uk.co.nickthecoder.foocad.woodworking.v1 @Data class Plywood( val name : String, @Custom val thickness : double, @Custom val color : Color ) : Customisable { constructor( name : String, thickness : double ) : this( name, thickness, Color.valueOf("Khaki") ) constructor( name : String, thickness : double, color : String ) : this( name, thickness, Color.valueOf(color) ) meth color( color : String ) = color( Color.valueOf( color ) ) meth cut( shape : Shape2d ) = CutPieceOfPlywood( this, shape ) meth cut( width : double, depth : double ) = CutPieceOfPlywood( this, Square(width, depth) ) }