Comments (9)
I also get
WARNING: len() parameter could not be converted, in file lib/BOSL/compat.scad, line 75
not sure from what source.
Line 60:
function is_str(v) = (version_num()>=20190303)? is_string(v) : (is_def(v) && is_def(len(v)) && (len(str(v,v)) == len(v)*2));
Line 75:
function is_array(v) = (version_num()>=20190303)? is_list(v) : (!is_str(v) && is_def(len(v)));
from bosl.
I cannot seem to reproduce this warning.
from bosl.
Hmm. The code you quoted does not match my code. Can you fetch the dev branch and try again with it?
from bosl.
My is_def, is_boolean, is_scalar, is_str, and is_array all return the correct results for all value types under both OpenSCAD 2019-03-03 and 2015-03-03
from bosl.
My version returns 2019 01 0, so it fails all the version tests, which require that the version be larger than this. It appears that is_str() is causing an error message because it calls is_def(len(v)) and for v=1, this prints the above error.
from bosl.
Really starting to get aggravated at the OpenSCAD developers completely botching their release versioning. I can't change the version test to accept 20190100, because they released an RC2 that reports that version, that doesn't support is_* calls. Yet they released another RC3 that doesn't have is_* calls, but still reports 20190100. AND it throws warnings about len(scalar) now.
And I can't test that version, without having to jump through compilation hoops, because it wasn't released on OS X.
I have an idea, though... Try this definition of is_str:
function is_str(v) = (version_num() > 20190100)? is_string(v) : (v=="" || (is_def(v) && is_def(v[0]) && (len(str(v,v)) == len(v)*2)));
from bosl.
Should be fixed in master branch commit 57adf91
from bosl.
I tried the previous code that produced the warning and it's no longer doing it.
from bosl.
Closing!
from bosl.
Related Issues (20)
- [BUG] Possible version incompatibility / document compatibility HOT 2
- [BUG] Cuboid fillet is not applied evenly on all edges. HOT 4
- pitch_radius for beveled gears HOT 1
- Internal gears HOT 1
- "constants.h" ? HOT 2
- [BUG] Many warnings when using shapes.scad HOT 7
- [BUG] HOT 1
- [BUG] - involute_gears are unusable HOT 10
- [BUG] Unexpected cuboids at the ends of trapezoidal threaded rod HOT 2
- [BUG] Joiners are buggy in OpenScad 2019.05 (stable) as well as 2021.01 (AppImage) HOT 4
- Default alignment of tube - vertically not centered HOT 1
- [BUG] Documentation - Threading.scad - Inconsistent description for default value of slop HOT 1
- [BUG] Documentation - Threading.scad - not mentioning slop only becomes effective if internal=true HOT 1
- [BUG] tube - inner diameters are not perfect if id1 does not equal id2 HOT 1
- [BUG] shapes.scad doesn't build because of syntax error in StaggeredSphere HOT 5
- [BUG] cannot find trace_polyline HOT 1
- [BUG] spread(n, spacing=10) should be equivalent to spread(n, spacing=[10, 0, 0]) HOT 1
- [BUG] ydistribute is offset
- get_metric_bolt_head_height() does not take headtype into account yet
- Number do not show
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bosl.