class BoxRepair : Model { @Custom var innerRadius = 30 @Custom var width = 10 @Custom var cornerLess = 2 @Custom var thickness = 0.9 @Custom var length = 40 @Piece fun corner() : Shape3d { val outerRadius = innerRadius + width val profile = (Circle( outerRadius ) - Circle( innerRadius )) intersection Square( outerRadius + 10 ).translate( cornerLess, cornerLess ) return profile.extrude( thickness ) } @Piece fun straight() = Cube( width, length, thickness ) override fun build() : Shape3d { return corner() + straight().rightTo(0) } }