relativity.scad
relativity.scad copied to clipboard
align() 'steps on' color() calls beneath it
It appears that 'color()' directives underneath an align()
directive are ignored. I rely on colors to understand the resulting picture, so this is a rather serious hindrance for me. I am new to OpenSCAD, so I don't know that digging in to solve this myself is probably not a good approach.
I've tried to use colored()
but the output results appear to be the same. The stumper is that the demo with the sphere and rods works. I've been trying to make slow, incremental changes to the demo, but once I get my two boxes involved, something goes wonky.
Oh yeah, and every time I use colored, I get a lot of these warnings:
Here are some examples:
No call to align()
, both colors show up:
{ // Both colors shown
color([ 1, 0, 0, 0.3 ])
box([ housing_botton_length, housing_bottom_width, servo_body_height ], anchor = [ -1, -1, -1 ]);
color([ 0, 0, 1, 1 ])
box([ housing_cutout_length, housing_cutout_width, housing_cutout_height ], anchor = [ 1, 1, -1 ]);
} // Both colors shown
Output:
Call to color()
above align()
call, both boxes are the same (top) color:
{ // Both boxes red
color([ 1, 0, 0, 0.3 ])
box([ housing_botton_length, housing_bottom_width, servo_body_height ], anchor = [ 1, 1, -1 ])
color([ 0, 0, 1, 1 ])
align([ 0, 0, 1 ])
box([ housing_cutout_length, housing_cutout_width, housing_cutout_height ], anchor = [ 1, 1, -1 ]);
} // Both boxes red
Output:

Call to color()
below align()
call, both boxes are the same (top) color:
{ // Both boxes red
color([ 1, 0, 0, 0.3 ])
box([ housing_botton_length, housing_bottom_width, servo_body_height ], anchor = [ 1, 1, -1 ])
align([ 0, 0, 1 ])
color([ 0, 0, 1, 1 ])
box([ housing_cutout_length, housing_cutout_width, housing_cutout_height ], anchor = [ 1, 1, -1 ]);
} // Both boxes red
Output:

I don't know enough about relativity.scad
to know if this is my fault somehow, or not, but it's making things rather tough to suss out. If it's my fault, and anyone knows what's going on here I'd appreciate the help. Thanks!