mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-09-02 09:12:51 +02:00
phillips_drive bugfix:
wing angle corrected from ~70 deg to 92 deg adjusted cutouts so length "b" in the spec is correct (this causes the cutout to not align with the end so it doesn't look as pretty, but the spec wins, right?) Changed construction method to avoid z-fighting which gave rise to failed render doc fixes and shifting in paths.scad decompose_path -> polygon_parts
This commit is contained in:
@@ -1036,6 +1036,7 @@ module HSV(h,s=1,v=1,a=1) color(HSV(h,s,v),a) children();
|
||||
// Arguments:
|
||||
// list = The list of items to iterate through.
|
||||
// stride = Consecutive colors stride around the color wheel divided into this many parts.
|
||||
// maxhues = max number of hues to use (to prevent lots of indistinguishable hues)
|
||||
// Side Effects:
|
||||
// Sets the color to progressive values along the ROYGBIV spectrum for each item.
|
||||
// Sets `$idx` to the index of the current item in `list` that we want to show.
|
||||
@@ -1045,11 +1046,14 @@ module HSV(h,s=1,v=1,a=1) color(HSV(h,s,v),a) children();
|
||||
// Example(2D):
|
||||
// rgn = [circle(d=45,$fn=3), circle(d=75,$fn=4), circle(d=50)];
|
||||
// rainbow(rgn) stroke($item, closed=true);
|
||||
module rainbow(list, stride=1)
|
||||
module rainbow(list, stride=1, maxhues)
|
||||
{
|
||||
ll = len(list);
|
||||
huestep = 360 / ll;
|
||||
hues = shuffle([for (i=[0:1:ll-1]) posmod(i*huestep+i*360/stride,360)]);
|
||||
maxhues = first_defined([maxhues,ll]);
|
||||
huestep = 360 / maxhues;
|
||||
hues = [for (i=[0:1:ll-1]) posmod(i*huestep+i*360/stride,360)];
|
||||
echo(hues=hues);
|
||||
s = [for (i=[0:1:ll-1]) [.5,.7,1][posmod(i,3)]];
|
||||
for($idx=idx(list)) {
|
||||
$item = list[$idx];
|
||||
HSV(h=hues[$idx]) children();
|
||||
|
Reference in New Issue
Block a user