Compare commits

...

80 commits

Author SHA1 Message Date
Marius Kintel
6f68c9fc9b Revert "Bump version to 2015.03-3"
This reverts commit 9d8e9b5679.
2016-02-23 02:01:51 -05:00
Marius Kintel
e243246298 Revert "Updated release date"
This reverts commit fb8b0509b9.
2016-02-23 02:01:22 -05:00
Marius Kintel
fb8b0509b9 Updated release date 2016-02-23 01:57:45 -05:00
Marius Kintel
d73ddc3161 #1588 Set SUFeedURL to fix Sparkle-related crash. add http download exception for now 2016-02-23 01:57:31 -05:00
Marius Kintel
9d8e9b5679 Bump version to 2015.03-3 2016-02-23 01:54:07 -05:00
Marius Kintel
e316bec7dc sync with master 2016-02-17 16:34:22 -05:00
Marius Kintel
7dd4c02e6d Revert "Bump version to 2015.03-3"
This reverts commit dc710c110f.
2016-02-17 16:27:58 -05:00
Marius Kintel
00af9cc12f Updated release notes 2016-02-17 16:16:22 -05:00
Marius Kintel
dc710c110f Bump version to 2015.03-3 2016-02-17 16:12:34 -05:00
Marius Kintel
cfdc3c71c2 Security update: Upgraded Sparkle to 1.13.1 2016-02-17 16:08:38 -05:00
Marius Kintel
57ab1796b2 #1491 Clarified sparkle-related license 2015-11-16 11:44:08 -05:00
Marius Kintel
5edef7ef86 sync with 2015.03-2 2015-11-16 00:32:53 -05:00
Marius Kintel
14cf51b9d1 Revert "Bumped version to 2015.03-2"
This reverts commit 1d56186111.
2015-11-16 00:12:02 -05:00
Marius Kintel
1d56186111 Bumped version to 2015.03-2 2015-11-16 00:11:43 -05:00
Marius Kintel
f22e688424 #1481 Make sure we start animation when Steps are updated 2015-11-16 00:10:22 -05:00
Marius Kintel
614f82f270 Added release notes for 2015.03-2 2015-11-15 20:02:22 -05:00
Marius Kintel
375eba5a1f Added release notes for 2015.03-1 2015-11-15 20:01:49 -05:00
Marius Kintel
b4f765f8a4 #669 Support libc++ in macosx-sanity-check 2015-11-15 02:41:33 -05:00
Marius Kintel
406a4906c5 Added support for @rpath 2015-11-15 02:40:40 -05:00
Marius Kintel
a7ee1f2bcd #1479 Be more robust when passed invalid value 2015-11-15 01:53:39 -05:00
Marius Kintel
9511a12eb4 bugfix: #1481 don't divide by zero 2015-11-15 01:35:21 -05:00
Hans L
e36d59bdbf Fix Z-fighting in Ortho view, Issue #1483 2015-11-13 12:04:57 -05:00
Marius Kintel
461388402f #1472 Another attempt at fixing; fix the iterator 2015-11-09 21:14:12 -05:00
Marius Kintel
3791cb8b6a #1472: Fixed infinite loop when passing NaN to for loops 2015-11-09 19:53:09 -05:00
Marius Kintel
888e81b3b1 #1472: Fixed infinite loop when passing NaN to for loops 2015-11-09 18:16:03 -05:00
Marius Kintel
5fe95c9793 Added echo OK 2015-11-09 18:15:53 -05:00
Marius Kintel
4ced104ef5 #1472 Added test case 2015-11-09 18:15:41 -05:00
Don Bright
71ab915a5f use boost cstdint.hpp, prevent "int32_t does not name a type" error on new gcc 2015-11-01 21:39:26 -05:00
Don
1a534f2589 add some updated notes on MXE cross build 2015-11-01 21:39:10 -05:00
Don
cc92ba5a80 updates to MXE/win cross-build. use mingw64.static build dir.
check for 'zip' command when building package. auto detect mxe in /opt/mxe
2015-11-01 21:38:53 -05:00
Marius Kintel
a3af70309c #452 2015.03 branch still uses separate executable for tests, causing some numbers to be output differently 2015-10-26 17:55:18 -04:00
don bright
e7434abe40 simplify documentation, for deeper knowledge people should follow urls 2015-10-26 15:57:46 -04:00
don bright
b0f42558fc remove extraneous space 2015-10-26 15:57:41 -04:00
don bright
a7aaec1376 improve documentation of number conversion function (again) 2015-10-26 15:57:35 -04:00
don bright
74f4818837 better documentation of number conversion function 2015-10-26 15:57:30 -04:00
don bright
c5f65e9146 add convenience search for openscad binary under openscad/bin/openscad 2015-10-26 15:57:13 -04:00
Don Bright
d69065792f update test results to match output verbiage 2015-10-26 15:55:37 -04:00
don bright
9faf28b6a0 convenience search of openscad gui binary, for test run 2015-10-26 15:55:21 -04:00
Don Bright
c6b49151cb add a few more tests for floating point rands() seeds, and expected results. 2015-10-26 15:50:26 -04:00
Don Bright
f47866ac2e add test results for rands() dealing with floating point seeds & infinite inputs 2015-10-26 15:50:21 -04:00
Don Bright
48177ff27c minor cleanup of unneeded code 2015-10-26 15:50:15 -04:00
Don Bright
7c62ecc49c add new tests for infinite inputs to rands() 2015-10-26 15:50:09 -04:00
Don Bright
9ce966edb8 rm my old hash, use awesome floating point hash from Python, include license 2015-10-26 15:50:04 -04:00
Don Bright
80cf0574e1 create better hash function for 64 double->32 bit unsigned int 2015-10-26 15:49:58 -04:00
Don Bright
829b53fb72 make rands() deal better with float input for seed, and inf input 2015-10-26 15:49:53 -04:00
Andrew Plumb
fba8130303 Manually removing WARNING echos. 2015-10-16 13:09:21 -04:00
Andrew Plumb
34c83f8ffa Manually removing WARNING echos. 2015-10-16 13:09:11 -04:00
Andrew Plumb
6f8bb211ff Found more search PRINTB warnings to remove
Conflicts:
	src/func.cc
2015-10-16 13:08:26 -04:00
Andrew Plumb
38436c36e4 Removing instead of just commenting out line. 2015-10-16 13:07:40 -04:00
Andrew Plumb
d380ba4b85 Comment out search term not found WARNING
Returning empty result should be sufficient for detecting a no-match condition.

See forum discussion http://forum.openscad.org/Suppressing-quot-search-term-not-found-quot-warning-in-search-td12359.html
2015-10-16 13:07:26 -04:00
Don Bright
c8e8f7299c add expected result of recursion-test-vector 2015-10-16 12:59:36 -04:00
Don Bright
686d66f0f9 add test for issue1407, recursion crash when vectors are parameters 2015-10-16 12:59:26 -04:00
Marius Kintel
38d80566b3 #1407 Minor Value vs. ValuePtr value/reference cleanup 2015-10-16 12:55:07 -04:00
Marius Kintel
fafd3e853f Refactored to let VectorValues use ValuePtr instead of Value, to avoid having to copy large vectors. Attempt to fix #1407
Conflicts:
	src/func.cc
