Fix issues with len() giving errors
This commit is contained in:
parent
bd761409f7
commit
b88fc567ba
|
@ -155,7 +155,7 @@ module donutSlice(innerSize,outerSize, start_angle, end_angle) {
|
||||||
{
|
{
|
||||||
pieSlice(outerSize, start_angle, end_angle);
|
pieSlice(outerSize, start_angle, end_angle);
|
||||||
|
|
||||||
if(len(innerSize) > 1)
|
if(is_list(innerSize) && len(innerSize) > 1)
|
||||||
ellipse(innerSize[0]*2,innerSize[1]*2);
|
ellipse(innerSize[0]*2,innerSize[1]*2);
|
||||||
else
|
else
|
||||||
circle(innerSize);
|
circle(innerSize);
|
||||||
|
@ -163,8 +163,8 @@ module donutSlice(innerSize,outerSize, start_angle, end_angle) {
|
||||||
}
|
}
|
||||||
|
|
||||||
module pieSlice(size, start_angle, end_angle) { //size in radius(es)
|
module pieSlice(size, start_angle, end_angle) { //size in radius(es)
|
||||||
rx = len(size) > 1? size[0] : size;
|
rx = (is_list(size) && len(size) > 1)? size[0] : size;
|
||||||
ry = len(size) > 1? size[1] : size;
|
ry = (is_list(size) && len(size) > 1)? size[1] : size;
|
||||||
trx = rx* sqrt(2) + 1;
|
trx = rx* sqrt(2) + 1;
|
||||||
try = ry* sqrt(2) + 1;
|
try = ry* sqrt(2) + 1;
|
||||||
a0 = (4 * start_angle + 0 * end_angle) / 4;
|
a0 = (4 * start_angle + 0 * end_angle) / 4;
|
||||||
|
@ -175,7 +175,7 @@ module pieSlice(size, start_angle, end_angle) { //size in radius(es)
|
||||||
|
|
||||||
if(end_angle > start_angle)
|
if(end_angle > start_angle)
|
||||||
intersection() {
|
intersection() {
|
||||||
if(len(size) > 1)
|
if(is_list(size) && len(size) > 1)
|
||||||
ellipse(rx*2,ry*2);
|
ellipse(rx*2,ry*2);
|
||||||
else
|
else
|
||||||
circle(rx);
|
circle(rx);
|
||||||
|
|
|
@ -145,7 +145,7 @@ METRIC_BOLT_CAP_DIAMETERS =
|
||||||
[
|
[
|
||||||
-1, //0 index is not used but reduces computation
|
-1, //0 index is not used but reduces computation
|
||||||
-1,
|
-1,
|
||||||
-1,
|
3.8,
|
||||||
5.50,//m3
|
5.50,//m3
|
||||||
7.00,//m4
|
7.00,//m4
|
||||||
8.50,//m5
|
8.50,//m5
|
||||||
|
|
Loading…
Reference in a new issue