import uk.co.nickthecoder.foocad.smartextrusion.v1.* import static uk.co.nickthecoder.foocad.smartextrusion.v1.SmartExtrusion.* import uk.co.nickthecoder.foocad.extras.v1.* import static uk.co.nickthecoder.foocad.extras.v1.Extras.* class SpoolWedge : Model { @Custom var size = Vector2( 20, 10 ) @Custom var length = 200 override fun build() : Shape3d { val shape = Triangle(size.y, size.x) .roundCorner(2,1,1) .roundCorner(1, size.y/2) val main = shape.smartExtrude( length ) .edges( Chamfer(1) ) .rotateY(-90).bottomTo(0).centerX() // String multiple copies together using unprinted filament. val holes = Circle(2.1/2).sides(6).hole() .extrude( length + 2 ) .rotateY(-90) .translateY( size.y/2 ) .centerZTo( main.size.z/2 ) .centerX() .color("Red") return main - holes } }