Spaces:
Sleeping
Sleeping
| {% if include_base %} | |
| module base() { | |
| scale([{{ scale_x }}, {{ scale_y }}, {{ scale_z }}]) { | |
| color({{ base_color }}) linear_extrude(height = 100) projection(cut = true) { | |
| surface(file="{{ base_rel_path }}", center=false); | |
| } | |
| } | |
| } | |
| {% endif %} | |
| module front_masks() { | |
| scale([{{ scale_x }}, {{ scale_y }}, {{ overlay_scale_z }}]) { | |
| {% for mask_path, mask_color in front_mask_paths_and_colors %} | |
| color({{ mask_color }}) linear_extrude(height = 100) projection(cut = true) { | |
| surface(file="{{ mask_path }}", center=false); | |
| } | |
| {% endfor %} | |
| } | |
| } | |
| module back_masks() { | |
| translate([0, 0, {{ (scale_z - overlay_scale_z) * 100 }}]) { | |
| scale([{{ scale_x }}, {{ scale_y }}, {{ overlay_scale_z }}]) { | |
| {% for mask_path, mask_color in back_mask_paths_and_colors %} | |
| color({{ mask_color }}) linear_extrude(height = 100) projection(cut = true) { | |
| surface(file="{{ mask_path }}", center=false); | |
| } | |
| {% endfor %} | |
| } | |
| } | |
| } | |
| {% if include_base %} | |
| difference() { | |
| base(); | |
| front_masks(); | |
| back_masks(); | |
| } | |
| {% endif %} | |
| front_masks(); | |
| back_masks(); | |