printerpart=0;//default value for the constant printerpart, it can be changed through command line using -D //https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment //use compile.sh to generate the stl files in stl/ subdirectory type=printerpart; //assign the constant value to a variable to be able to test it, even if the constant hasn't been defined in command line //pour visualisation de l'assemblage translate([-22.5, -30, -2]){ difference(){ cube([16, 12, 2], center = true); echo("Je suis passé par ici"); echo(type); if (type!=0){ translate([7, -1, 0]) scale(0.5,0.5,0.5) rotate(180,[0,1,0]) linear_extrude(height = 3.5) { #text( type, font = "Liberation Sans"); } } }