class CanLid : AbstractModel() { @Custom( about = "The external diameter of the can's lip" ) // Which is the internal diameter of this part (excluding the clip) // 53.8 for aluminum drink cans. // 74.5 for steel food tins var innerD = 53.8 // I've commented out the remaining "@Custom" lines, because I only want to change the diameter. //@Custom( about= "The thickness of the edges" ) var thickness = 3.0 //@Custom( about= "Thickness of the base" ) var baseT = 1.2 //@Custom( about= "The height of the can's lip" ) var lipH = 2.2 //@Custom( about="The height of the chamfered edge which clips onto the can" ) var clipH = 0.8 var extraHeight = 2.6 override fun build() : Shape3d { val profile = PolygonBuilder().apply { moveTo( 0,0 ) lineTo( innerD/2 + thickness, 0 ) lineTo( innerD/2 + thickness, baseT + extraHeight + lipH + clipH*2 ) lineTo( innerD/2, baseT + extraHeight + lipH + clipH*2 ) lineTo( innerD/2 - clipH, baseT + extraHeight+ lipH + clipH ) lineTo( innerD/2, baseT + lipH ) lineTo( innerD/2, baseT ) lineTo( 0, baseT ) }.build() .roundCorner(1,0.4,1) // Add a tiny chamfer and "fix" elephants foot. return profile.revolve() } }