FooCAD Source Codeimport static uk.co.nickthecoder.foocad.layout.Layout2d.*
import static uk.co.nickthecoder.foocad.layout.Layout3d.*
/**
Reusable rims to add to cardboard spools, such as those from 3dqf.co.uk :
https://www.3dqf.co.uk/pla-product
I really like their cardboard spools, because it's such a waste to throw away so much
plastic when a spool is empty. However, I like spool holders that run on the rims,
rather then the center of the spool, so the cardboard spools are annoying.
I tried winding the filament onto a spare plastic spool, but this caused the spool to
jam, due to imperfect winding (I could try again!)
This model creates re-usable rims which I can glue to the cardboard.
When the filament is used, tear away from the cardbord, and re-use the rims on another
cardboard spool.
Fingers crossed that 3dqf don't change their design, or stop trading!
*/
class SpoolRim : Model {
@Custom
// The size of the cardboard spool
var diameter = 92 + 54*2
@Custom
// The diameter of the hole in the final model
var inner = 92
var thickness = 0.8
// The radius of the rounded rim
var round = 3.0
var holeCount = 8
override fun build() : Shape3d {
val profile = Square( diameter/2 - inner/2 + round, thickness).translateX(inner/2) +
Circle( round ).sides(16).translate(diameter/2 + round, round )
val hole = Circle( (diameter-inner) * 0.18 ).translateX( (diameter + inner) / 4 )
val holes = hole.extrude( thickness * 3 ).translateZ( -thickness )
.repeatAroundZ( holeCount )
return profile.revolve().sides(120) - holes
}
}