// Button plunger (the moving part of the button) // Assumes defined // // button_shape (plunger without relief and dugout) // // button_shape_HX = X half-extent of plunger // button_shape_HY = Y half-extent of plunger (not counting relief) // button_shape_HZ = Z half-extent of plunger // // button_dugout = the holes to dig into the button's face // button_relief = the relief to add on the button's face // button_overlay = extra objects to paste on the button's face // // button_label_HY = max abs Y extent of button_relief and button_overlay // // button_plunger_texture // // Defines // // button_plunger (plunger including dugout, relief, and overlay) // // button_plunger_HX // button_plunger_HY // button_plunger_HZ #declare button_plunger_HX = button_shape_HX #declare button_plunger_HY = button_shape_HY + button_label_HY #declare button_plunger_HZ = button_shape_HZ #declare button_plunger = merge{ merge{ difference{ object{ button_shape } object{ button_dugout translate < 0, button_shape_HY, 0 > } } object{ button_relief translate < 0, button_shape_HY, 0 > } texture{ button_plunger_texture scale < button_plunger_HX, 1, button_plunger_HZ > } } object{ button_overlay translate < 0, button_shape_HY, 0 > } }