stl_colour() now used in tests and examples.

This commit is contained in:
Chris Palmer 2020-04-06 10:27:17 +01:00
parent 65455930f8
commit d42f99e437
11 changed files with 16 additions and 16 deletions

View File

@ -164,7 +164,7 @@ This is achieved by having a pair of modules: -
module handle_assembly() pose([225, 0, 150], [0, 0, 14]) //! Printed part with inserts in place
assembly("handle") {
translate_z(handle_height())
color(pp1_colour) vflip() handle_stl();
stl_colour(pp1_colour) vflip() handle_stl();
handle_screw_positions()
vflip()

View File

@ -67,7 +67,7 @@ module widgit_dxf() {
//! * Push the insert into the base with a soldering iron heated to 200°C
module widgit_base_assembly()
assembly("widgit_base") {
color(pp1_colour)
stl_colour(pp1_colour)
widgit_stl();
translate_z(height)

View File

@ -22,14 +22,14 @@ use <../printed/cable_grommets.scad>
module cable_grommets() {
rotate(90)
color(pp1_colour) ribbon_grommet(20, 3);
stl_colour(pp1_colour) ribbon_grommet(20, 3);
translate([20, 0])
round_grommet_assembly(6, 3);
translate([40, 0])
rotate(90)
color(pp1_colour) mouse_grommet(5, 3);
stl_colour(pp1_colour) mouse_grommet(5, 3);
}
if($preview)

View File

@ -20,15 +20,15 @@ include <../utils/core/core.scad>
use <../printed/carriers.scad>
module carriers() {
color(pp1_colour) ESP12F_carrier_stl();
stl_colour(pp1_colour) ESP12F_carrier_stl();
translate([0, 15])
rotate(90)
color(pp1_colour) TP4056_carrier_stl();
stl_colour(pp1_colour) TP4056_carrier_stl();
translate([0, 25])
rotate(90)
color(pp1_colour) MT3608_carrier_stl();
stl_colour(pp1_colour) MT3608_carrier_stl();
}
carriers();

View File

@ -24,6 +24,6 @@ use <../utils/layout.scad>
module fan_guards()
layout([for(f = fans) fan_width(f)], 10)
color(pp1_colour) fan_guard(fans[$i], spokes = fan_width(fans[$i]) > 60 ? 8 : 4);
stl_colour(pp1_colour) fan_guard(fans[$i], spokes = fan_width(fans[$i]) > 60 ? 8 : 4);
fan_guards();

View File

@ -27,7 +27,7 @@ module inserts() {
translate([10 * i, 0])
insert(inserts[i]);
color(pp1_colour)
stl_colour(pp1_colour)
translate([len(inserts) * 10, 0]) {
insert_lug(inserts[0], 2, 1);

View File

@ -29,7 +29,7 @@ module light_strips()
for(end = [-1, 1])
translate([end * (light_strip_cut_length(light, segs) / 2 - d / 2), 0])
rotate([90, 0, 90])
color(pp1_colour) render()
stl_colour(pp1_colour) render()
translate_z(-d / 2)
light_strip_clip(light);
}

View File

@ -34,7 +34,7 @@ module polyholes() {
children();
}
color(pp1_colour) linear_extrude(3, center = true)
stl_colour(pp1_colour) linear_extrude(3, center = true)
difference() {
square([100, 27]);
@ -52,7 +52,7 @@ module polyholes() {
sizes = [1.5, 2, 3, 4];
for(i = [0 : len(sizes) - 1])
translate([i * 10, -10]) {
color(pp1_colour)
stl_colour(pp1_colour)
poly_tube(ir = ir, or = cir + sizes[i] * extrusion_width, h = 1);
rod(2 * ir, 3);

View File

@ -93,7 +93,7 @@ module box1_base_stl()
module box1_assembly()
assembly("box1") {
color(pp1_colour) render() box1_case_stl();
stl_colour(pp1_colour) render() box1_case_stl();
pbox_inserts(box1);
@ -142,7 +142,7 @@ module box2_base_stl()
module box2_assembly()
assembly("box2") {
color(pp1_colour) render() box2_case_stl();
stl_colour(pp1_colour) render() box2_case_stl();
pbox_inserts(box2);

View File

@ -20,7 +20,7 @@
include <../utils/core/core.scad>
module teardrops() {
color(pp1_colour)
stl_colour(pp1_colour)
rotate([90, 0, -45])
difference() {
linear_extrude(3) {

View File

@ -54,7 +54,7 @@ module wires() {
%cylinder(r = bundle_r, h = wire_l - 10, center = true);
}
color(pp1_colour) {
stl_colour(pp1_colour) {
rotate([90, 0, 90])
linear_extrude(thickness)
difference() {