import uk.co.nickthecoder.foocad.extras.v1.* import static uk.co.nickthecoder.foocad.extras.v1.Extras.* class Scraper : Model { var width = 50 var handleSize = Vector3( 16, 70, 6 ) var thickness = 3 override fun build() : Shape3d { val endShape = Trapezium( width, width*0.4 ) .deltaX(-(width - handleSize.x)/2) .centerX() val handleShape = Square( handleSize.x, handleSize.y ) .centerX().frontTo( endShape.back ) val shape = (endShape + handleShape).toPolygon() .roundCorner(3,20) .roundCorner(2,5) .roundCorner(1,5) .roundCorner(0,20) val inside = ( handleShape.offset( -thickness ) - Square( width, thickness ).centerYTo( handleShape.middle.y ).centerX() ).roundAllCorners(2) val angle = Cube( 100 ).centerX() .backTo(0) .rotateX(-75) return (shape - inside).extrude(handleSize.z) - angle } }