2015-10-16 12:53:46 -04:00
Liam Marshall
fae761e9d2 Easier fix for 93925 (control.cc) 2015-10-16 12:51:38 -04:00
Liam Marshall
5d12761c68 Fix memory leak 93925 2015-10-16 12:51:20 -04:00
Marius Kintel
0edd05760e #1425 For backwards compatibility, revert calculation so that never reaches 1.0 2015-10-16 12:47:43 -04:00
Marius Kintel
53492199b0 #1425 Let the last animation frame correspond with =1.0, to allow people to design for a valid last frame. 2015-10-16 12:47:29 -04:00
Marius Kintel
c2ebb73f4d #1425 Correctly reset picture dump if anim steps were changed 2015-10-16 12:47:22 -04:00
Marius Kintel
2c42445a7e #1425 Implemented some improvements suggested by @DBramley 2015-09-04 12:40:40 -04:00
Marius Kintel
62984ec5dd Use integers for underlying frame counter. Fixes rounding issue #1425 2015-09-02 23:28:59 -04:00
Torsten Paul
8cd5fecfa1 Validate colors against CSS4 draft - add "RebeccaPurple". 2015-08-31 17:25:01 -04:00
Torsten Paul
2e34c8bdd1 Use QSaveFile (if available) to write designs to disk.
Always check the status of the QTextStream to catch problems like disk
full.
In addition QSaveFile can ensure the old file is not destroyed as it's
using a temporary file which is committed at the end by just renaming it
to the output file name.
2015-08-31 17:14:19 -04:00
Torsten Paul
9768a0adc9 Remove flattr icon and use styled link instead.
This change is mainly driven by Debian declaring the button non-free so
it must be removed when distributing OpenSCAD in Debian.
2015-08-31 17:06:32 -04:00
Torsten Paul
85aa71bb4b Ignore Inf/NaN parameters to linear_extrude() (fixes #1378). 2015-08-31 17:06:17 -04:00
chrysn
553fd90bd4 Change "Allow to open multiple documents" to "Allow opening"
This is for grammatical reasons. It is being discussed in
https://bugs.debian.org/795158, and "allowing" seems to be a correct
(not necessarily ideal, but not intrusive) solution.

Forwarded: no
2015-08-31 17:05:44 -04:00
chrysn
4abb4706c4 man page: Rephase colorscheme option to avoid problems with wrapping
The old version threw errors when formatted:

$ LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z ./doc/openscad.1 >/dev/null
<standard input>:85: warning [p 2, 4.7i, div `an-div', 0.0i]: cannot adjust line

This was discovered by lintian and reported as
'manpage-has-errors-from-man'.

Forwarded: no

Gbp-Pq: Name man-page-Rephase-colorscheme-option-to-avoid-problem.patch
2015-08-31 17:05:35 -04:00
chrysn
f2e67e985b Add keywords to the desktop file
Forwarded: no

Gbp-Pq: Name Add-keywords-to-the-desktop-file.patch
2015-08-31 17:05:25 -04:00
Chow Loong Jin
660c0ac736 Add hashbang to test_cmdline_tool.py
Forwarded: no

Gbp-Pq: Name Add-hashbang-to-test_cmdline_tool.py.patch
2015-08-31 17:05:19 -04:00
Torsten Paul
5ba29f07b7 Check for infinite double values when using values as index (fixes #1420).
On arm64 the integer constructor returns 0 for an input value of NaN. To
prevent this, index values are now checked against Inf/NaN and protected
against overflow using boost::numeric_cast.
2015-08-31 17:04:48 -04:00
Torsten Paul
9a6c229fc2 Use Debian7 dependencies for Linux Mint (fixes #1422). 2015-08-31 17:04:23 -04:00
Marius Kintel
e2b0b81be6 Catch RangeTest exception from clipper. Fixes #1410 2015-08-31 17:02:37 -04:00
Marius Kintel
95be0ebfe7 Handle dimensional errors in matrix multiplication, including undef values. Fixes #1356 2015-06-07 13:12:06 -04:00
Torsten Paul
3421ca117e Add more detailed installer information including version number. 2015-06-07 11:17:45 -04:00
Marius Kintel
3b4ec9173a Fix resource path search; the 'libraries' folder isn't always installed. Fixes #1342 2015-05-14 22:31:40 -04:00
Torsten Paul
a69b31a5d9 Simple detection of script and direction based on given text.
This adds a simple detection logic based on the hb_unicode_script()
function provided by harfbuzz. Automatic script selection will only
happen if no valid parameter was given (basically only in case of
a missing script parameter in text()).
If different scripts are found in a single text, the resulting value
is HB_SCRIPT_UNKNOWN.
2015-05-14 22:24:29 -04:00
Torsten Paul
41f6b85c4a Workaround for Fedora 21 builds (fixes #1254).
Fedora installs qscintilla2.prf in the wrong location and has a different
naming scheme than the one used in Ubuntu so the existing workaround fails.
This adds yet another workaround to detect the different naming for the
Qt5 version of the QScintilla2 library.
2015-05-14 22:09:48 -04:00
Miro Hrončok
a1b5d3ec0b Czech translation: Add missing space 2015-05-04 15:03:50 -04:00
Marius Kintel
be7acf4ab2 Version splitting used wrong variable, causing version() to return [0,0,0]. Fixes #1329 2015-04-28 10:20:32 -04:00
Marius Kintel
2b9949fefd #1254 Backport some code to boost filesystem V2, for old RedHat version 2015-04-26 16:12:15 -04:00
100 changed files with 3117 additions and 635 deletions

View file

@ -82,5 +82,15 @@
<string>OpenSCAD.sdef</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
<key>SUFeedURL</key>
<string>http://files.openscad.org/appcast.xml</string>
<key>NSExceptionDomains</key>
<dict>
<key>files.openscad.org</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key><true/>
<key>NSExceptionRequiresForwardSecrecy</key><false/>
</dict>
</dict>
</dict>
</plist>

View file

@ -1,6 +1,46 @@
# OpenSCAD 2015.03
## 2015.03-3
**OS X only: Auto-update vulnerability fix**
## 2015.03-2
**Bugfixes**
* \#1483 - Fix Z-fighting in Ortho view
* \#1479 - No check for infinite $fn
* \#1472 - "nan" in list comprehension causes crash
* \#452 - rands() fails when the seed is a floating point number
* \#1407 - Recursive module crash
* \#1425 - Animate Filename Generation - Duplicate/Missing Filenames
* \#1420 - expression-evaluation-tests fails on arm64
* \#1410 - Crash when a polygon contains NaN
* \#1378 - Linear extrude plus infinite twist causes crash instead of just an error
* \#1358 - Add more detailed installer information including version number
* \#1356 - Crash when multiplying matrices with undefined elements
* \#1350 - Saving file when HD is full ends up in data loss
* \#1342 - Syntax Highlighting Does Not Work on Linux Mint 17.1
* \#1337 - Simple detection of script and direction based on given text
* \#1325 - Crash when polygons with > 3 indices turn out to be degenerate
* \#1329 - version() returned ```[0,0,0]```
## 2015.03-1
**Bugfixes**
* \#1203 - Linux: Missing icons on Xfce
* \#1258 - Occasional crash when exporting STL
* \#1260 - Minimal window width too large
* \#1264 - Replace All sometimes caused a hang
* \#1274 - Fixed some preview bugs on Intel GPUs (OpenCSG 1.4.0)
* \#1276 - Module recursion sometimes caused a crash
* \#1277 - Automatic reload sometimes messed up camera position
* \#1284 - Animation flicker eliminated
* \#1294 - Support reproducible builds
* \#1317 - Normals vectors in STL were sometimes 0 0 0
## 2015.03
**Language Features:**
* Added text() module for 2D text
* Added offset() module for 2D offsets

259
doc/Python-LICENSE.txt Normal file
View file

@ -0,0 +1,259 @@
Part of OpenSCAD is copied from Python (linalg.cc/hash_floating_point()),
so the python license is included below.
----
A. HISTORY OF THE SOFTWARE
==========================
Python was created in the early 1990s by Guido van Rossum at Stichting
Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
as a successor of a language called ABC. Guido remains Python's
principal author, although it includes many contributions from others.
In 1995, Guido continued his work on Python at the Corporation for
National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
in Reston, Virginia where he released several versions of the
software.
In May 2000, Guido and the Python core development team moved to
BeOpen.com to form the BeOpen PythonLabs team. In October of the same
year, the PythonLabs team moved to Digital Creations (now Zope
Corporation, see http://www.zope.com). In 2001, the Python Software
Foundation (PSF, see http://www.python.org/psf/) was formed, a
non-profit organization created specifically to own Python-related
Intellectual Property. Zope Corporation is a sponsoring member of
the PSF.
All Python releases are Open Source (see http://www.opensource.org for
the Open Source Definition). Historically, most, but not all, Python
releases have also been GPL-compatible; the table below summarizes
the various releases.
Release Derived Year Owner GPL-
from compatible? (1)
0.9.0 thru 1.2 1991-1995 CWI yes
1.3 thru 1.5.2 1.2 1995-1999 CNRI yes
1.6 1.5.2 2000 CNRI no
2.0 1.6 2000 BeOpen.com no
1.6.1 1.6 2001 CNRI yes (2)
2.1 2.0+1.6.1 2001 PSF no
2.0.1 2.0+1.6.1 2001 PSF yes
2.1.1 2.1+2.0.1 2001 PSF yes
2.1.2 2.1.1 2002 PSF yes
2.1.3 2.1.2 2002 PSF yes
2.2 and above 2.1.1 2001-now PSF yes
Footnotes:
(1) GPL-compatible doesn't mean that we're distributing Python under
the GPL. All Python licenses, unlike the GPL, let you distribute
a modified version without making your changes open source. The
GPL-compatible licenses make it possible to combine Python with
other software that is released under the GPL; the others don't.
(2) According to Richard Stallman, 1.6.1 is not GPL-compatible,
because its license has a choice of law clause. According to
CNRI, however, Stallman's lawyer has told CNRI's lawyer that 1.6.1
is "not incompatible" with the GPL.
Thanks to the many outside volunteers who have worked under Guido's
direction to make these releases possible.
B. TERMS AND CONDITIONS FOR ACCESSING OR OTHERWISE USING PYTHON
===============================================================
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
--------------------------------------------
1. This LICENSE AGREEMENT is between the Python Software Foundation
("PSF"), and the Individual or Organization ("Licensee") accessing and
otherwise using this software ("Python") in source or binary form and
its associated documentation.
2. Subject to the terms and conditions of this License Agreement, PSF hereby
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
analyze, test, perform and/or display publicly, prepare derivative works,
distribute, and otherwise use Python alone or in any derivative version,
provided, however, that PSF's License Agreement and PSF's notice of copyright,
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013, 2014, 2015 Python Software Foundation; All Rights Reserved"
are retained in Python alone or in any derivative version prepared by Licensee.
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python.
4. PSF is making Python available to Licensee on an "AS IS"
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. Nothing in this License Agreement shall be deemed to create any
relationship of agency, partnership, or joint venture between PSF and
Licensee. This License Agreement does not grant permission to use PSF
trademarks or trade name in a trademark sense to endorse or promote
products or services of Licensee, or any third party.
8. By copying, installing or otherwise using Python, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0
-------------------------------------------
BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1
1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an
office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the
Individual or Organization ("Licensee") accessing and otherwise using
this software in source or binary form and its associated
documentation ("the Software").
2. Subject to the terms and conditions of this BeOpen Python License
Agreement, BeOpen hereby grants Licensee a non-exclusive,
royalty-free, world-wide license to reproduce, analyze, test, perform
and/or display publicly, prepare derivative works, distribute, and
otherwise use the Software alone or in any derivative version,
provided, however, that the BeOpen Python License is retained in the
Software, alone or in any derivative version prepared by Licensee.
3. BeOpen is making the Software available to Licensee on an "AS IS"
basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE
SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS
AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY
DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
5. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
6. This License Agreement shall be governed by and interpreted in all
respects by the law of the State of California, excluding conflict of
law provisions. Nothing in this License Agreement shall be deemed to
create any relationship of agency, partnership, or joint venture
between BeOpen and Licensee. This License Agreement does not grant
permission to use BeOpen trademarks or trade names in a trademark
sense to endorse or promote products or services of Licensee, or any
third party. As an exception, the "BeOpen Python" logos available at
http://www.pythonlabs.com/logos.html may be used according to the
permissions granted on that web page.
7. By copying, installing or otherwise using the software, Licensee
agrees to be bound by the terms and conditions of this License
Agreement.
CNRI LICENSE AGREEMENT FOR PYTHON 1.6.1
---------------------------------------
1. This LICENSE AGREEMENT is between the Corporation for National
Research Initiatives, having an office at 1895 Preston White Drive,
Reston, VA 20191 ("CNRI"), and the Individual or Organization
("Licensee") accessing and otherwise using Python 1.6.1 software in
source or binary form and its associated documentation.
2. Subject to the terms and conditions of this License Agreement, CNRI
hereby grants Licensee a nonexclusive, royalty-free, world-wide
license to reproduce, analyze, test, perform and/or display publicly,
prepare derivative works, distribute, and otherwise use Python 1.6.1
alone or in any derivative version, provided, however, that CNRI's
License Agreement and CNRI's notice of copyright, i.e., "Copyright (c)
1995-2001 Corporation for National Research Initiatives; All Rights
Reserved" are retained in Python 1.6.1 alone or in any derivative
version prepared by Licensee. Alternately, in lieu of CNRI's License
Agreement, Licensee may substitute the following text (omitting the
quotes): "Python 1.6.1 is made available subject to the terms and
conditions in CNRI's License Agreement. This Agreement together with
Python 1.6.1 may be located on the Internet using the following
unique, persistent identifier (known as a handle): 1895.22/1013. This
Agreement may also be obtained from a proxy server on the Internet
using the following URL: http://hdl.handle.net/1895.22/1013".
3. In the event Licensee prepares a derivative work that is based on
or incorporates Python 1.6.1 or any part thereof, and wants to make
the derivative work available to others as provided herein, then
Licensee hereby agrees to include in any such work a brief summary of
the changes made to Python 1.6.1.
4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS"
basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT
INFRINGE ANY THIRD PARTY RIGHTS.
5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1,
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
6. This License Agreement will automatically terminate upon a material
breach of its terms and conditions.
7. This License Agreement shall be governed by the federal
intellectual property law of the United States, including without
limitation the federal copyright law, and, to the extent such
U.S. federal law does not apply, by the law of the Commonwealth of
Virginia, excluding Virginia's conflict of law provisions.
Notwithstanding the foregoing, with regard to derivative works based
on Python 1.6.1 that incorporate non-separable material that was
previously distributed under the GNU General Public License (GPL), the
law of the Commonwealth of Virginia shall govern this License
Agreement only as to issues arising under or with respect to
Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this
License Agreement shall be deemed to create any relationship of
agency, partnership, or joint venture between CNRI and Licensee. This
License Agreement does not grant permission to use CNRI trademarks or
trade name in a trademark sense to endorse or promote products or
services of Licensee, or any third party.
8. By clicking on the "ACCEPT" button where indicated, or by copying,
installing or otherwise using Python 1.6.1, Licensee agrees to be
bound by the terms and conditions of this License Agreement.
ACCEPT
CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2
--------------------------------------------------
Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam,
The Netherlands. All rights reserved.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Stichting Mathematisch
Centrum or CWI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View file

@ -82,8 +82,10 @@ If exporting an image, specify the pixel width and height
If exporting an image, specify whether to use orthographic or perspective
projection
.TP
.B \-\-colorscheme=[Cornfield|Sunset|Metallic|Starnight|BeforeDawn|Nature|DeepOcean]
.B \-\-colorscheme=\fIscheme
If exporting an image, use the specified color scheme for the rendering.
\fIscheme\fP can be any of \fBCornfield\fP, \fBSunset\fP, \fBMetallic\fP,
\fBStarnight\fP, \fBBeforeDawn\fP, \fBNature\fP or \fBDeepOcean\fP.
.TP
.B \-v, \-\-version
Show version of program.

View file

@ -3,6 +3,9 @@ Given:
o Make sure we have a $VERSION branch. If not, create one
o Update releases/$VERSION.md
o scripts/makereleasenotes.sh
o Update VERSION and VERSIONDATE in
openscad.pro
scripts/publish-macosx.sh
@ -12,12 +15,16 @@ o Update VERSION and VERSIONDATE in
o git tag "openscad-$VERSION"
o ./scripts/git-archive-all.py --prefix=openscad-$VERSION/ openscad-$VERSION.src.tar.gz
o git push --tags $VERSION
o git push --tags
o Upload Source package
$ scp openscad-$VERSION.src.tar.gz openscad@files.openscad.org:www
o Write short release email to mailing list
o Tweet as OpenSCAD
o Notify package managers
o Revert VERSION and VERSIONDATE in openscad.pro scripts/publish-macosx.sh scripts/release-common.sh scripts/publish-mingw-x.sh tests/CMakeLists.txt
o Announce:
- Write short release email to mailing list
- Tweet as OpenSCAD
- Notify package managers
- Debian/Ubuntu: https://launchpad.net/~chrysn
- Ubuntu PPA: https://github.com/hyperair
- Fedora: Miro Hrončok <miro@hroncok.cz> or <mhroncok@redhat.com>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -6,3 +6,4 @@ Icon=openscad
Exec=openscad %f
MimeType=application/x-openscad;
Categories=Graphics;3DGraphics;Engineering;
Keywords=3d;solid;geometry;csg;model;stl;

View file

@ -936,7 +936,7 @@ msgid "PolySet Cache size"
msgstr "Velikost PolySet cache"
#: objects/ui_Preferences.h:1158
msgid "Allow to open multiple documents"
msgid "Allow opening multiple documents"
msgstr "Povolit současné otevření více dokumentů"
#: objects/ui_Preferences.h:1159
@ -1086,7 +1086,7 @@ msgstr[2] "Kompilace vyvolala %1 varování."
#: src/mainwin.cc:990
msgid " For details see <a href=\"#console\">console window</a>."
msgstr "Pro podrobnosti nahlédněte do <a href=\"#console\">konzole</a>."
msgstr " Pro podrobnosti nahlédněte do <a href=\"#console\">konzole</a>."
#: src/mainwin.cc:1355
msgid "Save File"

View file

@ -956,7 +956,7 @@ msgid "PolySet Cache size"
msgstr "PolySet Cache Größe"
#: objects/ui_Preferences.h:1158
msgid "Allow to open multiple documents"
msgid "Allow opening multiple documents"
msgstr "Öffnen von mehreren Dokumenten erlauben"
#: objects/ui_Preferences.h:1159

View file

@ -993,7 +993,7 @@ msgid "PolySet Cache size"
msgstr "Tamaño de cache de PolySet"
#: objects/ui_Preferences.h:1159
msgid "Allow to open multiple documents"
msgid "Allow opening multiple documents"
msgstr "Permitir a abrir varios documentos"
#: objects/ui_Preferences.h:1160

View file

@ -956,7 +956,7 @@ msgid "PolySet Cache size"
msgstr "Taille du Cache PolySet"
#: objects/ui_Preferences.h:1158
msgid "Allow to open multiple documents"
msgid "Allow opening multiple documents"
msgstr "Autoriser l'ouverture de plusieurs documents"
#: objects/ui_Preferences.h:1159

View file

@ -926,7 +926,7 @@ msgid "PolySet Cache size"
msgstr ""
#: objects/ui_Preferences.h:1158
msgid "Allow to open multiple documents"
msgid "Allow opening multiple documents"
msgstr ""
#: objects/ui_Preferences.h:1159

View file

@ -954,7 +954,7 @@ msgid "PolySet Cache size"
msgstr "Размер кэша PolySet"
#: objects/ui_Preferences.h:1158
msgid "Allow to open multiple documents"
msgid "Allow opening multiple documents"
msgstr "Разрешить открытие нескольких документов"
#: objects/ui_Preferences.h:1159

View file

@ -29,7 +29,6 @@
<file>icons/prefs3DView.png</file>
<file>icons/prefsEditor.png</file>
<file>icons/prefsUpdate.png</file>
<file>icons/flattr.png</file>
<file>src/AboutDialog.html</file>
<file>images/export.png</file>
<file>images/axes.png</file>

View file

@ -10,6 +10,16 @@ INCLUDEPATH += $$[QT_INSTALL_HEADERS]
LIBS += -L$$[QT_INSTALL_LIBS]
QT5LIB=qt5scintilla2
unix:linux* {
FEDORA32LIBS=/usr/lib/libqscintilla2-qt5.so
FEDORA64LIBS=/usr/lib64/libqscintilla2-qt5.so
exists($$FEDORA32LIBS) | exists($$FEDORA64LIBS) {
QT5LIB=qscintilla2-qt5
}
}
CONFIG(debug, debug|release) {
mac: {
#LIBS += -lqscintilla2_debug
@ -19,7 +29,8 @@ CONFIG(debug, debug|release) {
LIBS += -lqscintilla2d
} else {
greaterThan(QT_MAJOR_VERSION, 4) {
LIBS += -lqt5scintilla2
message("Using $$QT5LIB as library name")
LIBS += -l$$QT5LIB
} else {
LIBS += -lqscintilla2
}
@ -33,7 +44,8 @@ CONFIG(debug, debug|release) {
LIBS += -lqscintilla2
} else {
greaterThan(QT_MAJOR_VERSION, 4) {
LIBS += -lqt5scintilla2
message("Using $$QT5LIB as library name")
LIBS += -l$$QT5LIB
} else {
LIBS += -lqscintilla2
}

View file

@ -1,3 +1,43 @@
## 2015.03-3
**OS X only: Auto-update vulnerability fix**
## 2015.03-2
**Bugfixes**
* \#1483 - Fix Z-fighting in Ortho view
* \#1479 - No check for infinite $fn
* \#1472 - "nan" in list comprehension causes crash
* \#452 - rands() fails when the seed is a floating point number
* \#1407 - Recursive module crash
* \#1425 - Animate Filename Generation - Duplicate/Missing Filenames
* \#1420 - expression-evaluation-tests fails on arm64
* \#1410 - Crash when a polygon contains NaN
* \#1378 - Linear extrude plus infinite twist causes crash instead of just an error
* \#1358 - Add more detailed installer information including version number
* \#1356 - Crash when multiplying matrices with undefined elements
* \#1350 - Saving file when HD is full ends up in data loss
* \#1342 - Syntax Highlighting Does Not Work on Linux Mint 17.1
* \#1337 - Simple detection of script and direction based on given text
* \#1325 - Crash when polygons with > 3 indices turn out to be degenerate
* \#1329 - version() returned ```[0,0,0]```
## 2015.03-1
**Bugfixes**
* \#1203 - Linux: Missing icons on Xfce
* \#1258 - Occasional crash when exporting STL
* \#1260 - Minimal window width too large
* \#1264 - Replace All sometimes caused a hang
* \#1274 - Fixed some preview bugs on Intel GPUs (OpenCSG 1.4.0)
* \#1276 - Module recursion sometimes caused a crash
* \#1277 - Automatic reload sometimes messed up camera position
* \#1284 - Animation flicker eliminated
* \#1294 - Support reproducible builds
* \#1317 - Normals vectors in STL were sometimes 0 0 0
## 2015.03
**Language Features:**
* Added text() module for 2D text
* Added offset() module for 2D offsets

View file

@ -120,6 +120,17 @@ check_nsis()
fi
}
check_zip()
if [ ! "`command -v zip`" ]; then
echo the zip command was not found. please install zip
echo on debian, sudo apt-get install zip
exit 1
else
echo zip found.
fi
}
get_openscad_source_code()
{
if [ -d openscad ]; then
@ -251,7 +262,7 @@ upload_win32()
SUMMARY1="Windows x86-32 Snapshot Installer"
SUMMARY2="Windows x86-32 Snapshot Zipfile"
SUMMARY3="Windows x86-32 Snapshot Tests"
BASEDIR=./mingw32/
BASEDIR=./mingw32.static/
WIN32_PACKAGEFILE1=OpenSCAD-$DATECODE-x86-32-Installer.exe
WIN32_PACKAGEFILE2=OpenSCAD-$DATECODE-x86-32.zip
WIN32_PACKAGEFILE3=OpenSCAD-Tests-$DATECODE-x86-32.zip
@ -277,7 +288,7 @@ upload_win64()
SUMMARY1="Windows x86-64 Snapshot Zipfile"
SUMMARY2="Windows x86-64 Snapshot Installer"
SUMMARY3="Windows x86-64 Snapshot Tests"
BASEDIR=./mingw64/
BASEDIR=./mingw64.static/
WIN64_PACKAGEFILE1=OpenSCAD-$DATECODE-x86-64-Installer.exe
WIN64_PACKAGEFILE2=OpenSCAD-$DATECODE-x86-64.zip
WIN64_PACKAGEFILE3=OpenSCAD-Tests-$DATECODE-x86-64.zip
@ -409,6 +420,7 @@ main()
fi
check_starting_path
check_nsis
check_zip
read_username_from_user
read_password_from_user
get_openscad_source_code

View file

@ -18,7 +18,13 @@ File /r /x mingw-cross-env color-schemes
${registerExtension} "$INSTDIR\openscad.exe" ".scad" "OpenSCAD_File"
CreateShortCut $SMPROGRAMS\OpenSCAD.lnk $INSTDIR\openscad.exe
WriteUninstaller $INSTDIR\Uninstall.exe
# see https://msdn.microsoft.com/en-us/library/aa372105(v=vs.85).aspx
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "DisplayName" "OpenSCAD (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "Publisher" "The OpenSCAD Developers"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "URLInfoAbout" "http://www.openscad.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "URLUpdateInfo" "http://www.openscad.org/downloads.html"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "HelpLink" "http://forum.openscad.org/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenSCAD" "UninstallString" "$INSTDIR\Uninstall.exe"
WriteRegStr HKCR ".scad" "PerceivedType" "text"
SectionEnd

View file

@ -54,7 +54,7 @@ PACKAGES=(
"fontconfig 2.11.1"
)
DEPLOY_PACKAGES=(
"sparkle Cocoanetics:1e7dcb1a48b96d1a8c62100b5864bd50211cbae1"
"sparkle 1.13.1"
)
printUsage()
@ -596,35 +596,47 @@ check_sparkle()
check_file lib/Sparkle.framework/Sparkle
}
# Usage: build_sparkle <githubuser>:<commitID>
# Usage:
# build_sparkle <githubuser>:<commitID>
# build_sparkle <version>
build_sparkle()
{
v=$1
github=${1%%:*} # Cut at first colon
version=${1#*:} # cut until first colon
echo "Building Sparkle" $version "..."
# Let Sparkle use the default compiler
unset CC
unset CXX
# Binary install:
version=$1
cd $BASEDIR/src
rm -rf Sparkle-$version
if [ ! -f Sparkle-$version.zip ]; then
curl -o Sparkle-$version.zip https://nodeload.github.com/$github/Sparkle/zip/$version
if [ ! -f Sparkle-$version.tar.bz2 ]; then
curl -LO https://github.com/sparkle-project/Sparkle/releases/download/$version/Sparkle-$version.tar.bz2
fi
unzip -q Sparkle-$version.zip
mkdir Sparkle-$version
cd Sparkle-$version
patch -p1 < $OPENSCADDIR/patches/sparkle.patch
if $OPTION_32BIT; then
SPARKLE_EXTRA_FLAGS="-arch i386"
fi
xcodebuild clean
xcodebuild -arch x86_64 $SPARKLE_EXTRA_FLAGS
rm -rf $DEPLOYDIR/lib/Sparkle.framework
cp -Rf build/Release/Sparkle.framework $DEPLOYDIR/lib/
install_name_tool -id $DEPLOYDIR/lib/Sparkle.framework/Versions/A/Sparkle $DEPLOYDIR/lib/Sparkle.framework/Sparkle
tar xjf ../Sparkle-$version.tar.bz2
cp -Rf Sparkle.framework $DEPLOYDIR/lib/
# Build from source:
# v=$1
# github=${1%%:*} # Cut at first colon
# version=${1#*:} # cut until first colon
#
# echo "Building Sparkle" $version "..."
#
# # Let Sparkle use the default compiler
# unset CC
# unset CXX
#
# cd $BASEDIR/src
# rm -rf Sparkle-$version
# if [ ! -f Sparkle-$version.zip ]; then
# curl -o Sparkle-$version.zip https://nodeload.github.com/$github/Sparkle/zip/$version
# fi
# unzip -q Sparkle-$version.zip
# cd Sparkle-$version
# patch -p1 < $OPENSCADDIR/patches/sparkle.patch
# xcodebuild clean
# xcodebuild -arch x86_64
# rm -rf $DEPLOYDIR/lib/Sparkle.framework
# cp -Rf build/Release/Sparkle.framework $DEPLOYDIR/lib/
# Install_name_tool -id $DEPLOYDIR/lib/Sparkle.framework/Versions/A/Sparkle $DEPLOYDIR/lib/Sparkle.framework/Sparkle
}
check_freetype()

View file

@ -20,6 +20,8 @@ import re
DEBUG = False
cxxlib = None
def usage():
print >> sys.stderr, "Usage: " + sys.argv[0] + " <executable>"
sys.exit(1)
@ -29,6 +31,11 @@ def usage():
def lookup_library(file):
found = None
if not re.match("/", file):
if re.search("@rpath", file):
file = re.sub("^@rpath", lc_rpath, file)
if os.path.exists(file): found = file
if DEBUG: print "Lib in @rpath found: " + str(file)
if (not found):
if re.search("@executable_path", file):
abs = re.sub("^@executable_path", executable_path, file)
if os.path.exists(abs): found = abs
@ -62,11 +69,16 @@ def find_dependencies(file):
return None
deps = output.split('\n')
for dep in deps:
#print dep
# Fail if anything is linked with libc++, as that's not backwards compatible
# with Mac OS X 10.6
if re.search("libc\+\+", dep):
print "Error: clang's libc++ is used by " + file
# print dep
# Fail if libstc++ and libc++ was mixed
global cxxlib
match = re.search("lib(std)?c\+\+", dep)
if match:
if not cxxlib:
cxxlib = match.group(0)
else:
if cxxlib != match.group(0):
print "Error: Mixing libc++ and libstdc++"
return None
dep = re.sub(".*:$", "", dep) # Take away header line
dep = re.sub("^\t", "", dep) # Remove initial tabs
@ -110,6 +122,18 @@ if __name__ == '__main__':
executable = sys.argv[1]
if DEBUG: print "Processing " + executable
executable_path = os.path.dirname(executable)
# Find the Runpath search path (LC_RPATH)
p = subprocess.Popen(["otool", "-l", executable], stdout=subprocess.PIPE)
output = p.communicate()[0]
if p.returncode != 0:
print 'Error otool -l failed on main executable'
sys.exit(1)
# Check deployment target
m = re.search("LC_RPATH\n(.*)\n\s+path ([^ ]+)", output, re.MULTILINE)
lc_rpath = m.group(2)
if DEBUG: print 'Runpath search path: ' + lc_rpath
# processed is a dict {libname : [parents]} - each parent is dependant on libname
processed = {}
pending = [executable]
@ -118,17 +142,18 @@ if __name__ == '__main__':
dep = pending.pop()
if DEBUG: print "Evaluating " + dep
deps = find_dependencies(dep)
# if DEBUG: print "Deps: " + ' '.join(deps)
assert(deps)
for d in deps:
absfile = lookup_library(d)
if not re.match(executable_path, absfile):
print "Error: External dependency " + d
sys.exit(1)
if absfile == None:
print "Not found: " + d
print " ..required by " + str(processed[dep])
error = True
continue
if not re.match(executable_path, absfile):
print "Error: External dependency " + d
sys.exit(1)
if absfile in processed:
processed[absfile].append(dep)
else:

View file

@ -20,8 +20,21 @@
#
# Also see http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X
#
# Also note the 64 bit is built on the branch of mxe by Tony Theodore
# which hasnt been merged to official mxe as of writing
# Notes:
#
# Originally this was based on Tony Theodore's branch of MXE, which is now
# integrated into official MXE.
#
# Targets:
#
# MXE allows 4 separate targets with the MXE_TARGETS environment variable.
# As of 2015 shared are not guaranteed to work.
#
# 64 bit static linked libraries MXE_TARGETS=x86_64-w64-mingw32.static
# 32 bit static linked libraries MXE_TARGETS=i686-w64-mingw32.static
# 64 bit shared libraries MXE_TARGETS=x86_64-w64-mingw32.shared
# 32 bit shared libraries MXE_TARGETS=i686-w64-mingw32.shared
#
OPENSCADDIR=$PWD
if [ ! -f $OPENSCADDIR/openscad.pro ]; then

View file

@ -443,8 +443,8 @@ case $OS in
cd $DEPLOYDIR/openscad-$VERSION
NSISDEBUG=-V2
# NSISDEBUG= # leave blank for full log
echo $MAKENSIS $NSISDEBUG installer.nsi
$MAKENSIS $NSISDEBUG installer.nsi
echo $MAKENSIS $NSISDEBUG "-DVERSION=$VERSION" installer.nsi
$MAKENSIS $NSISDEBUG "-DVERSION=$VERSION" installer.nsi
cp $DEPLOYDIR/openscad-$VERSION/openscad_setup.exe $INSTFILE
cd $OPENSCADDIR
@ -528,7 +528,7 @@ if [ $BUILD_TESTS ]; then
# while copying.
rm -f ./ostests.tar
for subdir in tests testdata libraries examples doc; do
tar prvf ./ostests.tar --exclude=.git* --exclude=*/mingw64/* --exclude=*/mingw32/* --exclude=*.cc.obj --exclude=*.a $subdir
tar prvf ./ostests.tar --exclude=.git* --exclude=*/mingw* --exclude=*.cc.obj --exclude=*.a $subdir
done
cd $DEPLOYDIR
tar prvf $OPENSCADDIR/ostests.tar --exclude=.git* --exclude=*/mingw* --exclude=*.cc.obj --exclude=*.a $TESTBINDIR

View file

@ -22,8 +22,8 @@ if [ ! $BASEDIR ]; then
BASEDIR=$HOME/openscad_deps
fi
DEPLOYDIR64=$OPENSCADDIR/mingw64
DEPLOYDIR32=$OPENSCADDIR/mingw32
DEPLOYDIR64=$OPENSCADDIR/mingw64.static
DEPLOYDIR32=$OPENSCADDIR/mingw32.static
if [ ! $DEPLOYDIR ]; then
if [ "`echo $* | grep 64 `" ]; then
@ -39,6 +39,11 @@ if [ ! $MXEDIR ]; then
else
MXEDIR=$BASEDIR/mxe
fi
if [ ! -e $MXEDIR ]; then
if [ -e /opt/mxe ]; then
MXEDIR=/opt/mxe
fi
fi
fi
if [ ! $MXEQTSUBDIR ]; then

View file

@ -80,7 +80,7 @@ if [ -e /etc/issue ]; then
elif [ "`grep -i raspbian /etc/issue`" ]; then
get_debian_deps
elif [ "`grep -i mint /etc/issue`" ]; then
get_debian_deps
get_debian_7_deps
elif [ "`grep -i suse /etc/issue`" ]; then
get_opensuse_deps
elif [ "`grep -i fedora /etc/issue`" ]; then

View file

@ -11,8 +11,6 @@ public:
AboutDialog(QWidget *) {
setupUi(this);
this->setWindowTitle( QString(_("About OpenSCAD")) + " " + openscad_shortversionnumber.c_str());
QUrl flattr_qurl(":icons/flattr.png" );
this->aboutText->loadResource( QTextDocument::ImageResource, flattr_qurl );
QString tmp = this->aboutText->toHtml();
tmp.replace("__VERSION__", openscad_detailedversionnumber.c_str());
this->aboutText->setHtml(tmp);

View file

@ -9,13 +9,29 @@
<head>
<meta charset="UTF-8"/>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<style type=text/css>
body {
font: 13pt Arial,sans-serif;
}
.flattr-link {
color: white;
background: #88B058;
font: bold 14px Helvetica,sans-serif;
}
.donate-link {
color: white;
background: dodgerblue;
font: bold 14px Helvetica,sans-serif;
}
</style>
</head>
<body>
<body style="font-family:'Arial'; font-size:13pt;">
<p>
<a align=right href="https://flattr.com/submit/auto?user_id=openscad&amp;url=http://openscad.org&amp;title=OpenSCAD&amp;language=&amp;tags=github&amp;category=software"><img align=right src=":icons/flattr.png" /></a>
<p align="right">
<a class="flattr-link" href="https://flattr.com/submit/auto?user_id=openscad&amp;url=http://openscad.org&amp;title=OpenSCAD&amp;language=&amp;tags=github&amp;category=software">&nbsp;Flattr&nbsp;this!&nbsp;</a>
<a class="donate-link" href="http://www.openscad.org/community.html">&nbsp;Donate&nbsp;</a>
</p>
<p>

View file

@ -40,6 +40,8 @@
#include FT_OUTLINE_H
#define SCRIPT_UNTAG(tag) ((uint8_t)((tag)>>24)) % ((uint8_t)((tag)>>16)) % ((uint8_t)((tag)>>8)) % ((uint8_t)(tag))
static inline Vector2d get_scaled_vector(const FT_Vector *ft_vector, double scale) {
return Vector2d(ft_vector->x / scale, ft_vector->y / scale);
}
@ -122,6 +124,75 @@ double FreetypeRenderer::calc_y_offset(std::string valign, double ascend, double
}
}
hb_direction_t FreetypeRenderer::get_direction(const FreetypeRenderer::Params &params, const hb_script_t script) const
{
hb_direction_t param_direction = hb_direction_from_string(params.direction.c_str(), -1);
if (param_direction != HB_DIRECTION_INVALID) {
return param_direction;
}
hb_direction_t direction = hb_script_get_horizontal_direction(script);
PRINTDB("Detected direction '%s' for %s", hb_direction_to_string(direction) % params.text.c_str());
return direction;
}
bool FreetypeRenderer::is_ignored_script(const hb_script_t script) const
{
switch (script) {
case HB_SCRIPT_COMMON:
case HB_SCRIPT_INHERITED:
case HB_SCRIPT_UNKNOWN:
case HB_SCRIPT_INVALID:
return true;
default:
return false;
}
}
hb_script_t FreetypeRenderer::get_script(const FreetypeRenderer::Params &params, hb_glyph_info_t *glyph_info, unsigned int glyph_count) const
{
hb_script_t param_script = hb_script_from_string(params.script.c_str(), -1);
if (param_script != HB_SCRIPT_INVALID) {
return param_script;
}
hb_script_t script = HB_SCRIPT_INVALID;
for (unsigned int idx = 0;idx < glyph_count;idx++) {
hb_codepoint_t cp = glyph_info[idx].codepoint;
hb_script_t s = hb_unicode_script(hb_unicode_funcs_get_default(), cp);
if (!is_ignored_script(s)) {
if (script == HB_SCRIPT_INVALID) {
script = s;
} else if ((script != s) && (script != HB_SCRIPT_UNKNOWN)) {
script = HB_SCRIPT_UNKNOWN;
}
}
}
PRINTDB("Detected script '%c%c%c%c' for %s", SCRIPT_UNTAG(script) % params.text.c_str());
return script;
}
void FreetypeRenderer::detect_properties(FreetypeRenderer::Params &params) const
{
hb_buffer_t *hb_buf = hb_buffer_create();
hb_buffer_add_utf8(hb_buf, params.text.c_str(), strlen(params.text.c_str()), 0, strlen(params.text.c_str()));
unsigned int glyph_count;
hb_glyph_info_t *glyph_info = hb_buffer_get_glyph_infos(hb_buf, &glyph_count);
hb_script_t script = get_script(params, glyph_info, glyph_count);
hb_buffer_destroy(hb_buf);
if (!is_ignored_script(script)) {
char script_buf[5] = { 0, };
hb_tag_to_string(hb_script_to_iso15924_tag(script), script_buf);
params.set_script(script_buf);
}
hb_direction_t direction = get_direction(params, script);
params.set_direction(hb_direction_to_string(direction));
}
std::vector<const Geometry *> FreetypeRenderer::render(const FreetypeRenderer::Params &params) const
{
FT_Face face;

View file

@ -85,7 +85,7 @@ public:
<< ", font = \"" << params.font
<< "\", direction = \"" << params.direction
<< "\", language = \"" << params.language
<< "\", script = \"" << params.script
<< (params.script.empty() ? "" : "\", script = \"") << params.script
<< "\", halign = \"" << params.halign
<< "\", valign = \"" << params.valign
<< "\", $fn = " << params.fn
@ -102,6 +102,7 @@ public:
FreetypeRenderer();
virtual ~FreetypeRenderer();
void detect_properties(FreetypeRenderer::Params &params) const;
std::vector<const class Geometry *> render(const FreetypeRenderer::Params &params) const;
private:
const static double scale;
@ -136,6 +137,10 @@ private:
}
};
bool is_ignored_script(const hb_script_t script) const;
hb_script_t get_script(const FreetypeRenderer::Params &params, hb_glyph_info_t *glyph_info, unsigned int glyph_count) const;
hb_direction_t get_direction(const FreetypeRenderer::Params &params, const hb_script_t script) const;
double calc_x_offset(std::string halign, double width) const;
double calc_y_offset(std::string valign, double ascend, double descend) const;

View file

@ -105,7 +105,7 @@ void GLView::setupCamera()
double height = dist * tan(cam.fov/2*M_PI/180);
glOrtho(-height*aspectratio, height*aspectratio,
-height, height,
-far_far_away, +far_far_away);
-100*dist, +100*dist);
break;
}
}
@ -130,7 +130,7 @@ void GLView::setupCamera()
double height = dist * tan(cam.fov/2*M_PI/180);
glOrtho(-height*aspectratio, height*aspectratio,
-height, height,
-far_far_away, +far_far_away);
-100*dist, +100*dist);
break;
}
}

View file

@ -15,6 +15,7 @@
#include <QMutex>
#include <QSet>
#include <QTime>
#include <QIODevice>
enum export_type_e {
EXPORT_TYPE_UNKNOWN,
@ -35,7 +36,11 @@ public:
class Preferences *prefs;
QTimer *animate_timer;
double tval, fps, fsteps;
int anim_step;
int anim_numsteps;
double anim_tval;
bool anim_dumping;
int anim_dump_start_step;
QTimer *autoReloadTimer;
std::string autoReloadId;
@ -88,7 +93,10 @@ protected:
void closeEvent(QCloseEvent *event);
private slots:
void updatedFps();
void updatedAnimTval();
void updatedAnimFps();
void updatedAnimSteps();
void updatedAnimDump(bool checked);
void updateTVal();
void updateMdiMode(bool mdi);
void updateUndockMode(bool undockMode);
@ -113,6 +121,7 @@ private:
void compile(bool reload, bool forcedone = false);
void compileCSG(bool procevents);
bool maybeSave();
void saveError(const QIODevice &file, const std::string &msg);
bool checkEditorModified();
QString dumpCSGTree(AbstractNode *root);
static void consoleOutput(const std::string &msg, void *userdata);

View file

@ -23,7 +23,7 @@ const char *PlatformUtils::OPENSCAD_FOLDER_NAME = "OpenSCAD";
static std::string lookupResourcesPath()
{
fs::path resourcedir(applicationpath);
PRINTDB("Looking up resource folder with application path '%s'", resourcedir.c_str());
PRINTDB("Looking up resource folder with application path '%s'", boosty::stringy(resourcedir).c_str());
#ifdef __APPLE__
const char *searchpath[] = {
@ -56,12 +56,14 @@ static std::string lookupResourcesPath()
for (int a = 0;searchpath[a] != NULL;a++) {
tmpdir = resourcedir / searchpath[a];
const fs::path checkdir = tmpdir / "libraries";
PRINTDB("Checking '%s'", checkdir.c_str());
// The resource folder is the folder which contains "color-schemes" (as well as
// "examples" and "locale", and optionally "libraries" and "fonts")
const fs::path checkdir = tmpdir / "color-schemes";
PRINTDB("Checking '%s'", boosty::stringy(checkdir).c_str());
if (is_directory(checkdir)) {
resourcedir = tmpdir;
PRINTDB("Found resource folder '%s'", tmpdir.c_str());
PRINTDB("Found resource folder '%s'", boosty::stringy(tmpdir).c_str());
break;
}
}

View file

@ -32,6 +32,7 @@
#include <QSettings>
#include <QStatusBar>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
#include "GeometryCache.h"
#include "AutoUpdater.h"
#include "feature.h"
@ -49,7 +50,7 @@ Q_DECLARE_METATYPE(Feature *);
class SettingsReader : public Settings::Visitor
{
QSettings settings;
const Value getValue(const Settings::SettingsEntry& entry, const std::string& value) const {
Value getValue(const Settings::SettingsEntry& entry, const std::string& value) const {
std::string trimmed_value(value);
boost::trim(trimmed_value);
@ -101,7 +102,7 @@ class SettingsWriter : public Settings::Visitor
settings.remove(key);
PRINTDB("SettingsWriter D: %s", key.toStdString().c_str());
} else {
Value value = s->get(entry);
const Value &value = s->get(entry);
settings.setValue(key, QString::fromStdString(value.toString()));
PRINTDB("SettingsWriter W: %s = '%s'", key.toStdString().c_str() % value.toString().c_str());
}
@ -689,18 +690,17 @@ void Preferences::updateGUI()
void Preferences::initComboBox(QComboBox *comboBox, const Settings::SettingsEntry& entry)
{
comboBox->clear();
Value::VectorType vector = entry.range().toVector();
for (Value::VectorType::iterator it = vector.begin();it != vector.end();it++) {
QString val = QString::fromStdString((*it)[0].toString());
std::string text((*it)[1].toString());
QString qtext = QString::fromStdString(gettext(text.c_str()));
// Range is a vector of 2D vectors: [[name, value], ...]
BOOST_FOREACH(const ValuePtr &v, entry.range().toVector()) {
QString val = QString::fromStdString(v[0]->toString());
QString qtext = QString::fromStdString(gettext(v[1]->toString().c_str()));
comboBox->addItem(qtext, val);
}
}
void Preferences::initSpinBox(QSpinBox *spinBox, const Settings::SettingsEntry& entry)
{
Value::RangeType range = entry.range().toRange();
RangeType range = entry.range().toRange();
spinBox->setMinimum(range.begin_value());
spinBox->setMaximum(range.end_value());
}
@ -709,13 +709,13 @@ void Preferences::updateComboBox(QComboBox *comboBox, const Settings::SettingsEn
{
Settings::Settings *s = Settings::Settings::inst();
Value value = s->get(entry);
const Value &value = s->get(entry);
QString text = QString::fromStdString(value.toString());
int idx = comboBox->findData(text);
if (idx >= 0) {
comboBox->setCurrentIndex(idx);
} else {
Value defaultValue = entry.defaultValue();
const Value &defaultValue = entry.defaultValue();
QString defaultText = QString::fromStdString(defaultValue.toString());
int defIdx = comboBox->findData(defaultText);
if (defIdx >= 0) {

View file

@ -1333,7 +1333,7 @@
<item>
<widget class="QCheckBox" name="mdiCheckBox">
<property name="text">
<string>Allow to open multiple documents</string>
<string>Allow opening multiple documents</string>
</property>
</widget>
</item>

View file

@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 Remko Troncon. BSD license
* Copyright (C) 2013 Marius Kintel. BSD license
* License: MIT License (http://opensource.org/licenses/MIT)
* See SparkleAutoUpdater.mm
*/
#pragma once

View file

@ -1,6 +1,11 @@
/*
* Copyright (C) 2008 Remko Troncon. BSD license
* Copyright (C) 2013 Marius Kintel. BSD license
* Copyright (C) 2008 Remko Troncon.
* See https://github.com/remko/mixing-cocoa-and-qt
* https://el-tramo.be/blog/mixing-cocoa-and-qt
* License: BSD. Assuming 2-clause BSD reference by Sparke based on context:
* https://github.com/sparkle-project/Sparkle/blob/master/LICENSE
* Copyright (C) 2013 Marius Kintel.
* License: MIT License (http://opensource.org/licenses/MIT)
*/
#include "SparkleAutoUpdater.h"

View file

@ -8,3 +8,42 @@ namespace fs = boost::filesystem;
fs::path boostfs_relative_path(const fs::path &path, const fs::path &relative_to);
fs::path boostfs_normalize(const fs::path &path);
fs::path boostfs_uncomplete(fs::path const p, fs::path const base);
#include <boost/cast.hpp>
#include <sstream>
/* Convert number types but print WARNING for failures during
conversion. This is useful for situations where it is important to not
fail silently during casting or conversion. (For example, accidentally
converting 64 bit types to 32 bit types, float to int, etc).
For positive overflow, return max of Tout template type
For negative overflow, return min of Tout template type
On other conversion failures, return 0. */
template <class Tout,class Tin> Tout boost_numeric_cast( Tin input )
{
Tout result = 0;
std::stringstream status;
status.str("ok");
try {
result = boost::numeric_cast<Tout>(input);
} catch (boost::numeric::negative_overflow& e) {
status << e.what();
result = std::numeric_limits<Tout>::min();
} catch (boost::numeric::positive_overflow& e) {
status << e.what();
result = std::numeric_limits<Tout>::max();
} catch (boost::numeric::bad_numeric_cast& e) {
status << e.what();
result = 0;
}
if (status.str()!="ok") {
std::stringstream tmp;
tmp << input;
PRINTB("WARNING: problem converting this number: %s",tmp.str());
PRINTB("WARNING: %s", status.str() );
PRINTB("WARNING: setting result to %u",result);
}
return result;
}

View file

@ -101,9 +101,9 @@ Builtins::Builtins()
this->globalscope.assignments.push_back(Assignment("$t", boost::shared_ptr<Expression>(new ExpressionConst(ValuePtr(0.0)))));
Value::VectorType zero3;
zero3.push_back(Value(0.0));
zero3.push_back(Value(0.0));
zero3.push_back(Value(0.0));
zero3.push_back(ValuePtr(0.0));
zero3.push_back(ValuePtr(0.0));
zero3.push_back(ValuePtr(0.0));
ValuePtr zero3val(zero3);
this->globalscope.assignments.push_back(Assignment("$vpt", boost::shared_ptr<Expression>(new ExpressionConst(zero3val))));
this->globalscope.assignments.push_back(Assignment("$vpr", boost::shared_ptr<Expression>(new ExpressionConst(zero3val))));

View file

@ -26,6 +26,7 @@
#include "calc.h"
#include "grid.h"
#include <boost/math/special_functions/fpclassify.hpp>
/*!
Returns the number of subdivision of a whole circle, given radius and
@ -33,7 +34,9 @@
*/
int Calc::get_fragments_from_r(double r, double fn, double fs, double fa)
{
if (r < GRID_FINE) return 3;
// FIXME: It would be better to refuse to create an object. Let's do more strict error handling
// in future versions of OpenSCAD
if (r < GRID_FINE || boost::math::isinf(fn) || boost::math::isnan(fn)) return 3;
if (fn > 0.0) return (int)(fn >= 3 ? fn : 3);
return (int)ceil(fmax(fmin(360.0 / fa, r*2*M_PI / fs), 5));
}

View file

@ -89,17 +89,17 @@ AbstractNode *CgaladvModule::instantiate(const Context *ctx, const ModuleInstant
node->newsize << 0,0,0;
if ( ns->type() == Value::VECTOR ) {
const Value::VectorType &vs = ns->toVector();
if ( vs.size() >= 1 ) node->newsize[0] = vs[0].toDouble();
if ( vs.size() >= 2 ) node->newsize[1] = vs[1].toDouble();
if ( vs.size() >= 3 ) node->newsize[2] = vs[2].toDouble();
if ( vs.size() >= 1 ) node->newsize[0] = vs[0]->toDouble();
if ( vs.size() >= 2 ) node->newsize[1] = vs[1]->toDouble();
if ( vs.size() >= 3 ) node->newsize[2] = vs[2]->toDouble();
}
ValuePtr autosize = c.lookup_variable("auto");
node->autosize << false, false, false;
if ( autosize->type() == Value::VECTOR ) {
const Value::VectorType &va = autosize->toVector();
if ( va.size() >= 1 ) node->autosize[0] = va[0].toBool();
if ( va.size() >= 2 ) node->autosize[1] = va[1].toBool();
if ( va.size() >= 3 ) node->autosize[2] = va[2].toBool();
if ( va.size() >= 1 ) node->autosize[0] = va[0]->toBool();
if ( va.size() >= 2 ) node->autosize[1] = va[1]->toBool();
if ( va.size() >= 3 ) node->autosize[2] = va[2]->toBool();
}
else if ( autosize->type() == Value::BOOL ) {
node->autosize << autosize->toBool(),autosize->toBool(),autosize->toBool();

View file

@ -1,4 +1,5 @@
#include "clipper-utils.h"
#include "printutils.h"
#include <boost/foreach.hpp>
namespace ClipperUtils {
@ -30,7 +31,15 @@ namespace ClipperUtils {
ClipperLib::PolyTree sanitize(const ClipperLib::Paths &paths) {
ClipperLib::PolyTree result;
ClipperLib::Clipper clipper;
try {
clipper.AddPaths(paths, ClipperLib::ptSubject, true);
}
catch(...) {
// Most likely caught a RangeTest exception from clipper
// Note that Clipper up to v6.2.1 incorrectly throws
// an exception of type char* rather than a clipperException()
PRINT("WARNING: Range check failed for polygon. skipping");
}
clipper.Execute(ClipperLib::ctUnion, result, ClipperLib::pftEvenOdd);
return result;
}

View file

@ -50,6 +50,8 @@ private:
ColorModule::ColorModule()
{
// Colors extracted from https://drafts.csswg.org/css-color/ on 2015-08-02
// CSS Color Module Level 4 - Editors Draft, 29 May 2015
webcolors = map_list_of
("aliceblue", Color4f(240, 248, 255))
("antiquewhite", Color4f(250, 235, 215))
@ -170,6 +172,7 @@ ColorModule::ColorModule()
("plum", Color4f(221, 160, 221))
("powderblue", Color4f(176, 224, 230))
("purple", Color4f(128, 0, 128))
("rebeccapurple", Color4f(102, 51, 153))
("red", Color4f(255, 0, 0))
("rosybrown", Color4f(188, 143, 143))
("royalblue", Color4f(65, 105, 225))
@ -191,7 +194,6 @@ ColorModule::ColorModule()
("teal", Color4f(0, 128, 128))
("thistle", Color4f(216, 191, 216))
("tomato", Color4f(255, 99, 71))
("transparent", Color4f(0, 0, 0, 0))
("turquoise", Color4f(64, 224, 208))
("violet", Color4f(238, 130, 238))
("wheat", Color4f(245, 222, 179))
@ -199,6 +201,9 @@ ColorModule::ColorModule()
("whitesmoke", Color4f(245, 245, 245))
("yellow", Color4f(255, 255, 0))
("yellowgreen", Color4f(154, 205, 50))
// additional OpenSCAD specific entry
("transparent", Color4f(0, 0, 0, 0))
.convert_to_container<boost::unordered_map<std::string, Color4f> >();
}
@ -224,7 +229,7 @@ AbstractNode *ColorModule::instantiate(const Context *ctx, const ModuleInstantia
ValuePtr v = c.lookup_variable("c");
if (v->type() == Value::VECTOR) {
for (size_t i = 0; i < 4; i++) {
node->color[i] = i < v->toVector().size() ? v->toVector()[i].toDouble() : 1.0;
node->color[i] = i < v->toVector().size() ? v->toVector()[i]->toDouble() : 1.0;
if (node->color[i] > 1)
PRINTB_NOCACHE("WARNING: color() expects numbers between 0.0 and 1.0. Value of %.1f is too large.", node->color[i]);
}

View file

@ -67,7 +67,7 @@ RenderColorScheme::RenderColorScheme(fs::path path) : _path(path)
addColor(CGAL_EDGE_2D_COLOR, "cgal-edge-2d");
addColor(CROSSHAIR_COLOR, "crosshair");
} catch (const std::exception & e) {
PRINTB("Error reading color scheme file '%s': %s", path.c_str() % e.what());
PRINTB("Error reading color scheme file '%s': %s", boosty::stringy(path).c_str() % e.what());
_error = e.what();
_name = "";
_index = 0;
@ -261,7 +261,7 @@ void ColorMap::enumerateColorSchemesInPath(colorscheme_set_t &result_set, const
{
const fs::path color_schemes = basePath / "color-schemes" / "render";
PRINTDB("Enumerating color schemes from '%s'", color_schemes.string().c_str());
PRINTDB("Enumerating color schemes from '%s'", boosty::stringy(color_schemes).c_str());
fs::directory_iterator end_iter;
@ -272,7 +272,7 @@ void ColorMap::enumerateColorSchemesInPath(colorscheme_set_t &result_set, const
}
const fs::path path = (*dir_iter).path();
if (!(path.extension().string() == ".json")) {
if (!(path.extension() == ".json")) {
continue;
}

View file

@ -63,7 +63,7 @@ public: // methods
static const EvalContext* getLastModuleCtx(const EvalContext *evalctx);
static AbstractNode* getChild(const Value &value, const EvalContext* modulectx);
static AbstractNode* getChild(const ValuePtr &value, const EvalContext* modulectx);
private: // data
Type type;
@ -78,12 +78,12 @@ void ControlModule::for_eval(AbstractNode &node, const ModuleInstantiation &inst
ValuePtr it_values = evalctx->getArgValue(l, ctx);
Context c(ctx);
if (it_values->type() == Value::RANGE) {
Value::RangeType range = it_values->toRange();
boost::uint32_t steps = range.nbsteps();
RangeType range = it_values->toRange();
boost::uint32_t steps = range.numValues();
if (steps >= 10000) {
PRINTB("WARNING: Bad range parameter in for statement: too many elements (%lu).", steps);
} else {
for (Value::RangeType::iterator it = range.begin();it != range.end();it++) {
for (RangeType::iterator it = range.begin();it != range.end();it++) {
c.set_variable(it_name, ValuePtr(*it));
for_eval(node, inst, l+1, &c, evalctx);
}
@ -133,17 +133,17 @@ const EvalContext* ControlModule::getLastModuleCtx(const EvalContext *evalctx)
}
// static
AbstractNode* ControlModule::getChild(const Value& value, const EvalContext* modulectx)
AbstractNode* ControlModule::getChild(const ValuePtr &value, const EvalContext* modulectx)
{
if (value.type()!=Value::NUMBER) {
if (value->type()!=Value::NUMBER) {
// Invalid parameter
// (e.g. first child of difference is invalid)
PRINTB("WARNING: Bad parameter type (%s) for children, only accept: empty, number, vector, range.", value.toString());
PRINTB("WARNING: Bad parameter type (%s) for children, only accept: empty, number, vector, range.", value->toString());
return NULL;
}
double v;
if (!value.getDouble(v)) {
PRINTB("WARNING: Bad parameter type (%s) for children, only accept: empty, number, vector, range.", value.toString());
if (!value->getDouble(v)) {
PRINTB("WARNING: Bad parameter type (%s) for children, only accept: empty, number, vector, range.", value->toString());
return NULL;
}
@ -223,12 +223,12 @@ AbstractNode *ControlModule::instantiate(const Context* /*ctx*/, const ModuleIns
// one (or more ignored) parameter
ValuePtr value = evalctx->getArgValue(0);
if (value->type() == Value::NUMBER) {
return getChild(*value, modulectx);
return getChild(value, modulectx);
}
else if (value->type() == Value::VECTOR) {
AbstractNode* node = new AbstractNode(inst);
const Value::VectorType& vect = value->toVector();
foreach (const Value::VectorType::value_type& vectvalue, vect) {
foreach (const ValuePtr &vectvalue, vect) {
AbstractNode* childnode = getChild(vectvalue,modulectx);
if (childnode==NULL) continue; // error
node->children.push_back(childnode);
@ -236,15 +236,15 @@ AbstractNode *ControlModule::instantiate(const Context* /*ctx*/, const ModuleIns
return node;
}
else if (value->type() == Value::RANGE) {
AbstractNode* node = new AbstractNode(inst);
Value::RangeType range = value->toRange();
boost::uint32_t steps = range.nbsteps();
RangeType range = value->toRange();
boost::uint32_t steps = range.numValues();
if (steps >= 10000) {
PRINTB("WARNING: Bad range parameter for children: too many elements (%lu).", steps);
return NULL;
}
for (Value::RangeType::iterator it = range.begin();it != range.end();it++) {
AbstractNode* childnode = getChild(Value(*it),modulectx); // with error cases
AbstractNode* node = new AbstractNode(inst);
for (RangeType::iterator it = range.begin();it != range.end();it++) {
AbstractNode* childnode = getChild(ValuePtr(*it),modulectx); // with error cases
if (childnode==NULL) continue; // error
node->children.push_back(childnode);
}

View file

@ -200,8 +200,8 @@ ValuePtr builtin_dxf_cross(const Context *ctx, const EvalContext *evalctx)
double x = x1 + ua*(x2 - x1);
double y = y1 + ua*(y2 - y1);
Value::VectorType ret;
ret.push_back(Value(x));
ret.push_back(Value(y));
ret.push_back(ValuePtr(x));
ret.push_back(ValuePtr(y));
return dxf_cross_cache[key] = ValuePtr(ret);
}
}

View file

@ -41,12 +41,12 @@ namespace {
Value::VectorType flatten(Value::VectorType const& vec) {
int n = 0;
for (unsigned int i = 0; i < vec.size(); i++) {
assert(vec[i].type() == Value::VECTOR);
n += vec[i].toVector().size();
assert(vec[i]->type() == Value::VECTOR);
n += vec[i]->toVector().size();
}
Value::VectorType ret; ret.reserve(n);
for (unsigned int i = 0; i < vec.size(); i++) {
std::copy(vec[i].toVector().begin(),vec[i].toVector().end(),std::back_inserter(ret));
std::copy(vec[i]->toVector().begin(),vec[i]->toVector().end(),std::back_inserter(ret));
}
return ret;
}
@ -357,7 +357,7 @@ ExpressionConst::ExpressionConst(const ValuePtr &val) : const_value(val)
ValuePtr ExpressionConst::evaluate(const class Context *) const
{
return ValuePtr(this->const_value);
return this->const_value;
}
void ExpressionConst::print(std::ostream &stream) const
@ -380,12 +380,12 @@ ValuePtr ExpressionRange::evaluate(const Context *context) const
ValuePtr v2 = this->second->evaluate(context);
if (v2->type() == Value::NUMBER) {
if (this->children.size() == 2) {
Value::RangeType range(v1->toDouble(), v2->toDouble());
RangeType range(v1->toDouble(), v2->toDouble());
return ValuePtr(range);
} else {
ValuePtr v3 = this->third->evaluate(context);
if (v3->type() == Value::NUMBER) {
Value::RangeType range(v1->toDouble(), v2->toDouble(), v3->toDouble());
RangeType range(v1->toDouble(), v2->toDouble(), v3->toDouble());
return ValuePtr(range);
}
}
@ -409,7 +409,8 @@ ValuePtr ExpressionVector::evaluate(const Context *context) const
{
Value::VectorType vec;
BOOST_FOREACH(const Expression *e, this->children) {
vec.push_back(*(e->evaluate(context)));
ValuePtr tmpval = e->evaluate(context);
vec.push_back(tmpval);
}
return ValuePtr(vec);
}
@ -545,7 +546,7 @@ ValuePtr ExpressionLc::evaluate(const Context *context) const
if (this->second->isListComprehension()) {
return this->second->evaluate(context);
} else {
vec.push_back((*this->second->evaluate(context)));
vec.push_back(this->second->evaluate(context));
}
}
return ValuePtr(vec);
@ -561,26 +562,26 @@ ValuePtr ExpressionLc::evaluate(const Context *context) const
Context c(context);
if (it_values->type() == Value::RANGE) {
Value::RangeType range = it_values->toRange();
boost::uint32_t steps = range.nbsteps();
RangeType range = it_values->toRange();
boost::uint32_t steps = range.numValues();
if (steps >= 1000000) {
PRINTB("WARNING: Bad range parameter in for statement: too many elements (%lu).", steps);
} else {
for (Value::RangeType::iterator it = range.begin();it != range.end();it++) {
for (RangeType::iterator it = range.begin();it != range.end();it++) {
c.set_variable(it_name, ValuePtr(*it));
vec.push_back((*this->first->evaluate(&c)));
vec.push_back(this->first->evaluate(&c));
}
}
}
else if (it_values->type() == Value::VECTOR) {
for (size_t i = 0; i < it_values->toVector().size(); i++) {
c.set_variable(it_name, it_values->toVector()[i]);
vec.push_back((*this->first->evaluate(&c)));
vec.push_back(this->first->evaluate(&c));
}
}
else if (it_values->type() != Value::UNDEFINED) {
c.set_variable(it_name, it_values);
vec.push_back((*this->first->evaluate(&c)));
vec.push_back(this->first->evaluate(&c));
}
if (this->first->isListComprehension()) {
return ValuePtr(flatten(vec));

View file

@ -50,10 +50,13 @@ using boost::math::isinf;
auto/bind()s for random function objects, but we are supporting older systems.
*/
#include"boost-utils.h"
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_real.hpp>
/*Unicode support for string lengths and array accesses*/
#include <glib.h>
// hash double
#include "linalg.h"
#ifdef __WIN32__
#include <process.h>
@ -238,34 +241,51 @@ ValuePtr builtin_rands(const Context *, const EvalContext *evalctx)
if (v0->type() != Value::NUMBER) goto quit;
double min = v0->toDouble();
if (boost::math::isinf(min)) {
PRINT("WARNING: rands() range min cannot be infinite");
min = -std::numeric_limits<double>::max()/2;
PRINTB("WARNING: resetting to %f",min);
}
ValuePtr v1 = evalctx->getArgValue(1);
if (v1->type() != Value::NUMBER) goto quit;
double max = v1->toDouble();
if (boost::math::isinf(max)) {
PRINT("WARNING: rands() range max cannot be infinite");
max = std::numeric_limits<double>::max()/2;
PRINTB("WARNING: resetting to %f",max);
}
if (max < min) {
register double tmp = min; min = max; max = tmp;
}
ValuePtr v2 = evalctx->getArgValue(2);
if (v2->type() != Value::NUMBER) goto quit;
size_t numresults = std::max(0, static_cast<int>(v2->toDouble()));
double numresultsd = std::abs( v2->toDouble() );
if (boost::math::isinf(numresultsd)) {
PRINT("WARNING: rands() cannot create an infinite number of results");
PRINT("WARNING: resetting number of results to 1");
numresultsd = 1;
}
size_t numresults = boost_numeric_cast<size_t,double>( numresultsd );
bool deterministic = false;
if (n > 3) {
ValuePtr v3 = evalctx->getArgValue(3);
if (v3->type() != Value::NUMBER) goto quit;
deterministic_rng.seed((unsigned int) v3->toDouble());
uint32_t seed = static_cast<uint32_t>(hash_floating_point( v3->toDouble() ));
deterministic_rng.seed( seed );
deterministic = true;
}
Value::VectorType vec;
if (min==max) { // Boost doesn't allow min == max
for (size_t i=0; i < numresults; i++)
vec.push_back( Value( min ) );
vec.push_back(ValuePtr(min));
} else {
boost::uniform_real<> distributor( min, max );
for (size_t i=0; i < numresults; i++) {
if ( deterministic ) {
vec.push_back(Value(distributor(deterministic_rng)));
vec.push_back(ValuePtr(distributor(deterministic_rng)));
} else {
vec.push_back(Value(distributor(lessdeterministic_rng)));
vec.push_back(ValuePtr(distributor(lessdeterministic_rng)));
}
}
}
@ -285,11 +305,11 @@ ValuePtr builtin_min(const Context *, const EvalContext *evalctx)
ValuePtr v0 = evalctx->getArgValue(0);
if (n == 1 && v0->type() == Value::VECTOR && !v0->toVector().empty()) {
Value min = v0->toVector()[0];
ValuePtr min = v0->toVector()[0];
for (size_t i = 1; i < v0->toVector().size(); i++) {
if (v0->toVector()[i] < min) min = v0->toVector()[i];
}
return ValuePtr(min);
return min;
}
if (v0->type() == Value::NUMBER) {
double val = v0->toDouble();
@ -317,11 +337,11 @@ ValuePtr builtin_max(const Context *, const EvalContext *evalctx)
ValuePtr v0 = evalctx->getArgValue(0);
if (n == 1 && v0->type() == Value::VECTOR && !v0->toVector().empty()) {
Value max = v0->toVector()[0];
ValuePtr max = v0->toVector()[0];
for (size_t i = 1; i < v0->toVector().size(); i++) {
if (v0->toVector()[i] > max) max = v0->toVector()[i];
}
return ValuePtr(max);
return max;
}
if (v0->type() == Value::NUMBER) {
double val = v0->toDouble();
@ -614,14 +634,13 @@ ValuePtr builtin_concat(const Context *, const EvalContext *evalctx)
Value::VectorType result;
for (size_t i = 0; i < evalctx->numArgs(); i++) {
ValuePtr v = evalctx->getArgValue(i);
if (v->type() == Value::VECTOR) {
Value::VectorType vec = v->toVector();
for (Value::VectorType::const_iterator it = vec.begin(); it != vec.end(); it++) {
result.push_back(*it);
ValuePtr val = evalctx->getArgValue(i);
if (val->type() == Value::VECTOR) {
BOOST_FOREACH(const ValuePtr &v, val->toVector()) {
result.push_back(v);
}
} else {
result.push_back(*v);
result.push_back(val);
}
}
return ValuePtr(result);
@ -636,13 +655,13 @@ ValuePtr builtin_lookup(const Context *, const EvalContext *evalctx)
ValuePtr v1 = evalctx->getArgValue(1);
const Value::VectorType &vec = v1->toVector();
if (vec[0].toVector().size() < 2) // Second must be a vector of vectors
if (vec[0]->toVector().size() < 2) // Second must be a vector of vectors
return ValuePtr::undefined;
if (!vec[0].getVec2(low_p, low_v) || !vec[0].getVec2(high_p, high_v))
if (!vec[0]->getVec2(low_p, low_v) || !vec[0]->getVec2(high_p, high_v))
return ValuePtr::undefined;
for (size_t i = 1; i < vec.size(); i++) {
double this_p, this_v;
if (vec[i].getVec2(this_p, this_v)) {
if (vec[i]->getVec2(this_p, this_v)) {
if (this_p <= p && (this_p > low_p || low_p > p)) {
low_p = this_p;
low_v = this_v;
@ -727,10 +746,10 @@ static Value::VectorType search(const std::string &find, const std::string &tabl
if (ptr_ft && ptr_st && (g_utf8_get_char(ptr_ft) == g_utf8_get_char(ptr_st)) ) {
matchCount++;
if (num_returns_per_match == 1) {
returnvec.push_back(Value(double(j)));
returnvec.push_back(ValuePtr(double(j)));
break;
} else {
resultvec.push_back(Value(double(j)));
resultvec.push_back(ValuePtr(double(j)));
}
if (num_returns_per_match > 1 && matchCount >= num_returns_per_match) {
break;
@ -740,10 +759,9 @@ static Value::VectorType search(const std::string &find, const std::string &tabl
if (matchCount == 0) {
gchar utf8_of_cp[6] = ""; //A buffer for a single unicode character to be copied into
if (ptr_ft) g_utf8_strncpy(utf8_of_cp, ptr_ft, 1);
PRINTB(" WARNING: search term not found: \"%s\"", utf8_of_cp);
}
if (num_returns_per_match == 0 || num_returns_per_match > 1) {
returnvec.push_back(Value(resultvec));
returnvec.push_back(ValuePtr(resultvec));
}
}
return returnvec;
@ -761,19 +779,19 @@ static Value::VectorType search(const std::string &find, const Value::VectorType
Value::VectorType resultvec;
const gchar *ptr_ft = g_utf8_offset_to_pointer(find.c_str(), i);
for (size_t j = 0; j < searchTableSize; j++) {
Value::VectorType entryVec = table[j].toVector();
const Value::VectorType &entryVec = table[j]->toVector();
if (entryVec.size() <= index_col_num) {
PRINTB("WARNING: Invalid entry in search vector at index %d, required number of values in the entry: %d. Invalid entry: %s", j % (index_col_num + 1) % table[j]);
return Value::VectorType();
}
const gchar *ptr_st = g_utf8_offset_to_pointer(entryVec[index_col_num].toString().c_str(), 0);
const gchar *ptr_st = g_utf8_offset_to_pointer(entryVec[index_col_num]->toString().c_str(), 0);
if (ptr_ft && ptr_st && (g_utf8_get_char(ptr_ft) == g_utf8_get_char(ptr_st)) ) {
matchCount++;
if (num_returns_per_match == 1) {
returnvec.push_back(Value(double(j)));
returnvec.push_back(ValuePtr(double(j)));
break;
} else {
resultvec.push_back(Value(double(j)));
resultvec.push_back(ValuePtr(double(j)));
}
if (num_returns_per_match > 1 && matchCount >= num_returns_per_match) {
break;
@ -786,7 +804,7 @@ static Value::VectorType search(const std::string &find, const Value::VectorType
PRINTB(" WARNING: search term not found: \"%s\"", utf8_of_cp);
}
if (num_returns_per_match == 0 || num_returns_per_match > 1) {
returnvec.push_back(Value(resultvec));
returnvec.push_back(ValuePtr(resultvec));
}
}
return returnvec;
@ -807,12 +825,12 @@ ValuePtr builtin_search(const Context *, const EvalContext *evalctx)
unsigned int matchCount = 0;
for (size_t j = 0; j < searchTable->toVector().size(); j++) {
const Value &search_element = searchTable->toVector()[j];
const ValuePtr &search_element = searchTable->toVector()[j];
if ((index_col_num == 0 && *findThis == search_element) ||
(index_col_num < search_element.toVector().size() &&
*findThis == search_element.toVector()[index_col_num])) {
returnvec.push_back(Value(double(j)));
if ((index_col_num == 0 && findThis == search_element) ||
(index_col_num < search_element->toVector().size() &&
findThis == search_element->toVector()[index_col_num])) {
returnvec.push_back(ValuePtr(double(j)));
matchCount++;
if (num_returns_per_match != 0 && matchCount >= num_returns_per_match) break;
}
@ -829,16 +847,16 @@ ValuePtr builtin_search(const Context *, const EvalContext *evalctx)
unsigned int matchCount = 0;
Value::VectorType resultvec;
Value const& find_value = findThis->toVector()[i];
const ValuePtr &find_value = findThis->toVector()[i];
for (size_t j = 0; j < searchTable->toVector().size(); j++) {
Value const& search_element = searchTable->toVector()[j];
const ValuePtr &search_element = searchTable->toVector()[j];
if ((index_col_num == 0 && find_value == search_element) ||
(index_col_num < search_element.toVector().size() &&
find_value == search_element.toVector()[index_col_num])) {
Value resultValue((double(j)));
(index_col_num < search_element->toVector().size() &&
find_value == search_element->toVector()[index_col_num])) {
ValuePtr resultValue((double(j)));
matchCount++;
if (num_returns_per_match == 1) {
returnvec.push_back(resultValue);
@ -850,20 +868,13 @@ ValuePtr builtin_search(const Context *, const EvalContext *evalctx)
}
}
if (num_returns_per_match == 1 && matchCount == 0) {
if (findThis->toVector()[i].type() == Value::NUMBER) {
PRINTB(" WARNING: search term not found: %s",findThis->toVector()[i].toDouble());
}
else if (findThis->toVector()[i].type() == Value::STRING) {
PRINTB(" WARNING: search term not found: \"%s\"",findThis->toVector()[i].toString());
}
returnvec.push_back(resultvec);
returnvec.push_back(ValuePtr(resultvec));
}
if (num_returns_per_match == 0 || num_returns_per_match > 1) {
returnvec.push_back(resultvec);
returnvec.push_back(ValuePtr(resultvec));
}
}
} else {
PRINTB(" WARNING: search: none performed on input %s", findThis);
return ValuePtr::undefined;
}
return ValuePtr(returnvec);
@ -927,12 +938,12 @@ ValuePtr builtin_norm(const Context *, const EvalContext *evalctx)
ValuePtr val = evalctx->getArgValue(0);
if (val->type() == Value::VECTOR) {
double sum = 0;
Value::VectorType v = val->toVector();
const Value::VectorType &v = val->toVector();
size_t n = v.size();
for (size_t i = 0; i < n; i++)
if (v[i].type() == Value::NUMBER) {
if (v[i]->type() == Value::NUMBER) {
// sum += pow(v[i].toDouble(),2);
register double x = v[i].toDouble();
register double x = v[i]->toDouble();
sum += x*x;
} else {
PRINT("WARNING: Incorrect arguments to norm()");
@ -958,10 +969,10 @@ ValuePtr builtin_cross(const Context *, const EvalContext *evalctx)
return ValuePtr::undefined;
}
Value::VectorType v0 = arg0->toVector();
Value::VectorType v1 = arg1->toVector();
const Value::VectorType &v0 = arg0->toVector();
const Value::VectorType &v1 = arg1->toVector();
if ((v0.size() == 2) && (v1.size() == 2)) {
return ValuePtr(Value(v0[0].toDouble() * v1[1].toDouble() - v0[1].toDouble() * v1[0].toDouble()));
return ValuePtr(v0[0]->toDouble() * v1[1]->toDouble() - v0[1]->toDouble() * v1[0]->toDouble());
}
if ((v0.size() != 3) || (v1.size() != 3)) {
@ -969,12 +980,12 @@ ValuePtr builtin_cross(const Context *, const EvalContext *evalctx)
return ValuePtr::undefined;
}
for (unsigned int a = 0;a < 3;a++) {
if ((v0[a].type() != Value::NUMBER) || (v1[a].type() != Value::NUMBER)) {
if ((v0[a]->type() != Value::NUMBER) || (v1[a]->type() != Value::NUMBER)) {
PRINT("WARNING: Invalid value in parameter vector for cross()");
return ValuePtr::undefined;
}
double d0 = v0[a].toDouble();
double d1 = v1[a].toDouble();
double d0 = v0[a]->toDouble();
double d1 = v1[a]->toDouble();
if (boost::math::isnan(d0) || boost::math::isnan(d1)) {
PRINT("WARNING: Invalid value (NaN) in parameter vector for cross()");
return ValuePtr::undefined;
@ -985,14 +996,14 @@ ValuePtr builtin_cross(const Context *, const EvalContext *evalctx)
}
}
double x = v0[1].toDouble() * v1[2].toDouble() - v0[2].toDouble() * v1[1].toDouble();
double y = v0[2].toDouble() * v1[0].toDouble() - v0[0].toDouble() * v1[2].toDouble();
double z = v0[0].toDouble() * v1[1].toDouble() - v0[1].toDouble() * v1[0].toDouble();
double x = v0[1]->toDouble() * v1[2]->toDouble() - v0[2]->toDouble() * v1[1]->toDouble();
double y = v0[2]->toDouble() * v1[0]->toDouble() - v0[0]->toDouble() * v1[2]->toDouble();
double z = v0[0]->toDouble() * v1[1]->toDouble() - v0[1]->toDouble() * v1[0]->toDouble();
Value::VectorType result;
result.push_back(Value(x));
result.push_back(Value(y));
result.push_back(Value(z));
result.push_back(ValuePtr(x));
result.push_back(ValuePtr(y));
result.push_back(ValuePtr(z));
return ValuePtr(result);
}

View file

@ -46,3 +46,72 @@ bool matrix_contains_nan( const Transform3d &m )
}
return false;
}
/* Hash a floating point number, copied almost line by line from
Python's pyhash.c, originally by the Python team, Mark Dickinson, et al.
The copyright License for this code can be found in under
../doc/Python-LICENSE.TXT. Changes from the original code include
de-scattering typedefs, and removing the -1 special return case.
This is designed so srand() will work better with floating point
numbers. An oversimplified explanation is that the code calculates the
Remainder of the input divided by 2^31, in a very portable way. See also:
http://bob.ippoli.to/archives/2010/03/23/py3k-unified-numeric-hash/
https://github.com/python/cpython/blob/master/Python/pyhash.c
https://github.com/python/cpython/blob/master/Include/pyhash.h
http://stackoverflow.com/questions/4238122/hash-function-for-floats
http://betterexplained.com/articles/fun-with-modular-arithmetic/
*/
typedef int32_t Py_hash_t;
typedef uint32_t Py_uhash_t;
typedef double Float_t;
Py_hash_t hash_floating_point(Float_t v)
{
int _PyHASH_BITS = 31;
//if (sizeof(Py_uhash_t)==8) _PyHASH_BITS=61;
Py_uhash_t _PyHASH_MODULUS = (((Py_uhash_t)1 << _PyHASH_BITS) - 1);
Py_uhash_t _PyHASH_INF = 314159;
Py_uhash_t _PyHASH_NAN = 0;
int e, sign;
Float_t m;
Py_uhash_t x, y;
if (!std::isfinite(v)) {
if (std::isinf(v))
return v > 0 ? _PyHASH_INF : -_PyHASH_INF;
else
return _PyHASH_NAN;
}
m = frexp(v, &e);
sign = 1;
if (m < 0) {
sign = -1;
m = -m;
}
/* process 28 bits at a time; this should work well both for binary
and hexadecimal floating point. */
x = 0;
while (m) {
x = ((x << 28) & _PyHASH_MODULUS) | x >> (_PyHASH_BITS - 28);
m *= 268435456.0; // 2**28
e -= 28;
y = (Py_uhash_t)m; /* pull out integer part */
m -= y;
x += y;
if (x >= _PyHASH_MODULUS)
x -= _PyHASH_MODULUS;
}
/* adjust for the exponent; first reduce it modulo _PyHASH_BITS */
e = e >= 0 ? e % _PyHASH_BITS : _PyHASH_BITS-1-((-1-e) % _PyHASH_BITS);
x = ((x << e) & _PyHASH_MODULUS) | x >> (_PyHASH_BITS - e);
x = x * sign;
return (Py_hash_t)x;
}

View file

@ -4,6 +4,7 @@
#include <Eigen/Geometry>
#include <Eigen/Dense>
#include <Eigen/StdVector>
#include <boost/cstdint.hpp>
EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(Eigen::Vector2d)
using Eigen::Vector2d;
@ -23,6 +24,7 @@ using Eigen::Matrix4d;
bool matrix_contains_infinity( const Transform3d &m );
bool matrix_contains_nan( const Transform3d &m );
int32_t hash_floating_point( double v );
template<typename Derived> bool is_finite(const Eigen::MatrixBase<Derived>& x) {
return ( (x - x).array() == (x - x).array()).all();

View file

@ -90,13 +90,13 @@ AbstractNode *LinearExtrudeModule::instantiate(const Context *ctx, const ModuleI
node->layername = layer->isUndefined() ? "" : layer->toString();
node->height = 100;
height->getDouble(node->height);
height->getFiniteDouble(node->height);
node->convexity = (int)convexity->toDouble();
origin->getVec2(node->origin_x, node->origin_y);
origin->getVec2(node->origin_x, node->origin_y, true);
node->scale_x = node->scale_y = 1;
scale->getDouble(node->scale_x);
scale->getDouble(node->scale_y);
scale->getVec2(node->scale_x, node->scale_y);
scale->getFiniteDouble(node->scale_x);
scale->getFiniteDouble(node->scale_y);
scale->getVec2(node->scale_x, node->scale_y, true);
if (center->type() == Value::BOOL)
node->center = center->toBool();
@ -109,18 +109,18 @@ AbstractNode *LinearExtrudeModule::instantiate(const Context *ctx, const ModuleI
if (node->scale_x < 0) node->scale_x = 0;
if (node->scale_y < 0) node->scale_y = 0;
if (slices->type() == Value::NUMBER) node->slices = (int)slices->toDouble();
double slicesVal = 0;
slices->getFiniteDouble(slicesVal);
node->slices = (int)slicesVal;
if (twist->type() == Value::NUMBER) {
node->twist = twist->toDouble();
node->twist = 0.0;
twist->getFiniteDouble(node->twist);
if (node->twist != 0.0) {
if (node->slices == 0) {
node->slices = (int)fmax(2, fabs(Calc::get_fragments_from_r(node->height,
node->fn, node->fs, node->fa) * node->twist / 360));
node->slices = (int)fmax(2, fabs(Calc::get_fragments_from_r(node->height, node->fn, node->fs, node->fa) * node->twist / 360));
}
node->has_twist = true;
}
}
node->slices = std::max(node->slices, 1);
if (node->filename.empty()) {

View file

@ -93,6 +93,16 @@
#include <QClipboard>
#include <QDesktopWidget>
#if (QT_VERSION < QT_VERSION_CHECK(5, 1, 0))
// Set dummy for Qt versions that do not have QSaveFile
#define QT_FILE_SAVE_CLASS QFile
#define QT_FILE_SAVE_COMMIT true
#else
#include <QSaveFile>
#define QT_FILE_SAVE_CLASS QSaveFile
#define QT_FILE_SAVE_COMMIT if (saveOk) { saveOk = file.commit(); } else { file.cancelWriting(); }
#endif
#include <fstream>
#include <algorithm>
@ -243,9 +253,11 @@ MainWindow::MainWindow(const QString &filename)
background_chain = NULL;
root_node = NULL;
tval = 0;
fps = 0;
fsteps = 1;
this->anim_step = 0;
this->anim_numsteps = 0;
this->anim_tval = 0.0;
this->anim_dumping = false;
this->anim_dump_start_step = 0;
const QString importStatement = "import(\"%1\");\n";
const QString surfaceStatement = "surface(\"%1\");\n";
@ -279,8 +291,10 @@ MainWindow::MainWindow(const QString &filename)
waitAfterReloadTimer->setInterval(200);
connect(waitAfterReloadTimer, SIGNAL(timeout()), this, SLOT(waitAfterReload()));
connect(this->e_tval, SIGNAL(textChanged(QString)), this, SLOT(actionRenderPreview()));
connect(this->e_fps, SIGNAL(textChanged(QString)), this, SLOT(updatedFps()));
connect(this->e_tval, SIGNAL(textChanged(QString)), this, SLOT(updatedAnimTval()));
connect(this->e_fps, SIGNAL(textChanged(QString)), this, SLOT(updatedAnimFps()));
connect(this->e_fsteps, SIGNAL(textChanged(QString)), this, SLOT(updatedAnimSteps()));
connect(this->e_dump, SIGNAL(toggled(bool)), this, SLOT(updatedAnimDump(bool)));
animate_panel->hide();
find_panel->hide();
@ -814,33 +828,68 @@ void MainWindow::updateRecentFiles()
}
}
void MainWindow::updatedFps()
void MainWindow::updatedAnimTval()
{
bool t_ok;
double t = this->e_tval->text().toDouble(&t_ok);
// Clamp t to 0-1
if (t_ok) {
this->anim_tval = t < 0 ? 0.0 : ((t > 1.0) ? 1.0 : t);
}
else {
this->anim_tval = 0.0;
}
actionRenderPreview();
}
void MainWindow::updatedAnimFps()
{
bool fps_ok;
double fps = this->e_fps->text().toDouble(&fps_ok);
animate_timer->stop();
if (fps_ok && fps > 0) {
if (fps_ok && fps > 0 && this->anim_numsteps > 0) {
this->anim_step = int(this->anim_tval * this->anim_numsteps) % this->anim_numsteps;
animate_timer->setSingleShot(false);
animate_timer->setInterval(int(1000 / this->e_fps->text().toDouble()));
animate_timer->setInterval(int(1000 / fps));
animate_timer->start();
}
}
void MainWindow::updatedAnimSteps()
{
bool steps_ok;
int numsteps = this->e_fsteps->text().toInt(&steps_ok);
if (steps_ok) {
this->anim_numsteps = numsteps;
updatedAnimFps(); // Make sure we start
}
else {
this->anim_numsteps = 0;
}
anim_dumping=false;
}
void MainWindow::updatedAnimDump(bool checked)
{
if (!checked) this->anim_dumping = false;
}
// Only called from animate_timer
void MainWindow::updateTVal()
{
bool fps_ok;
double fps = this->e_fps->text().toDouble(&fps_ok);
if (fps_ok) {
if (fps <= 0) {
actionReloadRenderPreview();
} else {
double s = this->e_fsteps->text().toDouble();
double t = this->e_tval->text().toDouble() + 1/s;
if (this->anim_numsteps == 0) return;
if (this->anim_numsteps > 1) {
this->anim_step = (this->anim_step + 1) % this->anim_numsteps;
this->anim_tval = 1.0 * this->anim_step / this->anim_numsteps;
}
else if (this->anim_numsteps > 0) {
this->anim_step = 0;
this->anim_tval = 0.0;
}
QString txt;
txt.sprintf("%.5f", t >= 1.0 ? 0.0 : t);
txt.sprintf("%.5f", this->anim_tval);
this->e_tval->setText(txt);
}
}
}
void MainWindow::refreshDocument()
@ -1321,6 +1370,16 @@ void MainWindow::saveBackup()
return writeBackup(this->tempFile);
}
void MainWindow::saveError(const QIODevice &file, const std::string &msg) {
const std::string messageFormat = msg + " %s (%s)";
const char *fileName = this->fileName.toLocal8Bit().constData();
PRINTB(messageFormat.c_str(), fileName % file.errorString().toLocal8Bit().constData());
const std::string dialogFormatStr = msg + "\n\"%1\"\n(%2)";
const QString dialogFormat(dialogFormatStr.c_str());
QMessageBox::warning(this, windowTitle(), dialogFormat.arg(this->fileName).arg(file.errorString()));
}
/*!
Save current document.
Should _always_ write to disk, since this is called by SaveAs - i.e. don't try to be
@ -1330,26 +1389,37 @@ void MainWindow::actionSave()
{
if (this->fileName.isEmpty()) {
actionSaveAs();
return;
}
else {
setCurrentOutput();
QFile file(this->fileName);
// If available (>= Qt 5.1), use QSaveFile to ensure the file is not
// destroyed if the device is full. Unfortunately this is not working
// as advertised (at least in Qt 5.3) as it does not detect the device
// full properly and happily commits a 0 byte file.
// Checking the QTextStream status flag after flush() seems to catch
// this condition.
QT_FILE_SAVE_CLASS file(this->fileName);
if (!file.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) {
PRINTB("Failed to open file for writing: %s (%s)",
this->fileName.toLocal8Bit().constData() % file.errorString().toLocal8Bit().constData());
QMessageBox::warning(this, windowTitle(), tr("Failed to open file for writing:\n %1 (%2)")
.arg(this->fileName).arg(file.errorString()));
saveError(file, _("Failed to open file for writing"));
}
else {
QTextStream writer(&file);
writer.setCodec("UTF-8");
writer << this->editor->toPlainText();
PRINTB("Saved design '%s'.", this->fileName.toLocal8Bit().constData());
writer.flush();
bool saveOk = writer.status() == QTextStream::Ok;
QT_FILE_SAVE_COMMIT;
if (saveOk) {
PRINTB(_("Saved design '%s'."), this->fileName.toLocal8Bit().constData());
this->editor->setContentModified(false);
} else {
saveError(file, _("Error saving design"));
}
}
clearCurrentOutput();
updateRecentFiles();
}
}
void MainWindow::actionSaveAs()
@ -1538,18 +1608,18 @@ bool MainWindow::eventFilter(QObject* obj, QEvent *event)
void MainWindow::updateTemporalVariables()
{
this->top_ctx.set_variable("$t", ValuePtr(this->e_tval->text().toDouble()));
this->top_ctx.set_variable("$t", ValuePtr(this->anim_tval));
Value::VectorType vpt;
vpt.push_back(Value(-qglview->cam.object_trans.x()));
vpt.push_back(Value(-qglview->cam.object_trans.y()));
vpt.push_back(Value(-qglview->cam.object_trans.z()));
this->top_ctx.set_variable("$vpt", Value(vpt));
vpt.push_back(ValuePtr(-qglview->cam.object_trans.x()));
vpt.push_back(ValuePtr(-qglview->cam.object_trans.y()));
vpt.push_back(ValuePtr(-qglview->cam.object_trans.z()));
this->top_ctx.set_variable("$vpt", ValuePtr(vpt));
Value::VectorType vpr;
vpr.push_back(Value(fmodf(360 - qglview->cam.object_rot.x() + 90, 360)));
vpr.push_back(Value(fmodf(360 - qglview->cam.object_rot.y(), 360)));
vpr.push_back(Value(fmodf(360 - qglview->cam.object_rot.z(), 360)));
vpr.push_back(ValuePtr(fmodf(360 - qglview->cam.object_rot.x() + 90, 360)));
vpr.push_back(ValuePtr(fmodf(360 - qglview->cam.object_rot.y(), 360)));
vpr.push_back(ValuePtr(fmodf(360 - qglview->cam.object_rot.z(), 360)));
top_ctx.set_variable("$vpr", ValuePtr(vpr));
top_ctx.set_variable("$vpd", ValuePtr(qglview->cam.zoomValue()));
@ -1755,16 +1825,23 @@ void MainWindow::csgRender()
#endif
}
if (viewActionAnimate->isChecked() && e_dump->isChecked()) {
if (e_dump->isChecked() && animate_timer->isActive()) {
if (anim_dumping && anim_dump_start_step == anim_step) {
anim_dumping=false;
e_dump->setChecked(false);
} else {
if (!anim_dumping) {
anim_dumping = true;
anim_dump_start_step = anim_step;
}
// Force reading from front buffer. Some configurations will read from the back buffer here.
glReadBuffer(GL_FRONT);
QImage img = this->qglview->grabFrameBuffer();
QString filename;
double s = this->e_fsteps->text().toDouble();
double t = this->e_tval->text().toDouble();
filename.sprintf("frame%05d.png", int(round(s*t)));
filename.sprintf("frame%05d.png", this->anim_step);
img.save(filename, "PNG");
}
}
compileEnded();
}
@ -2299,7 +2376,7 @@ void MainWindow::viewModeAnimate()
if (viewActionAnimate->isChecked()) {
animate_panel->show();
actionRenderPreview();
updatedFps();
updatedAnimFps();
} else {
animate_panel->hide();
animate_timer->stop();

View file

@ -508,12 +508,12 @@ Geometry *PrimitiveNode::createGeometry() const
for (size_t i=0; i<this->faces->toVector().size(); i++)
{
p->append_poly();
const Value::VectorType &vec = this->faces->toVector()[i].toVector();
const Value::VectorType &vec = this->faces->toVector()[i]->toVector();
for (size_t j=0; j<vec.size(); j++) {
size_t pt = vec[j].toDouble();
size_t pt = vec[j]->toDouble();
if (pt < this->points->toVector().size()) {
double px, py, pz;
if (!this->points->toVector()[pt].getVec3(px, py, pz) ||
if (!this->points->toVector()[pt]->getVec3(px, py, pz) ||
isinf(px) || isinf(py) || isinf(pz)) {
PRINTB("ERROR: Unable to convert point at index %d to a vec3 of numbers", j);
return p;
@ -572,7 +572,7 @@ Geometry *PrimitiveNode::createGeometry() const
double x,y;
const Value::VectorType &vec = this->points->toVector();
for (unsigned int i=0;i<vec.size();i++) {
const Value &val = vec[i];
const Value &val = *vec[i];
if (!val.getVec2(x, y) || isinf(x) || isinf(y)) {
PRINTB("ERROR: Unable to convert point %s at index %d to a vec2 of numbers",
val.toString() % i);
@ -585,10 +585,10 @@ Geometry *PrimitiveNode::createGeometry() const
p->addOutline(outline);
}
else {
BOOST_FOREACH(const Value &polygon, this->paths->toVector()) {
BOOST_FOREACH(const ValuePtr &polygon, this->paths->toVector()) {
Outline2d curroutline;
BOOST_FOREACH(const Value &index, polygon.toVector()) {
unsigned int idx = index.toDouble();
BOOST_FOREACH(const ValuePtr &index, polygon->toVector()) {
unsigned int idx = index->toDouble();
if (idx < outline.vertices.size()) {
curroutline.vertices.push_back(outline.vertices[idx]);
}

View file

@ -76,7 +76,7 @@ EditorColorScheme::EditorColorScheme(fs::path path) : path(path)
_name = QString(pt.get<std::string>("name").c_str());
_index = pt.get<int>("index");
} catch (const std::exception & e) {
PRINTB("Error reading color scheme file '%s': %s", path.c_str() % e.what());
PRINTB("Error reading color scheme file '%s': %s", boosty::stringy(path).c_str() % e.what());
_name = "";
_index = 0;
}
@ -369,7 +369,7 @@ void ScintillaEditor::enumerateColorSchemesInPath(ScintillaEditor::colorscheme_s
}
const fs::path path = (*dir_iter).path();
if (!(path.extension().string() == ".json")) {
if (!(path.extension() == ".json")) {
continue;
}

View file

@ -45,25 +45,25 @@ bool SettingsEntry::is_default() const
static Value value(std::string s1, std::string s2) {
Value::VectorType v;
v += Value(s1), Value(s2);
v += ValuePtr(s1), ValuePtr(s2);
return v;
}
static Value values(std::string s1, std::string s1disp, std::string s2, std::string s2disp) {
Value::VectorType v;
v += value(s1, s1disp), value(s2, s2disp);
v += ValuePtr(value(s1, s1disp)), ValuePtr(value(s2, s2disp));
return v;
}
static Value values(std::string s1, std::string s1disp, std::string s2, std::string s2disp, std::string s3, std::string s3disp) {
Value::VectorType v;
v += value(s1, s1disp), value(s2, s2disp), value(s3, s3disp);
v += ValuePtr(value(s1, s1disp)), ValuePtr(value(s2, s2disp)), ValuePtr(value(s3, s3disp));
return v;
}
static Value values(std::string s1, std::string s1disp, std::string s2, std::string s2disp, std::string s3, std::string s3disp, std::string s4, std::string s4disp) {
Value::VectorType v;
v += value(s1, s1disp), value(s2, s2disp), value(s3, s3disp), value(s4, s4disp);
v += ValuePtr(value(s1, s1disp)), ValuePtr(value(s2, s2disp)), ValuePtr(value(s3, s3disp)), ValuePtr(value(s4, s4disp));
return v;
}
@ -94,12 +94,17 @@ void Settings::visit(Visitor& visitor)
}
}
Value Settings::get(const SettingsEntry& entry)
const Value &Settings::defaultValue(const SettingsEntry& entry)
{
return entry._default;
}
const Value &Settings::get(const SettingsEntry& entry)
{
return entry._value;
}
void Settings::set(SettingsEntry& entry, const Value val)
void Settings::set(SettingsEntry& entry, const Value &val)
{
entry._value = val;
}
@ -122,15 +127,15 @@ Visitor::~Visitor()
* can be translated.
*/
SettingsEntry Settings::showWarningsIn3dView("3dview", "showWarningsIn3dView", Value(true), Value(true));
SettingsEntry Settings::indentationWidth("editor", "indentationWidth", Value(Value::RangeType(1, 16)), Value(4));
SettingsEntry Settings::tabWidth("editor", "tabWidth", Value(Value::RangeType(1, 16)), Value(4));
SettingsEntry Settings::indentationWidth("editor", "indentationWidth", Value(RangeType(1, 16)), Value(4));
SettingsEntry Settings::tabWidth("editor", "tabWidth", Value(RangeType(1, 16)), Value(4));
SettingsEntry Settings::lineWrap("editor", "lineWrap", values("None", _("None"), "Char", _("Wrap at character boundaries"), "Word", _("Wrap at word boundaries")), Value("Word"));
SettingsEntry Settings::lineWrapIndentationStyle("editor", "lineWrapIndentationStyle", values("Fixed", _("Fixed"), "Same", _("Same"), "Indented", _("Indented")), Value("Fixed"));
SettingsEntry Settings::lineWrapIndentation("editor", "lineWrapIndentation", Value(Value::RangeType(0, 999)), Value(4));
SettingsEntry Settings::lineWrapIndentation("editor", "lineWrapIndentation", Value(RangeType(0, 999)), Value(4));
SettingsEntry Settings::lineWrapVisualizationBegin("editor", "lineWrapVisualizationBegin", values("None", _("None"), "Text", _("Text"), "Border", _("Border"), "Margin", _("Margin")), Value("None"));
SettingsEntry Settings::lineWrapVisualizationEnd("editor", "lineWrapVisualizationEnd", values("None", _("None"), "Text", _("Text"), "Border", _("Border"), "Margin", _("Margin")), Value("Border"));
SettingsEntry Settings::showWhitespace("editor", "showWhitespaces", values("Never", _("Never"), "Always", _("Always"), "AfterIndentation", _("After indentation")), Value("Never"));
SettingsEntry Settings::showWhitespaceSize("editor", "showWhitespacesSize", Value(Value::RangeType(1, 16)), Value(2));
SettingsEntry Settings::showWhitespaceSize("editor", "showWhitespacesSize", Value(RangeType(1, 16)), Value(2));
SettingsEntry Settings::autoIndent("editor", "autoIndent", Value(true), Value(true));
SettingsEntry Settings::indentStyle("editor", "indentStyle", values("Spaces", _("Spaces"), "Tabs", _("Tabs")), Value("Spaces"));
SettingsEntry Settings::tabKeyFunction("editor", "tabKeyFunction", values("Indent", _("Indent"), "InsertTab", _("Insert Tab")), Value("Indent"));

View file

@ -55,9 +55,9 @@ public:
void visit(class Visitor& visitor);
Value defaultValue(const SettingsEntry& entry);
Value get(const SettingsEntry& entry);
void set(SettingsEntry& entry, const Value val);
const Value &defaultValue(const SettingsEntry& entry);
const Value &get(const SettingsEntry& entry);
void set(SettingsEntry& entry, const Value &val);
private:
Settings();

View file

@ -75,12 +75,15 @@ AbstractNode *TextModule::instantiate(const Context *ctx, const ModuleInstantiat
node->params.set_text(lookup_string_variable_with_default(c, "text", ""));
node->params.set_spacing(lookup_double_variable_with_default(c, "spacing", 1.0));
node->params.set_font(lookup_string_variable_with_default(c, "font", ""));
node->params.set_direction(lookup_string_variable_with_default(c, "direction", "ltr"));
node->params.set_direction(lookup_string_variable_with_default(c, "direction", ""));
node->params.set_language(lookup_string_variable_with_default(c, "language", "en"));
node->params.set_script(lookup_string_variable_with_default(c, "script", "latin"));
node->params.set_script(lookup_string_variable_with_default(c, "script", ""));
node->params.set_halign(lookup_string_variable_with_default(c, "halign", "left"));
node->params.set_valign(lookup_string_variable_with_default(c, "valign", "baseline"));
FreetypeRenderer renderer;
renderer.detect_properties(node->params);
return node;
}

View file

@ -105,15 +105,15 @@ AbstractNode *TransformModule::instantiate(const Context *ctx, const ModuleInsta
Eigen::AngleAxisd rotz(0, Vector3d::UnitZ());
double a;
if (val_a->toVector().size() > 0) {
val_a->toVector()[0].getDouble(a);
val_a->toVector()[0]->getDouble(a);
rotx = Eigen::AngleAxisd(a*M_PI/180, Vector3d::UnitX());
}
if (val_a->toVector().size() > 1) {
val_a->toVector()[1].getDouble(a);
val_a->toVector()[1]->getDouble(a);
roty = Eigen::AngleAxisd(a*M_PI/180, Vector3d::UnitY());
}
if (val_a->toVector().size() > 2) {
val_a->toVector()[2].getDouble(a);
val_a->toVector()[2]->getDouble(a);
rotz = Eigen::AngleAxisd(a*M_PI/180, Vector3d::UnitZ());
}
node->matrix.rotate(rotz * roty * rotx);
@ -171,9 +171,9 @@ AbstractNode *TransformModule::instantiate(const Context *ctx, const ModuleInsta
Matrix4d rawmatrix = Matrix4d::Identity();
for (int i = 0; i < 16; i++) {
size_t x = i / 4, y = i % 4;
if (y < v->toVector().size() && v->toVector()[y].type() ==
Value::VECTOR && x < v->toVector()[y].toVector().size())
v->toVector()[y].toVector()[x].getDouble(rawmatrix(y, x));
if (y < v->toVector().size() && v->toVector()[y]->type() ==
Value::VECTOR && x < v->toVector()[y]->toVector().size())
v->toVector()[y]->toVector()[x]->getDouble(rawmatrix(y, x));
}
double w = rawmatrix(3,3);
if (w != 1.0) node->matrix = rawmatrix / w;

View file

@ -31,6 +31,7 @@
#include <assert.h>
#include <sstream>
#include <boost/foreach.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/variant/apply_visitor.hpp>
#include <boost/variant/static_visitor.hpp>
#include <boost/format.hpp>
@ -44,6 +45,20 @@
Value Value::undefined;
ValuePtr ValuePtr::undefined;
static boost::uint32_t convert_to_uint32(const double d) {
boost::uint32_t ret = std::numeric_limits<boost::uint32_t>::max();
if (boost::math::isfinite(d)) {
try {
ret = boost::numeric_cast<boost::uint32_t>(d);
} catch (boost::bad_numeric_cast) {
// ignore, leaving the default max() value
}
}
return ret;
}
std::ostream &operator<<(std::ostream &stream, const Filename &filename)
{
fs::path fnpath = fs::path( (std::string)filename );
@ -186,6 +201,19 @@ bool Value::getDouble(double &v) const
return false;
}
bool Value::getFiniteDouble(double &v) const
{
double result;
if (!getDouble(result)) {
return false;
}
bool valid = boost::math::isfinite(result);
if (valid) {
v = result;
}
return valid;
}
class tostring_visitor : public boost::static_visitor<std::string>
{
public:
@ -243,15 +271,19 @@ public:
stream << '[';
for (size_t i = 0; i < v.size(); i++) {
if (i > 0) stream << ", ";
stream << v[i];
stream << *v[i];
}
stream << ']';
return stream.str();
}
std::string operator()(const Value::RangeType &v) const {
std::string operator()(const RangeType &v) const {
return (boost::format("[%1% : %2% : %3%]") % v.begin_val % v.step_val % v.end_val).str();
}
std::string operator()(const ValuePtr &v) const {
return v->toString();
}
};
std::string Value::toString() const
@ -283,22 +315,22 @@ public:
{
std::stringstream stream;
for (size_t i = 0; i < v.size(); i++) {
stream << v[i].chrString();
stream << v[i]->chrString();
}
return stream.str();
}
std::string operator()(const Value::RangeType &v) const
std::string operator()(const RangeType &v) const
{
const boost::uint32_t steps = v.nbsteps();
const boost::uint32_t steps = v.numValues();
if (steps >= 10000) {
PRINTB("WARNING: Bad range parameter in for statement: too many elements (%lu).", steps);
return "";
}
std::stringstream stream;
Value::RangeType range = v;
for (Value::RangeType::iterator it = range.begin();it != range.end();it++) {
RangeType range = v;
for (RangeType::iterator it = range.begin();it != range.end();it++) {
const Value value(*it);
stream << value.chrString();
}
@ -320,14 +352,25 @@ const Value::VectorType &Value::toVector() const
else return empty;
}
bool Value::getVec2(double &x, double &y) const
bool Value::getVec2(double &x, double &y, bool ignoreInfinite) const
{
if (this->type() != VECTOR) return false;
const VectorType &v = toVector();
if (v.size() != 2) return false;
return (v[0].getDouble(x) && v[1].getDouble(y));
double rx, ry;
bool valid = ignoreInfinite
? v[0]->getFiniteDouble(rx) && v[1]->getFiniteDouble(ry)
: v[0]->getDouble(rx) && v[1]->getDouble(ry);
if (valid) {
x = rx;
y = ry;
}
return valid;
}
bool Value::getVec3(double &x, double &y, double &z, double defaultval) const
@ -345,10 +388,10 @@ bool Value::getVec3(double &x, double &y, double &z, double defaultval) const
if (v.size() != 3) return false;
}
return (v[0].getDouble(x) && v[1].getDouble(y) && v[2].getDouble(z));
return (v[0]->getDouble(x) && v[1]->getDouble(y) && v[2]->getDouble(z));
}
Value::RangeType Value::toRange() const
RangeType Value::toRange() const
{
const RangeType *val = boost::get<RangeType>(&this->value);
if (val) {
@ -455,7 +498,7 @@ public:
Value operator()(const Value::VectorType &op1, const Value::VectorType &op2) const {
Value::VectorType sum;
for (size_t i = 0; i < op1.size() && i < op2.size(); i++) {
sum.push_back(op1[i] + op2[i]);
sum.push_back(ValuePtr(*op1[i] + *op2[i]));
}
return Value(sum);
}
@ -480,7 +523,7 @@ public:
Value operator()(const Value::VectorType &op1, const Value::VectorType &op2) const {
Value::VectorType sum;
for (size_t i = 0; i < op1.size() && i < op2.size(); i++) {
sum.push_back(op1[i] - op2[i]);
sum.push_back(ValuePtr(*op1[i] - *op2[i]));
}
return Value(sum);
}
@ -495,54 +538,49 @@ Value Value::multvecnum(const Value &vecval, const Value &numval)
{
// Vector * Number
VectorType dstv;
BOOST_FOREACH(const Value &val, vecval.toVector()) {
dstv.push_back(val * numval);
BOOST_FOREACH(const ValuePtr &val, vecval.toVector()) {
dstv.push_back(ValuePtr(*val * numval));
}
return Value(dstv);
}
Value Value::multmatvec(const Value &matrixval, const Value &vectorval)
Value Value::multmatvec(const VectorType &matrixvec, const VectorType &vectorvec)
{
const VectorType &matrixvec = matrixval.toVector();
const VectorType &vectorvec = vectorval.toVector();
// Matrix * Vector
VectorType dstv;
for (size_t i=0;i<matrixvec.size();i++) {
if (matrixvec[i].type() != VECTOR ||
matrixvec[i].toVector().size() != vectorvec.size()) {
if (matrixvec[i]->type() != VECTOR ||
matrixvec[i]->toVector().size() != vectorvec.size()) {
return Value();
}
double r_e = 0.0;
for (size_t j=0;j<matrixvec[i].toVector().size();j++) {
if (matrixvec[i].toVector()[j].type() != NUMBER || vectorvec[j].type() != NUMBER) {
for (size_t j=0;j<matrixvec[i]->toVector().size();j++) {
if (matrixvec[i]->toVector()[j]->type() != NUMBER || vectorvec[j]->type() != NUMBER) {
return Value();
}
r_e += matrixvec[i].toVector()[j].toDouble() * vectorvec[j].toDouble();
r_e += matrixvec[i]->toVector()[j]->toDouble() * vectorvec[j]->toDouble();
}
dstv.push_back(Value(r_e));
dstv.push_back(ValuePtr(r_e));
}
return Value(dstv);
}
Value Value::multvecmat(const Value &vectorval, const Value &matrixval)
Value Value::multvecmat(const VectorType &vectorvec, const VectorType &matrixvec)
{
const VectorType &vectorvec = vectorval.toVector();
const VectorType &matrixvec = matrixval.toVector();
assert(vectorvec.size() == matrixvec.size());
// Vector * Matrix
VectorType dstv;
for (size_t i=0;i<matrixvec[0].toVector().size();i++) {
for (size_t i=0;i<matrixvec[0]->toVector().size();i++) {
double r_e = 0.0;
for (size_t j=0;j<vectorvec.size();j++) {
if (matrixvec[j].type() != VECTOR ||
matrixvec[j].toVector()[i].type() != NUMBER ||
vectorvec[j].type() != NUMBER) {
if (matrixvec[j]->type() != VECTOR ||
matrixvec[j]->toVector()[i]->type() != NUMBER ||
vectorvec[j]->type() != NUMBER) {
return Value::undefined;
}
r_e += vectorvec[j].toDouble() * matrixvec[j].toVector()[i].toDouble();
r_e += vectorvec[j]->toDouble() * matrixvec[j]->toVector()[i]->toDouble();
}
dstv.push_back(Value(r_e));
dstv.push_back(ValuePtr(r_e));
}
return Value(dstv);
}
@ -561,29 +599,31 @@ Value Value::operator*(const Value &v) const
else if (this->type() == VECTOR && v.type() == VECTOR) {
const VectorType &vec1 = this->toVector();
const VectorType &vec2 = v.toVector();
if (vec1[0].type() == NUMBER && vec2[0].type() == NUMBER &&
if (vec1[0]->type() == NUMBER && vec2[0]->type() == NUMBER &&
vec1.size() == vec2.size()) {
// Vector dot product.
double r = 0.0;
for (size_t i=0;i<vec1.size();i++) {
if (vec1[i].type() != NUMBER || vec2[i].type() != NUMBER) {
if (vec1[i]->type() != NUMBER || vec2[i]->type() != NUMBER) {
return Value::undefined;
}
r += (vec1[i].toDouble() * vec2[i].toDouble());
r += (vec1[i]->toDouble() * vec2[i]->toDouble());
}
return Value(r);
} else if (vec1[0].type() == VECTOR && vec2[0].type() == NUMBER &&
vec1[0].toVector().size() == vec2.size()) {
} else if (vec1[0]->type() == VECTOR && vec2[0]->type() == NUMBER &&
vec1[0]->toVector().size() == vec2.size()) {
return multmatvec(vec1, vec2);
} else if (vec1[0].type() == NUMBER && vec2[0].type() == VECTOR &&
} else if (vec1[0]->type() == NUMBER && vec2[0]->type() == VECTOR &&
vec1.size() == vec2.size()) {
return multvecmat(vec1, vec2);
} else if (vec1[0].type() == VECTOR && vec2[0].type() == VECTOR &&
vec1[0].toVector().size() == vec2.size()) {
} else if (vec1[0]->type() == VECTOR && vec2[0]->type() == VECTOR &&
vec1[0]->toVector().size() == vec2.size()) {
// Matrix * Matrix
VectorType dstv;
BOOST_FOREACH(const Value &srcrow, vec1) {
dstv.push_back(multvecmat(srcrow, vec2));
BOOST_FOREACH(const ValuePtr &srcrow, vec1) {
const VectorType &srcrowvec = srcrow->toVector();
if (srcrowvec.size() != vec2.size()) return Value::undefined;
dstv.push_back(ValuePtr(multvecmat(srcrowvec, vec2)));
}
return Value(dstv);
}
@ -599,16 +639,16 @@ Value Value::operator/(const Value &v) const
else if (this->type() == VECTOR && v.type() == NUMBER) {
const VectorType &vec = this->toVector();
VectorType dstv;
BOOST_FOREACH(const Value &vecval, vec) {
dstv.push_back(vecval / v);
BOOST_FOREACH(const ValuePtr &vecval, vec) {
dstv.push_back(ValuePtr(*vecval / v));
}
return Value(dstv);
}
else if (this->type() == NUMBER && v.type() == VECTOR) {
const VectorType &vec = v.toVector();
VectorType dstv;
BOOST_FOREACH(const Value &vecval, vec) {
dstv.push_back(*this / vecval);
BOOST_FOREACH(const ValuePtr &vecval, vec) {
dstv.push_back(ValuePtr(*this / *vecval));
}
return Value(dstv);
}
@ -631,8 +671,8 @@ Value Value::operator-() const
else if (this->type() == VECTOR) {
const VectorType &vec = this->toVector();
VectorType dstv;
BOOST_FOREACH(const Value &vecval, vec) {
dstv.push_back(-vecval);
BOOST_FOREACH(const ValuePtr &vecval, vec) {
dstv.push_back(ValuePtr(-*vecval));
}
return Value(dstv);
}
@ -660,10 +700,10 @@ class bracket_visitor : public boost::static_visitor<Value>
{
public:
Value operator()(const std::string &str, const double &idx) const {
int i = int(idx);
Value v;
//Check that the index is positive and less than the size in bytes
if ((i >= 0) && (i < (int)str.size())) {
const boost::uint32_t i = convert_to_uint32(idx);
if (i < str.size()) {
//Ensure character (not byte) index is inside the character/glyph array
if( (unsigned) i < g_utf8_strlen( str.c_str(), str.size() ) ) {
gchar utf8_of_cp[6] = ""; //A buffer for a single unicode character to be copied into
@ -673,19 +713,19 @@ public:
}
v = std::string(utf8_of_cp);
}
// std::cout << "bracket_visitor: " << v << "\n";
}
return v;
}
Value operator()(const Value::VectorType &vec, const double &idx) const {
int i = int(idx);
if ((i >= 0) && (i < (int)vec.size())) return vec[int(idx)];
const boost::uint32_t i = convert_to_uint32(idx);
if (i < vec.size()) return *vec[i];
return Value::undefined;
}
Value operator()(const Value::RangeType &range, const double &idx) const {
switch(int(idx)) {
Value operator()(const RangeType &range, const double &idx) const {
const boost::uint32_t i = convert_to_uint32(idx);
switch(i) {
case 0: return Value(range.begin_val);
case 1: return Value(range.step_val);
case 2: return Value(range.end_val);
@ -704,49 +744,52 @@ Value Value::operator[](const Value &v) const
return boost::apply_visitor(bracket_visitor(), this->value, v.value);
}
void Value::RangeType::normalize() {
void RangeType::normalize() {
if ((step_val>0) && (end_val < begin_val)) {
std::swap(begin_val,end_val);
printDeprecation("Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.");
}
}
boost::uint32_t Value::RangeType::nbsteps() const {
if (boost::math::isnan(step_val) || boost::math::isinf(begin_val) || (boost::math::isinf(end_val))) {
boost::uint32_t RangeType::numValues() const {
if (boost::math::isnan(begin_val) || boost::math::isnan(end_val) || boost::math::isnan(step_val)) {
return 0;
}
if (boost::math::isinf(begin_val) || (boost::math::isinf(end_val))) {
return std::numeric_limits<boost::uint32_t>::max();
}
if ((begin_val == end_val) || boost::math::isinf(step_val)) {
return 0;
return 1;
}
if (step_val == 0) {
return std::numeric_limits<boost::uint32_t>::max();
}
double steps;
double numvals;
if (step_val < 0) {
if (begin_val < end_val) {
return 0;
}
steps = (begin_val - end_val) / (-step_val);
numvals = (begin_val - end_val) / (-step_val) + 1;
} else {
if (begin_val > end_val) {
return 0;
}
steps = (end_val - begin_val) / step_val;
numvals = (end_val - begin_val) / step_val + 1;
}
return steps;
return numvals;
}
Value::RangeType::iterator::iterator(Value::RangeType &range, type_t type) : range(range), val(range.begin_val)
RangeType::iterator::iterator(RangeType &range, type_t type) : range(range), val(range.begin_val), type(type)
{
this->type = type;
update_type();
}
void Value::RangeType::iterator::update_type()
void RangeType::iterator::update_type()
{
if (range.step_val == 0) {
type = RANGE_TYPE_END;
@ -759,19 +802,21 @@ void Value::RangeType::iterator::update_type()
type = RANGE_TYPE_END;
}
}
if (boost::math::isnan(range.begin_val) || boost::math::isnan(range.end_val) || boost::math::isnan(range.step_val)) type = RANGE_TYPE_END;
}
Value::RangeType::iterator::reference Value::RangeType::iterator::operator*()
RangeType::iterator::reference RangeType::iterator::operator*()
{
return val;
}
Value::RangeType::iterator::pointer Value::RangeType::iterator::operator->()
RangeType::iterator::pointer RangeType::iterator::operator->()
{
return &(operator*());
}
Value::RangeType::iterator::self_type Value::RangeType::iterator::operator++()
RangeType::iterator::self_type RangeType::iterator::operator++()
{
if (type < 0) {
type = RANGE_TYPE_RUNNING;
@ -781,14 +826,14 @@ Value::RangeType::iterator::self_type Value::RangeType::iterator::operator++()
return *this;
}
Value::RangeType::iterator::self_type Value::RangeType::iterator::operator++(int)
RangeType::iterator::self_type RangeType::iterator::operator++(int)
{
self_type tmp(*this);
operator++();
return tmp;
}
bool Value::RangeType::iterator::operator==(const self_type &other) const
bool RangeType::iterator::operator==(const self_type &other) const
{
if (type == RANGE_TYPE_RUNNING) {
return (type == other.type) && (val == other.val) && (range == other.range);
@ -797,7 +842,7 @@ bool Value::RangeType::iterator::operator==(const self_type &other) const
}
}
bool Value::RangeType::iterator::operator!=(const self_type &other) const
bool RangeType::iterator::operator!=(const self_type &other) const
{
return !(*this == other);
}
@ -847,7 +892,7 @@ ValuePtr::ValuePtr(const Value::VectorType &v)
this->reset(new Value(v));
}
ValuePtr::ValuePtr(const Value::RangeType &v)
ValuePtr::ValuePtr(const RangeType &v)
{
this->reset(new Value(v));
}
@ -922,3 +967,12 @@ ValuePtr ValuePtr::operator%(const ValuePtr &v) const
return ValuePtr(**this % *v);
}
ValuePtr::operator bool() const
{
return **this;
}
const Value &ValuePtr::operator*() const
{
return *this->get();
}

View file

@ -29,11 +29,8 @@ public:
};
std::ostream &operator<<(std::ostream &stream, const Filename &filename);
class Value
{
public:
class RangeType {
private:
class RangeType {
private:
double begin_val;
double step_val;
double end_val;
@ -41,7 +38,7 @@ public:
/// inverse begin/end if begin is upper than end
void normalize();
public:
public:
typedef enum { RANGE_TYPE_BEGIN, RANGE_TYPE_RUNNING, RANGE_TYPE_END } type_t;
class iterator {
@ -77,9 +74,10 @@ public:
: begin_val(begin), step_val(step), end_val(end) {}
bool operator==(const RangeType &other) const {
return this->begin_val == other.begin_val &&
return this == &other ||
(this->begin_val == other.begin_val &&
this->step_val == other.step_val &&
this->end_val == other.end_val;
this->end_val == other.end_val);
}
double begin_value() { return begin_val; }
@ -89,15 +87,56 @@ public:
iterator begin() { return iterator(*this, RANGE_TYPE_BEGIN); }
iterator end() { return iterator(*this, RANGE_TYPE_END); }
/// return number of steps, max uint32_t value if step is 0
boost::uint32_t nbsteps() const;
/// return number of values, max uint32_t value if step is 0 or range is infinite
boost::uint32_t numValues() const;
friend class chr_visitor;
friend class tostring_visitor;
friend class bracket_visitor;
};
};
typedef std::vector<Value> VectorType;
class ValuePtr : public shared_ptr<const class Value>
{
public:
static ValuePtr undefined;
ValuePtr();
explicit ValuePtr(const Value &v);
ValuePtr(bool v);
ValuePtr(int v);
ValuePtr(double v);
ValuePtr(const std::string &v);
ValuePtr(const char *v);
ValuePtr(const char v);
ValuePtr(const class std::vector<ValuePtr> &v);
ValuePtr(const class RangeType &v);
operator bool() const;
bool operator==(const ValuePtr &v) const;
bool operator!=(const ValuePtr &v) const;
bool operator<(const ValuePtr &v) const;
bool operator<=(const ValuePtr &v) const;
bool operator>=(const ValuePtr &v) const;
bool operator>(const ValuePtr &v) const;
ValuePtr operator-() const;
ValuePtr operator!() const;
ValuePtr operator[](const ValuePtr &v) const;
ValuePtr operator+(const ValuePtr &v) const;
ValuePtr operator-(const ValuePtr &v) const;
ValuePtr operator*(const ValuePtr &v) const;
ValuePtr operator/(const ValuePtr &v) const;
ValuePtr operator%(const ValuePtr &v) const;
const Value &operator*() const;
private:
};
class Value
{
public:
typedef std::vector<ValuePtr> VectorType;
enum ValueType {
UNDEFINED,
@ -127,11 +166,12 @@ public:
double toDouble() const;
bool getDouble(double &v) const;
bool getFiniteDouble(double &v) const;
bool toBool() const;
std::string toString() const;
std::string chrString() const;
const VectorType &toVector() const;
bool getVec2(double &x, double &y) const;
bool getVec2(double &x, double &y, bool ignoreInfinite = false) const;
bool getVec3(double &x, double &y, double &z, double defaultval = 0.0) const;
RangeType toRange() const;
@ -162,46 +202,9 @@ public:
private:
static Value multvecnum(const Value &vecval, const Value &numval);
static Value multmatvec(const Value &matrixval, const Value &vectorval);
static Value multvecmat(const Value &vectorval, const Value &matrixval);
static Value multmatvec(const VectorType &matrixvec, const VectorType &vectorvec);
static Value multvecmat(const VectorType &vectorvec, const VectorType &matrixvec);
Variant value;
};
class ValuePtr : public shared_ptr<const Value>
{
public:
static ValuePtr undefined;
ValuePtr();
explicit ValuePtr(const Value &v);
ValuePtr(bool v);
ValuePtr(int v);
ValuePtr(double v);
ValuePtr(const std::string &v);
ValuePtr(const char *v);
ValuePtr(const char v);
ValuePtr(const Value::VectorType &v);
ValuePtr(const Value::RangeType &v);
operator bool() const { return **this; }
bool operator==(const ValuePtr &v) const;
bool operator!=(const ValuePtr &v) const;
bool operator<(const ValuePtr &v) const;
bool operator<=(const ValuePtr &v) const;
bool operator>=(const ValuePtr &v) const;
bool operator>(const ValuePtr &v) const;
ValuePtr operator-() const;
ValuePtr operator!() const;
ValuePtr operator[](const ValuePtr &v) const;
ValuePtr operator+(const ValuePtr &v) const;
ValuePtr operator-(const ValuePtr &v) const;
ValuePtr operator*(const ValuePtr &v) const;
ValuePtr operator/(const ValuePtr &v) const;
ValuePtr operator%(const ValuePtr &v) const;
const Value &operator*() const { return *this->get(); }
private:
};

View file

@ -0,0 +1,22 @@
// test cases for linear extrude with various (invalid) parameters
oz = 30;
params = [ [0, undef], [1, 1/0], [2, -1/0], [3, 0/0], [4, ""], [5, true], [6, [1:3]], [7, 3] ];
for (a = params) translate([-100, 0, oz * a[0]])
color("red") linear_extrude(height = 10, convexity = a[1]) square(20);
for (a = params) translate([-50, 0, oz * a[0]])
color("yellow") linear_extrude(height = 10, convexity = undef, scale = 1, twist = a[1]) square(20);
for (a = params) translate([0, 0, oz * a[0]])
color("gray") linear_extrude(height = 10, convexity = undef, scale = 1, twist = 0, slices = a[1]) square(20);
for (a = params) translate([50, 0, oz * a[0]])
color("purple") linear_extrude(height = 10, convexity = undef, scale = 1, twist = 30, slices = a[1]) square(20);
for (a = params) translate([100, 0, oz * a[0]])
color("blue") linear_extrude(height = 10, convexity = 2, scale = a[1]) square(20);
for (a = params) translate([(a[0] + 5) * 30, 0, 0])
color("green") linear_extrude(height = a[1]) square(20);

View file

@ -7,3 +7,6 @@ sphere(1/0);
polygon([[0,0,0],[1,0,0],[1,1/0,0]]);
polyhedron(points = [[1/0,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],
triangles = [[0,4,2],[0,2,5],[0,3,4],[0,5,3],[1,2,4],[1,5,2],[1,4,3], [1,3,5]]);
cylinder($fn=1/0);
sphere($fn=1/0);

View file

@ -1,3 +1,4 @@
// verify basic rands(), params are ( min, max, num_results, seed (optional) );
v1 = rands(0,0,0,0);
v2 = rands(-10,0,20,0);
v3 = rands(0,0,-20);
@ -33,3 +34,268 @@ echo("i hope rands() did not crash");
v = rands(1,1,4);
echo( v );
echo( rands(1,2,3,4.1) );
echo( rands(1,2,3,-4.1) );
echo( rands(1,2,3,-4.1e100) );
echo( rands(1,2,3,4.1e100) );
echo( rands(1,2,3,-4.1e-100) );
echo( rands(1,2,3,4.1e-100) );
// part 2 - verify seeded rands() behavior with bizarro infinite inputs
echo("rands(1/0,1/0,1/0,1/0)", rands(1/0,1/0,1/0,1/0));
echo("rands(1/0,1/0,1/0,-1/0)", rands(1/0,1/0,1/0,-1/0));
echo("rands(1/0,1/0,1/0,1.1)", rands(1/0,1/0,1/0,1.1));
echo("rands(1/0,1/0,1/0,-1.1)", rands(1/0,1/0,1/0,-1.1));
echo("rands(1/0,1/0,-1/0,1/0)", rands(1/0,1/0,-1/0,1/0));
echo("rands(1/0,1/0,-1/0,-1/0)", rands(1/0,1/0,-1/0,-1/0));
echo("rands(1/0,1/0,-1/0,1.1)", rands(1/0,1/0,-1/0,1.1));
echo("rands(1/0,1/0,-1/0,-1.1)", rands(1/0,1/0,-1/0,-1.1));
echo("rands(1/0,1/0,1.1,1/0)", rands(1/0,1/0,1.1,1/0));
echo("rands(1/0,1/0,1.1,-1/0)", rands(1/0,1/0,1.1,-1/0));
echo("rands(1/0,1/0,1.1,1.1)", rands(1/0,1/0,1.1,1.1));
echo("rands(1/0,1/0,1.1,-1.1)", rands(1/0,1/0,1.1,-1.1));
echo("rands(1/0,1/0,-1.1,1/0)", rands(1/0,1/0,-1.1,1/0));
echo("rands(1/0,1/0,-1.1,-1/0)", rands(1/0,1/0,-1.1,-1/0));
echo("rands(1/0,1/0,-1.1,1.1)", rands(1/0,1/0,-1.1,1.1));
echo("rands(1/0,1/0,-1.1,-1.1)", rands(1/0,1/0,-1.1,-1.1));
echo("rands(1/0,-1/0,1/0,1/0)", rands(1/0,-1/0,1/0,1/0));
echo("rands(1/0,-1/0,1/0,-1/0)", rands(1/0,-1/0,1/0,-1/0));
echo("rands(1/0,-1/0,1/0,1.1)", rands(1/0,-1/0,1/0,1.1));
echo("rands(1/0,-1/0,1/0,-1.1)", rands(1/0,-1/0,1/0,-1.1));
echo("rands(1/0,-1/0,-1/0,1/0)", rands(1/0,-1/0,-1/0,1/0));
echo("rands(1/0,-1/0,-1/0,-1/0)", rands(1/0,-1/0,-1/0,-1/0));
echo("rands(1/0,-1/0,-1/0,1.1)", rands(1/0,-1/0,-1/0,1.1));
echo("rands(1/0,-1/0,-1/0,-1.1)", rands(1/0,-1/0,-1/0,-1.1));
echo("rands(1/0,-1/0,1.1,1/0)", rands(1/0,-1/0,1.1,1/0));
echo("rands(1/0,-1/0,1.1,-1/0)", rands(1/0,-1/0,1.1,-1/0));
echo("rands(1/0,-1/0,1.1,1.1)", rands(1/0,-1/0,1.1,1.1));
echo("rands(1/0,-1/0,1.1,-1.1)", rands(1/0,-1/0,1.1,-1.1));
echo("rands(1/0,-1/0,-1.1,1/0)", rands(1/0,-1/0,-1.1,1/0));
echo("rands(1/0,-1/0,-1.1,-1/0)", rands(1/0,-1/0,-1.1,-1/0));
echo("rands(1/0,-1/0,-1.1,1.1)", rands(1/0,-1/0,-1.1,1.1));
echo("rands(1/0,-1/0,-1.1,-1.1)", rands(1/0,-1/0,-1.1,-1.1));
echo("rands(1/0,1.1,1/0,1/0)", rands(1/0,1.1,1/0,1/0));
echo("rands(1/0,1.1,1/0,-1/0)", rands(1/0,1.1,1/0,-1/0));
echo("rands(1/0,1.1,1/0,1.1)", rands(1/0,1.1,1/0,1.1));
echo("rands(1/0,1.1,1/0,-1.1)", rands(1/0,1.1,1/0,-1.1));
echo("rands(1/0,1.1,-1/0,1/0)", rands(1/0,1.1,-1/0,1/0));
echo("rands(1/0,1.1,-1/0,-1/0)", rands(1/0,1.1,-1/0,-1/0));
echo("rands(1/0,1.1,-1/0,1.1)", rands(1/0,1.1,-1/0,1.1));
echo("rands(1/0,1.1,-1/0,-1.1)", rands(1/0,1.1,-1/0,-1.1));
echo("rands(1/0,1.1,1.1,1/0)", rands(1/0,1.1,1.1,1/0));
echo("rands(1/0,1.1,1.1,-1/0)", rands(1/0,1.1,1.1,-1/0));
echo("rands(1/0,1.1,1.1,1.1)", rands(1/0,1.1,1.1,1.1));
echo("rands(1/0,1.1,1.1,-1.1)", rands(1/0,1.1,1.1,-1.1));
echo("rands(1/0,1.1,-1.1,1/0)", rands(1/0,1.1,-1.1,1/0));
echo("rands(1/0,1.1,-1.1,-1/0)", rands(1/0,1.1,-1.1,-1/0));
echo("rands(1/0,1.1,-1.1,1.1)", rands(1/0,1.1,-1.1,1.1));
echo("rands(1/0,1.1,-1.1,-1.1)", rands(1/0,1.1,-1.1,-1.1));
echo("rands(1/0,-1.1,1/0,1/0)", rands(1/0,-1.1,1/0,1/0));
echo("rands(1/0,-1.1,1/0,-1/0)", rands(1/0,-1.1,1/0,-1/0));
echo("rands(1/0,-1.1,1/0,1.1)", rands(1/0,-1.1,1/0,1.1));
echo("rands(1/0,-1.1,1/0,-1.1)", rands(1/0,-1.1,1/0,-1.1));
echo("rands(1/0,-1.1,-1/0,1/0)", rands(1/0,-1.1,-1/0,1/0));
echo("rands(1/0,-1.1,-1/0,-1/0)", rands(1/0,-1.1,-1/0,-1/0));
echo("rands(1/0,-1.1,-1/0,1.1)", rands(1/0,-1.1,-1/0,1.1));
echo("rands(1/0,-1.1,-1/0,-1.1)", rands(1/0,-1.1,-1/0,-1.1));
echo("rands(1/0,-1.1,1.1,1/0)", rands(1/0,-1.1,1.1,1/0));
echo("rands(1/0,-1.1,1.1,-1/0)", rands(1/0,-1.1,1.1,-1/0));
echo("rands(1/0,-1.1,1.1,1.1)", rands(1/0,-1.1,1.1,1.1));
echo("rands(1/0,-1.1,1.1,-1.1)", rands(1/0,-1.1,1.1,-1.1));
echo("rands(1/0,-1.1,-1.1,1/0)", rands(1/0,-1.1,-1.1,1/0));
echo("rands(1/0,-1.1,-1.1,-1/0)", rands(1/0,-1.1,-1.1,-1/0));
echo("rands(1/0,-1.1,-1.1,1.1)", rands(1/0,-1.1,-1.1,1.1));
echo("rands(1/0,-1.1,-1.1,-1.1)", rands(1/0,-1.1,-1.1,-1.1));
echo("rands(-1/0,1/0,1/0,1/0)", rands(-1/0,1/0,1/0,1/0));
echo("rands(-1/0,1/0,1/0,-1/0)", rands(-1/0,1/0,1/0,-1/0));
echo("rands(-1/0,1/0,1/0,1.1)", rands(-1/0,1/0,1/0,1.1));
echo("rands(-1/0,1/0,1/0,-1.1)", rands(-1/0,1/0,1/0,-1.1));
echo("rands(-1/0,1/0,-1/0,1/0)", rands(-1/0,1/0,-1/0,1/0));
echo("rands(-1/0,1/0,-1/0,-1/0)", rands(-1/0,1/0,-1/0,-1/0));
echo("rands(-1/0,1/0,-1/0,1.1)", rands(-1/0,1/0,-1/0,1.1));
echo("rands(-1/0,1/0,-1/0,-1.1)", rands(-1/0,1/0,-1/0,-1.1));
echo("rands(-1/0,1/0,1.1,1/0)", rands(-1/0,1/0,1.1,1/0));
echo("rands(-1/0,1/0,1.1,-1/0)", rands(-1/0,1/0,1.1,-1/0));
echo("rands(-1/0,1/0,1.1,1.1)", rands(-1/0,1/0,1.1,1.1));
echo("rands(-1/0,1/0,1.1,-1.1)", rands(-1/0,1/0,1.1,-1.1));
echo("rands(-1/0,1/0,-1.1,1/0)", rands(-1/0,1/0,-1.1,1/0));
echo("rands(-1/0,1/0,-1.1,-1/0)", rands(-1/0,1/0,-1.1,-1/0));
echo("rands(-1/0,1/0,-1.1,1.1)", rands(-1/0,1/0,-1.1,1.1));
echo("rands(-1/0,1/0,-1.1,-1.1)", rands(-1/0,1/0,-1.1,-1.1));
echo("rands(-1/0,-1/0,1/0,1/0)", rands(-1/0,-1/0,1/0,1/0));
echo("rands(-1/0,-1/0,1/0,-1/0)", rands(-1/0,-1/0,1/0,-1/0));
echo("rands(-1/0,-1/0,1/0,1.1)", rands(-1/0,-1/0,1/0,1.1));
echo("rands(-1/0,-1/0,1/0,-1.1)", rands(-1/0,-1/0,1/0,-1.1));
echo("rands(-1/0,-1/0,-1/0,1/0)", rands(-1/0,-1/0,-1/0,1/0));
echo("rands(-1/0,-1/0,-1/0,-1/0)", rands(-1/0,-1/0,-1/0,-1/0));
echo("rands(-1/0,-1/0,-1/0,1.1)", rands(-1/0,-1/0,-1/0,1.1));
echo("rands(-1/0,-1/0,-1/0,-1.1)", rands(-1/0,-1/0,-1/0,-1.1));
echo("rands(-1/0,-1/0,1.1,1/0)", rands(-1/0,-1/0,1.1,1/0));
echo("rands(-1/0,-1/0,1.1,-1/0)", rands(-1/0,-1/0,1.1,-1/0));
echo("rands(-1/0,-1/0,1.1,1.1)", rands(-1/0,-1/0,1.1,1.1));
echo("rands(-1/0,-1/0,1.1,-1.1)", rands(-1/0,-1/0,1.1,-1.1));
echo("rands(-1/0,-1/0,-1.1,1/0)", rands(-1/0,-1/0,-1.1,1/0));
echo("rands(-1/0,-1/0,-1.1,-1/0)", rands(-1/0,-1/0,-1.1,-1/0));
echo("rands(-1/0,-1/0,-1.1,1.1)", rands(-1/0,-1/0,-1.1,1.1));
echo("rands(-1/0,-1/0,-1.1,-1.1)", rands(-1/0,-1/0,-1.1,-1.1));
echo("rands(-1/0,1.1,1/0,1/0)", rands(-1/0,1.1,1/0,1/0));
echo("rands(-1/0,1.1,1/0,-1/0)", rands(-1/0,1.1,1/0,-1/0));
echo("rands(-1/0,1.1,1/0,1.1)", rands(-1/0,1.1,1/0,1.1));
echo("rands(-1/0,1.1,1/0,-1.1)", rands(-1/0,1.1,1/0,-1.1));
echo("rands(-1/0,1.1,-1/0,1/0)", rands(-1/0,1.1,-1/0,1/0));
echo("rands(-1/0,1.1,-1/0,-1/0)", rands(-1/0,1.1,-1/0,-1/0));
echo("rands(-1/0,1.1,-1/0,1.1)", rands(-1/0,1.1,-1/0,1.1));
echo("rands(-1/0,1.1,-1/0,-1.1)", rands(-1/0,1.1,-1/0,-1.1));
echo("rands(-1/0,1.1,1.1,1/0)", rands(-1/0,1.1,1.1,1/0));
echo("rands(-1/0,1.1,1.1,-1/0)", rands(-1/0,1.1,1.1,-1/0));
echo("rands(-1/0,1.1,1.1,1.1)", rands(-1/0,1.1,1.1,1.1));
echo("rands(-1/0,1.1,1.1,-1.1)", rands(-1/0,1.1,1.1,-1.1));
echo("rands(-1/0,1.1,-1.1,1/0)", rands(-1/0,1.1,-1.1,1/0));
echo("rands(-1/0,1.1,-1.1,-1/0)", rands(-1/0,1.1,-1.1,-1/0));
echo("rands(-1/0,1.1,-1.1,1.1)", rands(-1/0,1.1,-1.1,1.1));
echo("rands(-1/0,1.1,-1.1,-1.1)", rands(-1/0,1.1,-1.1,-1.1));
echo("rands(-1/0,-1.1,1/0,1/0)", rands(-1/0,-1.1,1/0,1/0));
echo("rands(-1/0,-1.1,1/0,-1/0)", rands(-1/0,-1.1,1/0,-1/0));
echo("rands(-1/0,-1.1,1/0,1.1)", rands(-1/0,-1.1,1/0,1.1));
echo("rands(-1/0,-1.1,1/0,-1.1)", rands(-1/0,-1.1,1/0,-1.1));
echo("rands(-1/0,-1.1,-1/0,1/0)", rands(-1/0,-1.1,-1/0,1/0));
echo("rands(-1/0,-1.1,-1/0,-1/0)", rands(-1/0,-1.1,-1/0,-1/0));
echo("rands(-1/0,-1.1,-1/0,1.1)", rands(-1/0,-1.1,-1/0,1.1));
echo("rands(-1/0,-1.1,-1/0,-1.1)", rands(-1/0,-1.1,-1/0,-1.1));
echo("rands(-1/0,-1.1,1.1,1/0)", rands(-1/0,-1.1,1.1,1/0));
echo("rands(-1/0,-1.1,1.1,-1/0)", rands(-1/0,-1.1,1.1,-1/0));
echo("rands(-1/0,-1.1,1.1,1.1)", rands(-1/0,-1.1,1.1,1.1));
echo("rands(-1/0,-1.1,1.1,-1.1)", rands(-1/0,-1.1,1.1,-1.1));
echo("rands(-1/0,-1.1,-1.1,1/0)", rands(-1/0,-1.1,-1.1,1/0));
echo("rands(-1/0,-1.1,-1.1,-1/0)", rands(-1/0,-1.1,-1.1,-1/0));
echo("rands(-1/0,-1.1,-1.1,1.1)", rands(-1/0,-1.1,-1.1,1.1));
echo("rands(-1/0,-1.1,-1.1,-1.1)", rands(-1/0,-1.1,-1.1,-1.1));
echo("rands(1.1,1/0,1/0,1/0)", rands(1.1,1/0,1/0,1/0));
echo("rands(1.1,1/0,1/0,-1/0)", rands(1.1,1/0,1/0,-1/0));
echo("rands(1.1,1/0,1/0,1.1)", rands(1.1,1/0,1/0,1.1));
echo("rands(1.1,1/0,1/0,-1.1)", rands(1.1,1/0,1/0,-1.1));
echo("rands(1.1,1/0,-1/0,1/0)", rands(1.1,1/0,-1/0,1/0));
echo("rands(1.1,1/0,-1/0,-1/0)", rands(1.1,1/0,-1/0,-1/0));
echo("rands(1.1,1/0,-1/0,1.1)", rands(1.1,1/0,-1/0,1.1));
echo("rands(1.1,1/0,-1/0,-1.1)", rands(1.1,1/0,-1/0,-1.1));
echo("rands(1.1,1/0,1.1,1/0)", rands(1.1,1/0,1.1,1/0));
echo("rands(1.1,1/0,1.1,-1/0)", rands(1.1,1/0,1.1,-1/0));
echo("rands(1.1,1/0,1.1,1.1)", rands(1.1,1/0,1.1,1.1));
echo("rands(1.1,1/0,1.1,-1.1)", rands(1.1,1/0,1.1,-1.1));
echo("rands(1.1,1/0,-1.1,1/0)", rands(1.1,1/0,-1.1,1/0));
echo("rands(1.1,1/0,-1.1,-1/0)", rands(1.1,1/0,-1.1,-1/0));
echo("rands(1.1,1/0,-1.1,1.1)", rands(1.1,1/0,-1.1,1.1));
echo("rands(1.1,1/0,-1.1,-1.1)", rands(1.1,1/0,-1.1,-1.1));
echo("rands(1.1,-1/0,1/0,1/0)", rands(1.1,-1/0,1/0,1/0));
echo("rands(1.1,-1/0,1/0,-1/0)", rands(1.1,-1/0,1/0,-1/0));
echo("rands(1.1,-1/0,1/0,1.1)", rands(1.1,-1/0,1/0,1.1));
echo("rands(1.1,-1/0,1/0,-1.1)", rands(1.1,-1/0,1/0,-1.1));
echo("rands(1.1,-1/0,-1/0,1/0)", rands(1.1,-1/0,-1/0,1/0));
echo("rands(1.1,-1/0,-1/0,-1/0)", rands(1.1,-1/0,-1/0,-1/0));
echo("rands(1.1,-1/0,-1/0,1.1)", rands(1.1,-1/0,-1/0,1.1));
echo("rands(1.1,-1/0,-1/0,-1.1)", rands(1.1,-1/0,-1/0,-1.1));
echo("rands(1.1,-1/0,1.1,1/0)", rands(1.1,-1/0,1.1,1/0));
echo("rands(1.1,-1/0,1.1,-1/0)", rands(1.1,-1/0,1.1,-1/0));
echo("rands(1.1,-1/0,1.1,1.1)", rands(1.1,-1/0,1.1,1.1));
echo("rands(1.1,-1/0,1.1,-1.1)", rands(1.1,-1/0,1.1,-1.1));
echo("rands(1.1,-1/0,-1.1,1/0)", rands(1.1,-1/0,-1.1,1/0));
echo("rands(1.1,-1/0,-1.1,-1/0)", rands(1.1,-1/0,-1.1,-1/0));
echo("rands(1.1,-1/0,-1.1,1.1)", rands(1.1,-1/0,-1.1,1.1));
echo("rands(1.1,-1/0,-1.1,-1.1)", rands(1.1,-1/0,-1.1,-1.1));
echo("rands(1.1,1.1,1/0,1/0)", rands(1.1,1.1,1/0,1/0));
echo("rands(1.1,1.1,1/0,-1/0)", rands(1.1,1.1,1/0,-1/0));
echo("rands(1.1,1.1,1/0,1.1)", rands(1.1,1.1,1/0,1.1));
echo("rands(1.1,1.1,1/0,-1.1)", rands(1.1,1.1,1/0,-1.1));
echo("rands(1.1,1.1,-1/0,1/0)", rands(1.1,1.1,-1/0,1/0));
echo("rands(1.1,1.1,-1/0,-1/0)", rands(1.1,1.1,-1/0,-1/0));
echo("rands(1.1,1.1,-1/0,1.1)", rands(1.1,1.1,-1/0,1.1));
echo("rands(1.1,1.1,-1/0,-1.1)", rands(1.1,1.1,-1/0,-1.1));
echo("rands(1.1,1.1,1.1,1/0)", rands(1.1,1.1,1.1,1/0));
echo("rands(1.1,1.1,1.1,-1/0)", rands(1.1,1.1,1.1,-1/0));
echo("rands(1.1,1.1,1.1,1.1)", rands(1.1,1.1,1.1,1.1));
echo("rands(1.1,1.1,1.1,-1.1)", rands(1.1,1.1,1.1,-1.1));
echo("rands(1.1,1.1,-1.1,1/0)", rands(1.1,1.1,-1.1,1/0));
echo("rands(1.1,1.1,-1.1,-1/0)", rands(1.1,1.1,-1.1,-1/0));
echo("rands(1.1,1.1,-1.1,1.1)", rands(1.1,1.1,-1.1,1.1));
echo("rands(1.1,1.1,-1.1,-1.1)", rands(1.1,1.1,-1.1,-1.1));
echo("rands(1.1,-1.1,1/0,1/0)", rands(1.1,-1.1,1/0,1/0));
echo("rands(1.1,-1.1,1/0,-1/0)", rands(1.1,-1.1,1/0,-1/0));
echo("rands(1.1,-1.1,1/0,1.1)", rands(1.1,-1.1,1/0,1.1));
echo("rands(1.1,-1.1,1/0,-1.1)", rands(1.1,-1.1,1/0,-1.1));
echo("rands(1.1,-1.1,-1/0,1/0)", rands(1.1,-1.1,-1/0,1/0));
echo("rands(1.1,-1.1,-1/0,-1/0)", rands(1.1,-1.1,-1/0,-1/0));
echo("rands(1.1,-1.1,-1/0,1.1)", rands(1.1,-1.1,-1/0,1.1));
echo("rands(1.1,-1.1,-1/0,-1.1)", rands(1.1,-1.1,-1/0,-1.1));
echo("rands(1.1,-1.1,1.1,1/0)", rands(1.1,-1.1,1.1,1/0));
echo("rands(1.1,-1.1,1.1,-1/0)", rands(1.1,-1.1,1.1,-1/0));
echo("rands(1.1,-1.1,1.1,1.1)", rands(1.1,-1.1,1.1,1.1));
echo("rands(1.1,-1.1,1.1,-1.1)", rands(1.1,-1.1,1.1,-1.1));
echo("rands(1.1,-1.1,-1.1,1/0)", rands(1.1,-1.1,-1.1,1/0));
echo("rands(1.1,-1.1,-1.1,-1/0)", rands(1.1,-1.1,-1.1,-1/0));
echo("rands(1.1,-1.1,-1.1,1.1)", rands(1.1,-1.1,-1.1,1.1));
echo("rands(1.1,-1.1,-1.1,-1.1)", rands(1.1,-1.1,-1.1,-1.1));
echo("rands(-1.1,1/0,1/0,1/0)", rands(-1.1,1/0,1/0,1/0));
echo("rands(-1.1,1/0,1/0,-1/0)", rands(-1.1,1/0,1/0,-1/0));
echo("rands(-1.1,1/0,1/0,1.1)", rands(-1.1,1/0,1/0,1.1));
echo("rands(-1.1,1/0,1/0,-1.1)", rands(-1.1,1/0,1/0,-1.1));
echo("rands(-1.1,1/0,-1/0,1/0)", rands(-1.1,1/0,-1/0,1/0));
echo("rands(-1.1,1/0,-1/0,-1/0)", rands(-1.1,1/0,-1/0,-1/0));
echo("rands(-1.1,1/0,-1/0,1.1)", rands(-1.1,1/0,-1/0,1.1));
echo("rands(-1.1,1/0,-1/0,-1.1)", rands(-1.1,1/0,-1/0,-1.1));
echo("rands(-1.1,1/0,1.1,1/0)", rands(-1.1,1/0,1.1,1/0));
echo("rands(-1.1,1/0,1.1,-1/0)", rands(-1.1,1/0,1.1,-1/0));
echo("rands(-1.1,1/0,1.1,1.1)", rands(-1.1,1/0,1.1,1.1));
echo("rands(-1.1,1/0,1.1,-1.1)", rands(-1.1,1/0,1.1,-1.1));
echo("rands(-1.1,1/0,-1.1,1/0)", rands(-1.1,1/0,-1.1,1/0));
echo("rands(-1.1,1/0,-1.1,-1/0)", rands(-1.1,1/0,-1.1,-1/0));
echo("rands(-1.1,1/0,-1.1,1.1)", rands(-1.1,1/0,-1.1,1.1));
echo("rands(-1.1,1/0,-1.1,-1.1)", rands(-1.1,1/0,-1.1,-1.1));
echo("rands(-1.1,-1/0,1/0,1/0)", rands(-1.1,-1/0,1/0,1/0));
echo("rands(-1.1,-1/0,1/0,-1/0)", rands(-1.1,-1/0,1/0,-1/0));
echo("rands(-1.1,-1/0,1/0,1.1)", rands(-1.1,-1/0,1/0,1.1));
echo("rands(-1.1,-1/0,1/0,-1.1)", rands(-1.1,-1/0,1/0,-1.1));
echo("rands(-1.1,-1/0,-1/0,1/0)", rands(-1.1,-1/0,-1/0,1/0));
echo("rands(-1.1,-1/0,-1/0,-1/0)", rands(-1.1,-1/0,-1/0,-1/0));
echo("rands(-1.1,-1/0,-1/0,1.1)", rands(-1.1,-1/0,-1/0,1.1));
echo("rands(-1.1,-1/0,-1/0,-1.1)", rands(-1.1,-1/0,-1/0,-1.1));
echo("rands(-1.1,-1/0,1.1,1/0)", rands(-1.1,-1/0,1.1,1/0));
echo("rands(-1.1,-1/0,1.1,-1/0)", rands(-1.1,-1/0,1.1,-1/0));
echo("rands(-1.1,-1/0,1.1,1.1)", rands(-1.1,-1/0,1.1,1.1));
echo("rands(-1.1,-1/0,1.1,-1.1)", rands(-1.1,-1/0,1.1,-1.1));
echo("rands(-1.1,-1/0,-1.1,1/0)", rands(-1.1,-1/0,-1.1,1/0));
echo("rands(-1.1,-1/0,-1.1,-1/0)", rands(-1.1,-1/0,-1.1,-1/0));
echo("rands(-1.1,-1/0,-1.1,1.1)", rands(-1.1,-1/0,-1.1,1.1));
echo("rands(-1.1,-1/0,-1.1,-1.1)", rands(-1.1,-1/0,-1.1,-1.1));
echo("rands(-1.1,1.1,1/0,1/0)", rands(-1.1,1.1,1/0,1/0));
echo("rands(-1.1,1.1,1/0,-1/0)", rands(-1.1,1.1,1/0,-1/0));
echo("rands(-1.1,1.1,1/0,1.1)", rands(-1.1,1.1,1/0,1.1));
echo("rands(-1.1,1.1,1/0,-1.1)", rands(-1.1,1.1,1/0,-1.1));
echo("rands(-1.1,1.1,-1/0,1/0)", rands(-1.1,1.1,-1/0,1/0));
echo("rands(-1.1,1.1,-1/0,-1/0)", rands(-1.1,1.1,-1/0,-1/0));
echo("rands(-1.1,1.1,-1/0,1.1)", rands(-1.1,1.1,-1/0,1.1));
echo("rands(-1.1,1.1,-1/0,-1.1)", rands(-1.1,1.1,-1/0,-1.1));
echo("rands(-1.1,1.1,1.1,1/0)", rands(-1.1,1.1,1.1,1/0));
echo("rands(-1.1,1.1,1.1,-1/0)", rands(-1.1,1.1,1.1,-1/0));
echo("rands(-1.1,1.1,1.1,1.1)", rands(-1.1,1.1,1.1,1.1));
echo("rands(-1.1,1.1,1.1,-1.1)", rands(-1.1,1.1,1.1,-1.1));
echo("rands(-1.1,1.1,-1.1,1/0)", rands(-1.1,1.1,-1.1,1/0));
echo("rands(-1.1,1.1,-1.1,-1/0)", rands(-1.1,1.1,-1.1,-1/0));
echo("rands(-1.1,1.1,-1.1,1.1)", rands(-1.1,1.1,-1.1,1.1));
echo("rands(-1.1,1.1,-1.1,-1.1)", rands(-1.1,1.1,-1.1,-1.1));
echo("rands(-1.1,-1.1,1/0,1/0)", rands(-1.1,-1.1,1/0,1/0));
echo("rands(-1.1,-1.1,1/0,-1/0)", rands(-1.1,-1.1,1/0,-1/0));
echo("rands(-1.1,-1.1,1/0,1.1)", rands(-1.1,-1.1,1/0,1.1));
echo("rands(-1.1,-1.1,1/0,-1.1)", rands(-1.1,-1.1,1/0,-1.1));
echo("rands(-1.1,-1.1,-1/0,1/0)", rands(-1.1,-1.1,-1/0,1/0));
echo("rands(-1.1,-1.1,-1/0,-1/0)", rands(-1.1,-1.1,-1/0,-1/0));
echo("rands(-1.1,-1.1,-1/0,1.1)", rands(-1.1,-1.1,-1/0,1.1));
echo("rands(-1.1,-1.1,-1/0,-1.1)", rands(-1.1,-1.1,-1/0,-1.1));
echo("rands(-1.1,-1.1,1.1,1/0)", rands(-1.1,-1.1,1.1,1/0));
echo("rands(-1.1,-1.1,1.1,-1/0)", rands(-1.1,-1.1,1.1,-1/0));
echo("rands(-1.1,-1.1,1.1,1.1)", rands(-1.1,-1.1,1.1,1.1));
echo("rands(-1.1,-1.1,1.1,-1.1)", rands(-1.1,-1.1,1.1,-1.1));
echo("rands(-1.1,-1.1,-1.1,1/0)", rands(-1.1,-1.1,-1.1,1/0));
echo("rands(-1.1,-1.1,-1.1,-1/0)", rands(-1.1,-1.1,-1.1,-1/0));
echo("rands(-1.1,-1.1,-1.1,1.1)", rands(-1.1,-1.1,-1.1,1.1));
echo("rands(-1.1,-1.1,-1.1,-1.1)", rands(-1.1,-1.1,-1.1,-1.1));

9
testdata/scad/issues/issue1472.scad vendored Normal file
View file

@ -0,0 +1,9 @@
// Test for module with NaN arg
module infiniteLoop() infiniteLoop();
for (i=[0:sqrt(-1)]) infiniteLoop();
// Test list comprehension for with NaN arg
function infiniteFunc() = infiniteFunc();
a = [for (i=[0:sqrt(-1)]) infiniteFunc()];
echo("OK");

View file

@ -0,0 +1,9 @@
// Test for recursion crashing when vectors are parameters to a module
// See github issue1407
rec();
module rec(a=1)
{
rec([a,10,10]);
}

View file

@ -37,4 +37,9 @@ echo(str("Testing alternate asymmetric matrix * matrix: ",mb5*ma5));
echo(str(" Bounds check: ",ma5*ma4));
ma6=[ [ 1, 2 ], undef ];
mb6=[ [ 4 ], [ 5 ] ];
echo(str("Testing matrix * matrix with undef elements: ",ma6*mb6));
cube(1.0);

View file

@ -802,27 +802,20 @@ add_custom_target(locale_files ALL COMMAND ${CMAKE_SOURCE_DIR}/../scripts/transl
#
# GUI binary tests
#
#if(APPLE)
#if(EXISTS "$ENV{OPENSCAD_BINARY}")
# set(OPENSCAD_BINPATH "$ENV{OPENSCAD_BINARY}")
#elseif(APPLE)
# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../OpenSCAD.app/Contents/MacOS/OpenSCAD")
#elseif (MINGW_CROSS_ENV_DIR)
# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../mingw32/release/openscad.exe")
#elseif(WIN32)
# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../Release/openscad.exe")
#else()
#elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR/../openscad}")
# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../bin/openscad")
#elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR/../bin/openscad}")
# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_SOURCE_DIR}/../openscad")
#endif()
#if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/openscad")
# set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad")
#endif()
#if(EXISTS "${OPENSCAD_BINPATH}")
# message(STATUS "Found OpenSCAD binary: ${OPENSCAD_BINPATH}")
#else()
# message(STATUS "Couldn't find the OpenSCAD binary: ${OPENSCAD_BINPATH}")
# message(FATAL_ERROR "Please build the OpenSCAD binary and place it here: ${OPENSCAD_BINPATH}" )
#endif()
if(WIN32)
set(OPENSCAD_BINPATH "${CMAKE_CURRENT_BINARY_DIR}/openscad_nogui.exe")
else()
@ -1085,6 +1078,7 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES}
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/recursion-test-function.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/recursion-test-function2.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/recursion-test-module.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/recursion-test-vector.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/tail-recursion-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/value-reassignment-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/value-reassignment-tests2.scad
@ -1104,6 +1098,7 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES}
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-recursive-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/operators-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/issues/issue1472.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/empty-stl.scad)
list(APPEND DUMPTEST_FILES ${FEATURES_2D_FILES} ${FEATURES_3D_FILES} ${DEPRECATED_3D_FILES})
@ -1291,7 +1286,8 @@ list(APPEND BUGS_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue13.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue945e.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1223.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1223b.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1246.scad)
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1246.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue1455.scad)
# We know that we cannot import weakly manifold files into CGAL, so to make tests easier
# to manage, don't try. Once we improve import, we can reenable this

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -5,7 +5,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.5, $fn = 64, $fa = 12, $fs = 2) {
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -13,7 +13,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -22,7 +22,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -41,7 +41,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.5, $fn = 64, $fa = 12, $fs = 2) {
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -49,7 +49,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -58,7 +58,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -85,7 +85,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.5, $fn = 64, $fa = 12, $fs = 2) {
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -93,7 +93,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -102,7 +102,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -131,7 +131,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.5, $fn = 64, $fa = 12, $fs = 2) {
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "B", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -139,7 +139,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "E", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}
@ -148,7 +148,7 @@ group() {
linear_extrude(height = 20, center = true, convexity = 3, scale = [1, 1], $fn = 64, $fa = 12, $fs = 2) {
group() {
offset(r = 0.3, $fn = 64, $fa = 12, $fs = 2) {
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
text(text = "G", size = 10, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 64, $fa = 12, $fs = 2);
}
}
}

View file

@ -6,7 +6,7 @@ group() {
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 5], [0, 0, 0, 1]]) {
linear_extrude(height = 30, center = false, convexity = 4, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "M", size = 22, spacing = 1, font = "Bitstream Vera Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 0, $fa = 12, $fs = 2);
text(text = "M", size = 22, spacing = 1, font = "Bitstream Vera Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 0, $fa = 12, $fs = 2);
}
}
}

View file

@ -185,7 +185,7 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 2, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}
@ -205,7 +205,7 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 2, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}
@ -225,7 +225,7 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 2, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}
@ -245,7 +245,7 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 2, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "SCAD", size = 8, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}

View file

@ -4,7 +4,7 @@ group() {
group() {
group() {
linear_extrude(height = 1, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "Nothing...", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "Nothing...", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}
@ -15,7 +15,7 @@ group() {
group() {
group() {
linear_extrude(height = 1, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "one object", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "one object", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
group() {
group() {
@ -35,7 +35,7 @@ group() {
group() {
group() {
linear_extrude(height = 1, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "2 objects ", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "2 objects ", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
group() {
group() {
@ -72,7 +72,7 @@ group() {
group() {
group() {
linear_extrude(height = 1, center = true, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "3 objects ", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "3 objects ", size = 6, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
group() {
group() {

View file

@ -23,7 +23,7 @@ group() {
group() {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "Open", size = 42, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
text(text = "Open", size = 42, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -38,7 +38,7 @@ group() {
group() {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "SCAD", size = 42, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
text(text = "SCAD", size = 42, spacing = 1, font = "Liberation Sans:style=Bold", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -53,7 +53,7 @@ group() {
group() {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "The Programmers", size = 18, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
text(text = "The Programmers", size = 18, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -68,7 +68,7 @@ group() {
group() {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
linear_extrude(height = 1, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "Solid 3D CAD Modeller", size = 18, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
text(text = "Solid 3D CAD Modeller", size = 18, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 16, $fa = 12, $fs = 2);
}
}
}

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
group() {
color([0, 1, 1, 1]) {
text(text = "6! = 720", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "6! = 720", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
group();
}

View file

@ -10,7 +10,7 @@ group() {
color([0, 1, 1, 1]) {
multmatrix([[1, 0, 0, 40], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
rotate_extrude(convexity = 2, $fn = 80, $fa = 12, $fs = 2) {
text(text = " J", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 80, $fa = 12, $fs = 2);
text(text = " J", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 80, $fa = 12, $fs = 2);
}
}
}

View file

@ -9,7 +9,7 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 0, -1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
group() {
linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -18,7 +18,7 @@ group() {
multmatrix([[0, 0, 1, 0], [1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
group() {
linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "U", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "U", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -27,7 +27,7 @@ group() {
multmatrix([[-1, 0, 0, 0], [0, 0, 1, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
group() {
linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "B", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "B", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -36,7 +36,7 @@ group() {
multmatrix([[0, 0, -1, 0], [-1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 1]]) {
group() {
linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "E", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "E", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
}
@ -45,14 +45,14 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 27.5], [0, 0, 0, 1]]) {
group() {
linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "☺", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "☺", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -32.5], [0, 0, 0, 1]]) {
group() {
linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
text(text = "☼", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "☼", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
}

View file

@ -40,5 +40,5 @@ group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]);
color([-1, -1, -1, 1]);
offset(r = 1, $fn = 0, $fa = 12, $fs = 2);
text(text = "", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}

View file

@ -0,0 +1,350 @@
group() {
group() {
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 60], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 90], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 120], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 150], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 180], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -100], [0, 1, 0, 0], [0, 0, 1, 210], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 3, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
}
group() {
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 60], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 90], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 120], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 150], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 180], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, -50], [0, 1, 0, 0], [0, 0, 1, 210], [0, 0, 0, 1]]) {
color([1, 1, 0, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 3, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
}
group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 60], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 90], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 120], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 150], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 180], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 210], [0, 0, 0, 1]]) {
color([0.501961, 0.501961, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, slices = 3, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
}
group() {
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 60], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 90], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 120], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 150], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 180], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 210], [0, 0, 0, 1]]) {
color([0.501961, 0, 0.501961, 1]) {
linear_extrude(height = 10, center = false, convexity = 1, twist = 30, slices = 3, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
}
group() {
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 30], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 60], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 90], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 120], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 150], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 180], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 100], [0, 1, 0, 0], [0, 0, 1, 210], [0, 0, 0, 1]]) {
color([0, 0, 1, 1]) {
linear_extrude(height = 10, center = false, convexity = 2, scale = [3, 3], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
}
group() {
multmatrix([[1, 0, 0, 150], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 180], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 210], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 240], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 270], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 300], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 330], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 100, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
multmatrix([[1, 0, 0, 360], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([0, 0.501961, 0, 1]) {
linear_extrude(height = 3, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
square(size = [20, 20], center = false);
}
}
}
}
}

View file

@ -7,4 +7,6 @@ group() {
sphere($fn = 0, $fa = 12, $fs = 2, r = inf);
polygon(points = [[0, 0, 0], [1, 0, 0], [1, inf, 0]], paths = undef, convexity = 1);
polyhedron(points = [[inf, 0, 0], [-1, 0, 0], [0, 1, 0], [0, -1, 0], [0, 0, 1], [0, 0, -1]], faces = [[0, 4, 2], [0, 2, 5], [0, 3, 4], [0, 5, 3], [1, 2, 4], [1, 5, 2], [1, 4, 3], [1, 3, 5]], convexity = 1);
cylinder($fn = inf, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false);
sphere($fn = inf, $fa = 12, $fs = 2, r = 1);
}

View file

@ -1,21 +1,21 @@
group() {
linear_extrude(height = 10, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
group() {
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 8, $fa = 12, $fs = 2);
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 8, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
group() {
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 16, $fa = 12, $fs = 2);
}
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 50], [0, 0, 1, 0], [0, 0, 0, 1]]) {
group() {
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 24, $fa = 12, $fs = 2);
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 24, $fa = 12, $fs = 2);
}
}
multmatrix([[1, 0, 0, 50], [0, 1, 0, 50], [0, 0, 1, 0], [0, 0, 0, 1]]) {
group() {
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "center", $fn = 32, $fa = 12, $fs = 2);
text(text = "C", size = 50, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "center", $fn = 32, $fa = 12, $fs = 2);
}
}
}

View file

@ -1,4 +1,4 @@
group() {
text(text = "", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "", size = 10, spacing = 1, font = "", direction = "ltr", language = "en", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}

View file

@ -7,7 +7,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "top", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "top", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 10], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -16,7 +16,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "center", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "center", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 10], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -25,7 +25,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 10], [0, 1, 0, 100], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -34,7 +34,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "bottom", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "bottom", $fn = 0, $fa = 12, $fs = 2);
}
}
group() {
@ -45,7 +45,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 249.2], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -54,7 +54,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 316.1], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -63,7 +63,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "right", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "right", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}

View file

@ -1,3 +1,3 @@
group() {
text(text = "Å", size = 40, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "Å", size = 40, spacing = 1, font = "Liberation Sans", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}

View file

@ -7,7 +7,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltl", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 90], [0, 1, 0, 60], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -16,7 +16,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "rtl", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "rtl", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 10], [0, 1, 0, 160], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -25,7 +25,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ttb", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ttb", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 60], [0, 1, 0, 140], [0, 0, 1, 0], [0, 0, 0, 1]]) {
color([1, 0, 0, 1]) {
@ -34,7 +34,7 @@ group() {
color([0, 0, 1, 1]) {
square(size = [0.5, 20], center = false);
}
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "btt", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "btt", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}

View file

@ -1,3 +1,3 @@
group() {
text(text = "T-X-U", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 2, $fa = 12, $fs = 2);
text(text = "T-X-U", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 2, $fa = 12, $fs = 2);
}

View file

@ -2,35 +2,35 @@ group() {
group() {
group() {
multmatrix([[1, 0, 0, -180], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "0123", size = 40, spacing = 1, font = "MarVoSym", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "0123", size = 40, spacing = 1, font = "MarVoSym", direction = "ltr", language = "en", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, -180], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "ABCD", size = 40, spacing = 1, font = "MarVoSym", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "ABCD", size = 40, spacing = 1, font = "MarVoSym", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, -180], [0, 1, 0, 130], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "abcd", size = 40, spacing = 1, font = "MarVoSym", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "abcd", size = 40, spacing = 1, font = "MarVoSym", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
group() {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "0123", size = 40, spacing = 1, font = "Amiri", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "0123", size = 40, spacing = 1, font = "Amiri", direction = "ltr", language = "en", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "ABCD", size = 40, spacing = 1, font = "Amiri", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "ABCD", size = 40, spacing = 1, font = "Amiri", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 130], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "abcd", size = 40, spacing = 1, font = "Amiri", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "abcd", size = 40, spacing = 1, font = "Amiri", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
group() {
multmatrix([[1, 0, 0, 180], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "0123", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "0123", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 180], [0, 1, 0, 70], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "ABCD", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "ABCD", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 180], [0, 1, 0, 130], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "abcd", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "abcd", size = 40, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "center", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}

View file

@ -1,20 +1,20 @@
group() {
multmatrix([[0.70710678118, 0.5, -0.5, 0], [-0.70710678118, 0.5, -0.5, 0], [0, 0.70710678118, 0.70710678118, 0], [0, 0, 0, 1]]) {
multmatrix([[1, 0, 0, 0], [0, 1, 0, 80], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "OpenSCAD", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, 40], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "الخط الأميري", size = 20, spacing = 1, font = "Amiri:style=Regular", direction = "rtl", language = "ar", script = "arabic", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "الخط الأميري", size = 20, spacing = 1, font = "Amiri:style=Regular", direction = "rtl", language = "ar", script = "Arab", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
text(text = "الخط الأميري", size = 20, spacing = 1, font = "Amiri:style=Regular", direction = "rtl", language = "ar", script = "arabic", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "الخط الأميري", size = 20, spacing = 1, font = "Amiri:style=Regular", direction = "rtl", language = "ar", script = "Arab", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
multmatrix([[1, 0, 0, 0], [0, 1, 0, -40], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "типографика", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "ru", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "типографика", size = 20, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "ru", script = "Cyrl", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, -80], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "positional", size = 30, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "positional", size = 30, spacing = 1, font = "Liberation Sans:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
multmatrix([[1, 0, 0, 0], [0, 1, 0, -100], [0, 0, 1, 0], [0, 0, 0, 1]]) {
text(text = "parameters", size = 12, spacing = 1, font = "Amiri:style=Regular", direction = "ltr", language = "en", script = "latin", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
text(text = "parameters", size = 12, spacing = 1, font = "Amiri:style=Regular", direction = "ltr", language = "en", script = "Latn", halign = "left", valign = "baseline", $fn = 0, $fa = 12, $fs = 2);
}
}
}

View file

@ -3,11 +3,11 @@ WARNING: Bad range parameter in for statement: too many elements (4294967295).
ECHO: nan
ECHO: inf
ECHO: -inf
WARNING: Bad range parameter in for statement: too many elements (4294967295).
ECHO: "INF", 0
ECHO: "-INF", 0
WARNING: Bad range parameter in for statement: too many elements (4294967295).
ECHO: "INF", 0
WARNING: Bad range parameter in for statement: too many elements (4294967295).
ECHO: "-INF", 1
WARNING: Bad range parameter in for statement: too many elements (4294967295).
WARNING: Bad range parameter in for statement: too many elements (4294967295).
WARNING: Bad range parameter in for statement: too many elements (4294967295).
WARNING: Bad range parameter in for statement: too many elements (4294967295).

View file

@ -0,0 +1 @@
ECHO: "OK"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
ERROR: Recursion detected calling module 'rec'

View file

@ -1,9 +1,3 @@
WARNING: search term not found: "q"
WARNING: search term not found: 1000
WARNING: search term not found: "zzz"
WARNING: search term not found: "zzz"
WARNING: search term not found: 500
WARNING: search term not found: ""
ECHO: "Characters in string ("a"): [0]"
ECHO: "Characters in string ("adeq"): [[0, 5], [3, 8], [4], []]"
ECHO: "Default string search ("abe"): [0, 1, 8]"

View file

@ -8,61 +8,31 @@ ECHO: "Expect [[0, 1]] for search(a, aaaa, 2)=[[0, 1]]. OK"
ECHO: "Expect [[0, 1, 2]] for search(a, aaaa, 3)=[[0, 1, 2]]. OK"
ECHO: "Expect [[0, 1, 2, 3]] for search(a, aaaa, 4)=[[0, 1, 2, 3]]. OK"
ECHO: "Expect [[0, 1, 2, 3], [0, 1, 2, 3]] for search(aa, aaaa, 0)=[[0, 1, 2, 3], [0, 1, 2, 3]]. OK"
WARNING: search term not found: "b"
ECHO: "Expect [] for search(b, aaaa)=[]. OK"
WARNING: search term not found: "b"
ECHO: "Expect [] for search(b, aaaa, 1)=[]. OK"
WARNING: search term not found: "b"
ECHO: "Expect [[]] for search(b, aaaa, 0)=[[]]. OK"
WARNING: search term not found: "b"
ECHO: "Expect [[]] for search(b, aaaa, 2)=[[]]. OK"
WARNING: search term not found: "b"
WARNING: search term not found: "b"
ECHO: "Expect [] for search(bb, aaaa)=[]. OK"
WARNING: search term not found: "b"
WARNING: search term not found: "b"
ECHO: "Expect [] for search(bb, aaaa, 1)=[]. OK"
WARNING: search term not found: "b"
WARNING: search term not found: "b"
ECHO: "Expect [[], []] for search(bb, aaaa, 0)=[[], []]. OK"
WARNING: search term not found: "b"
WARNING: search term not found: "b"
ECHO: "Expect [[], []] for search(bb, aaaa, 2)=[[], []]. OK"
ECHO: "Expect [] for search(, aaaa)=[]. OK"
ECHO: "Expect [] for search(, )=[]. OK"
WARNING: search term not found: "a"
ECHO: "Expect [] for search(a, )=[]. OK"
ECHO: "----- Lookup of multi-byte into 1 byte"
WARNING: search term not found: "Л"
ECHO: "Expect [] for search(Л, aaaa)=[]. OK"
WARNING: search term not found: "🂡"
ECHO: "Expect [] for search(🂡, aaaa)=[]. OK"
WARNING: search term not found: "Л"
ECHO: "Expect [[]] for search(Л, aaaa, 0)=[[]]. OK"
WARNING: search term not found: "🂡"
ECHO: "Expect [[]] for search(🂡, aaaa, 0)=[[]]. OK"
WARNING: search term not found: "Л"
WARNING: search term not found: "Л"
ECHO: "Expect [] for search(ЛЛ, aaaa)=[]. OK"
WARNING: search term not found: "🂡"
WARNING: search term not found: "🂡"
ECHO: "Expect [] for search(🂡🂡, aaaa)=[]. OK"
WARNING: search term not found: "Л"
WARNING: search term not found: "Л"
ECHO: "Expect [[], []] for search(ЛЛ, aaaa, 0)=[[], []]. OK"
WARNING: search term not found: "🂡"
WARNING: search term not found: "🂡"
ECHO: "Expect [[], []] for search(🂡🂡, aaaa, 0)=[[], []]. OK"
ECHO: "----- Lookup of 1-byte into multi-byte"
WARNING: search term not found: "a"
ECHO: "Expect [] for search(a, ЛЛЛЛ)=[]. OK"
WARNING: search term not found: "a"
ECHO: "Expect [] for search(a, 🂡🂡🂡🂡)=[]. OK"
WARNING: search term not found: "a"
ECHO: "Expect [] for search(a, ЛЛЛЛ, 1)=[]. OK"
WARNING: search term not found: "a"
ECHO: "Expect [[]] for search(a, 🂡🂡🂡🂡, 0)=[[]]. OK"
WARNING: search term not found: "a"
ECHO: "Expect [[]] for search(a, 🂡🂡🂡🂡, 2)=[[]]. OK"
ECHO: "----- Lookup of 1-byte into mixed multi-byte"
ECHO: "Expect [0] for search(a, aЛaЛaЛaЛa)=[0]. OK"
@ -75,35 +45,27 @@ ECHO: "----- Lookup of 2-byte into 2-byte"
ECHO: "Expect [0] for search(Л, ЛЛЛЛ)=[0]. OK"
ECHO: "Expect [[0, 1, 2, 3]] for search(Л, ЛЛЛЛ, 0)=[[0, 1, 2, 3]]. OK"
ECHO: "----- Lookup of 2-byte into 4-byte"
WARNING: search term not found: "Л"
ECHO: "Expect [] for search(Л, 🂡🂡🂡🂡)=[]. OK"
ECHO: "----- Lookup of 4-byte into 4-byte"
ECHO: "Expect [0] for search(🂡, 🂡🂡🂡🂡)=[0]. OK"
ECHO: "Expect [[0, 1, 2, 3]] for search(🂡, 🂡🂡🂡🂡, 0)=[[0, 1, 2, 3]]. OK"
ECHO: "----- Lookup of 4-byte into 2-byte"
WARNING: search term not found: "🂡"
ECHO: "Expect [] for search(🂡, ЛЛЛЛ)=[]. OK"
ECHO: "----- Lookup of 2-byte into mixed multi-byte"
ECHO: "Expect [1] for search(Л, aЛaЛaЛaЛa, 1)=[1]. OK"
WARNING: search term not found: "Л"
ECHO: "Expect [] for search(Л, a🂡a🂡a🂡a🂡a, 1)=[]. OK"
ECHO: "Expect [2] for search(Л, a🂡Л🂡a🂡Л🂡a, 1)=[2]. OK"
ECHO: "Expect [[1, 3, 5, 7]] for search(Л, aЛaЛaЛaЛa, 0)=[[1, 3, 5, 7]]. OK"
WARNING: search term not found: "Л"
ECHO: "Expect [[]] for search(Л, a🂡a🂡a🂡a🂡a, 0)=[[]]. OK"
ECHO: "Expect [[2, 6]] for search(Л, a🂡Л🂡a🂡Л🂡a, 0)=[[2, 6]]. OK"
ECHO: "----- Lookup of 4-byte into mixed multi-byte"
WARNING: search term not found: "🂡"
ECHO: "Expect [] for search(🂡, aЛaЛaЛaЛa, 1)=[]. OK"
ECHO: "Expect [1] for search(🂡, a🂡a🂡a🂡a🂡a, 1)=[1]. OK"
WARNING: search term not found: "🂡"
ECHO: "Expect [[]] for search(🂡, aЛaЛaЛaЛa, 0)=[[]]. OK"
ECHO: "Expect [[1, 3, 5, 7]] for search(🂡, a🂡a🂡a🂡a🂡a, 0)=[[1, 3, 5, 7]]. OK"
ECHO: "Expect [[1, 3, 5, 7]] for search(🂡, a🂡Л🂡a🂡Л🂡a, 0)=[[1, 3, 5, 7]]. OK"
ECHO: "----- Lookup of mixed multi-byte into mixed multi-byte"
WARNING: search term not found: "🂡"
ECHO: "Expect [[0, 2, 4, 6, 8], [1, 3, 5, 7], []] for search(aЛ🂡, aЛaЛaЛaЛa, 0)=[[0, 2, 4, 6, 8], [1, 3, 5, 7], []]. OK"
WARNING: search term not found: "Л"
ECHO: "Expect [[0, 2, 4, 6, 8], [], [1, 3, 5, 7]] for search(aЛ🂡, a🂡a🂡a🂡a🂡a, 0)=[[0, 2, 4, 6, 8], [], [1, 3, 5, 7]]. OK"
ECHO: "Expect [[0, 4, 8], [2, 6], [1, 3, 5, 7]] for search(aЛ🂡, a🂡Л🂡a🂡Л🂡a, 0)=[[0, 4, 8], [2, 6], [1, 3, 5, 7]]. OK"
ECHO: "Expect [[1, 3, 5, 7], [0, 4, 8], [2, 6]] for search(🂡aЛ, a🂡Л🂡a🂡Л🂡a, 0)=[[1, 3, 5, 7], [0, 4, 8], [2, 6]]. OK"

View file

@ -8,3 +8,4 @@ ECHO: "Testing id matrix * id matrix: [[1, 0], [0, 1]]"
ECHO: "Testing asymmetric matrix * matrix: [[2, 1], [-1, 0]]"
ECHO: "Testing alternate asymmetric matrix * matrix: [[1, 0, 1], [0, 1, -1], [1, 1, 0]]"
ECHO: " Bounds check: undef"
ECHO: "Testing matrix * matrix with undef elements: undef"

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 7 KiB

View file

@ -1,3 +1,4 @@
#!/usr/bin/python
#
# Regression test driver for cmd-line tools
#

View file

@ -58,7 +58,7 @@ isEmpty(VERSION) {
SHORTVERSION = $$section(VERSION, "-", 0, 0)
# Split version into Year Month [Day]
VERSION_SPLIT=$$split(DISPLAYVERSION, ".")
VERSION_SPLIT=$$split(SHORTVERSION, ".")
VERSION_YEAR=$$member(VERSION_SPLIT, 0)
VERSION_MONTH=$$member(VERSION_SPLIT, 1)
VERSION_DAY=$$member(VERSION_SPLIT, 2)