Merge branch 'master' into c++11

c++11
Marius Kintel 2014-03-03 21:04:27 -05:00
commit d6340b18db
43 changed files with 617 additions and 282 deletions

View File

@ -1,253 +1,239 @@
OpenSCAD 2014.0X
================
Language Features:
o Added diameter argument: circle(d), cylinder(d, d1, d2) and sphere(d)
o Added parent_module() and $parent_modules
o Added children() as a replacement for child()
o Unicode strings (using UTF-8) are now correctly handled
o Ranges can have a negative step value
o Added experimental concat() function for concatenating vectors
# OpenSCAD 2014.Q1
Program Features:
o Cmd-line: --info parameter prints system/library info
o Cmd-line: --enable parameter to enable experimental features
o Cmd-line: --csglimit parameter to change CSG rendering limit
o GUI: Added Reset View
o GUI: Added Search&Replace in editor
o GUI: Syntax highlighting now has a dark background theme
**Language Features:**
* Added diameter argument: circle(d), cylinder(d, d1, d2) and sphere(d)
* Added parent_module() and $parent_modules
* Added children() as a replacement for child()
* Unicode strings (using UTF-8) are now correctly handled
* Ranges can have a negative step value
* Added norm() and cross() functions
Bugfixes/improvements:
o polyhedron() is now much more robust handling almost planar polygons
o Automatic reloads of large designs are more robust
o Boolean logic in if() statements are now correctly short-circuited
o rands() with zero range caused an infinite loop
o resize(, auto=true) didn't work when shrinking objects
o The $children variable sometimes misbehaved due to dynamic scoping
o The --camera cmd-line option behaved differently then the corresponding GUI function
o PNG export now doesn't leak transparency settings into the target image
o Improved performance of 3D hull() operations
o Some editor misbehaviors were fixed
o Stability fixes of CGAL-related crashes
o Windows cmd-line can now handle spaces in filenames
o Default CSG rendering limit is now 100K elements
o Fixed a crash reading DXF files using comma as decimal separator
o Fixed a crash running the cmd-line without a HOME env. variable
o Intersecting something with nothing now correctly results in an empty object
**Program Features:**
* Cmd-line: --info parameter prints system/library info
* Cmd-line: --csglimit parameter to change CSG rendering limit
* Cmd-line: Better handling of cmd-line arguments under Windows
* GUI: Added Reset View
* GUI: Added Search&Replace in editor
* GUI: Syntax highlighting now has a dark background theme
* GUI: We now create a backup file before rendering to allow for recovery if OpenSCAD crashes/freezes
Deprecations:
o child() is no longer supported. Use children() instead.
o polyhedron(triangles=[...]): Use polyhedron(faces=[...]) instead.
**Bugfixes/improvements:**
* Reading empty STL files sometimes caused a crash
* OPENSCADPATH now uses semicolon as path separator under Windows
* polyhedron() is now much more robust handling almost planar polygons
* Automatic reloads of large designs are more robust
* Boolean logic in if() statements are now correctly short-circuited
* rands() with zero range caused an infinite loop
* resize(, auto=true) didn't work when shrinking objects
* The $children variable sometimes misbehaved due to dynamic scoping
* The --camera cmd-line option behaved differently then the corresponding GUI function
* PNG export now doesn't leak transparency settings into the target image
* Improved performance of 3D hull() operations
* Some editor misbehaviors were fixed
* Stability fixes of CGAL-related crashes
* Windows cmd-line can now handle spaces in filenames
* Default CSG rendering limit is now 100K elements
* Fixed a crash reading DXF files using comma as decimal separator
* Fixed a crash running the cmd-line without a HOME env. variable
* Intersecting something with nothing now correctly results in an empty object
Misc:
o Test framework now shares more code with the GUI app
o Test report can now be automatically uploaded to dinkypage.com
o Better compatibility with BSD systems
o Qt5 support
**Deprecations:**
* child() is no longer supported. Use children() instead.
* polyhedron(triangles=[...]): Use polyhedron(faces=[...]) instead.
OpenSCAD 2013.06
================
**Misc:**
* Test framework now shares more code with the GUI app
* Test report can now be automatically uploaded to dinkypage.com
* Better compatibility with BSD systems
* Qt5 support
Language Features:
o linear_extrude now takes a scale parameter:
# OpenSCAD 2013.06
**Language Features:**
* linear_extrude now takes a scale parameter:
linear_extrude(height=a, slices=b, twist=c, scale=[x,y])
o Recursive use of modules is now supported (including cascading child() operations):
* Recursive use of modules is now supported (including cascading child() operations):
https://github.com/openscad/openscad/blob/master/examples/example024.scad
o Parameter list values can now depend on earlier values, e.g. for (i=[0:2], j=[0:i]) ..
o value assignments in parameters can now depend on already declared parameters
o Added resize() module:
* Parameter list values can now depend on earlier values, e.g. for (i=[0:2], j=[0:i]) ..
* value assignments in parameters can now depend on already declared parameters
* Added resize() module:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#resize
Program Features:
o Added basic syntax highlighting in the editor
o There is now a built-in library path in user-space:
**Program Features:**
* Added basic syntax highlighting in the editor
* There is now a built-in library path in user-space:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Library_Locations
o Commandline output to PNG, with various camera and rendering settings.
* Commandline output to PNG, with various camera and rendering settings.
Run openscad -h to see usage info or see the OpenSCAD wiki user manual.
o Attempting to open dxf, off or stl files in the GUI will now create an import statement.
o The preview operator (%) will now preserve any manually set color
o The highlight operator (#) will now color the object in transparent red
o Mac: Added document icon
o Mac: Added auto-update check
o Windows: Better cmd-line support using the openscad.com executable
* Attempting to open dxf, off or stl files in the GUI will now create an import statement.
* The preview operator (%) will now preserve any manually set color
* The highlight operator (#) will now color the object in transparent red
* Mac: Added document icon
* Mac: Added auto-update check
* Windows: Better cmd-line support using the openscad.com executable
Bugfixes:
o Importing files is now always relative to the importing script, also for libraries
o We didn't always print a warning when CSG normalization created too many elements
o Binary STLs can now be read on big endian architectures
o Some binary STLs couldn't be read
o Fixed some issues related to ARM builds
o CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data
o The Automatic Reload feature is now more robust
o If a file couldn't be saved it no longer fails silently
o Fixed a number of crashes related to CGAL and OpenCSG rendering or complex models
o The lookup() function had bad boundary condition behavior
o The surface() module failed when the .dat file lacked a trailing newline
o The hull() module could crash if any of the children were empty objects
o Some problems using unicode filenames have been fixed
**Bugfixes:**
* Importing files is now always relative to the importing script, also for libraries
* We didn't always print a warning when CSG normalization created too many elements
* Binary STLs can now be read on big endian architectures
* Some binary STLs couldn't be read
* Fixed some issues related to ARM builds
* CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data
* The Automatic Reload feature is now more robust
* If a file couldn't be saved it no longer fails silently
* Fixed a number of crashes related to CGAL and OpenCSG rendering or complex models
* The lookup() function had bad boundary condition behavior
* The surface() module failed when the .dat file lacked a trailing newline
* The hull() module could crash if any of the children were empty objects
* Some problems using unicode filenames have been fixed
Misc:
o Build scripts have been further improved
o Regression test now creates single monolithic .html file for easier uploading
o Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine
o The backend is finally independent of Qt
o Windows: We now have a 64-bit version
**Misc:**
* Build scripts have been further improved
* Regression test now creates single monolithic .html file for easier uploading
* Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine
* The backend is finally independent of Qt
* Windows: We now have a 64-bit version
Known Bugs:
o Linux: command-line png rendering on Gallium is flaky.
**Known Bugs:**
* Linux: command-line png rendering on Gallium is flaky.
Workaround: use CGAL --render or hardware rendering.
# OpenSCAD 2013.01
OpenSCAD 2013.01
================
**Features:**
* Snappier GUI while performing CGAL computations (computations running in separate thread)
* The size of the misc. caches can now be adjusted from Preferences
* The limit for when to disable OpenCSG can now be adjusted from Preferences
* Added Dot product operator: vec * vec
* Added Matrix multiplication operator: vec * mat, mat * mat
* Added search() function
* Dependencies are now tracked - any changes in uses/included files will be detected and cause a recompile
* The OPENSCADPATH environment variable is now implemented will have precedence when searching for libraries
* .csg files can now be opened from the GUI
* linear_extrude() will now assume that the first parameter means 'height' if it's a number
Features:
o Snappier GUI while performing CGAL computations (computations running in separate thread)
o The size of the misc. caches can now be adjusted from Preferences
o The limit for when to disable OpenCSG can now be adjusted from Preferences
o Added Dot product operator: vec * vec
o Added Matrix multiplication operator: vec * mat, mat * mat
o Added search() function
o Dependencies are now tracked - any changes in uses/included files will be detected and cause a recompile
o The OPENSCADPATH environment variable is now implemented will have precedence when searching for libraries
o .csg files can now be opened from the GUI
o linear_extrude() will now assume that the first parameter means 'height' if it's a number
**Bugfixes:**
* use'ing an non-existing file sometimes crashed under Windows
* Better font handling: Ensure a monospace font is chosen as default
* Division by zero caused hang in some cases (e.g. sin(1/0))
* Larger minkowski operations sometimes caused a crash after a CGAL assert was thrown
* Fixed crashes in shared_ptr.hpp (or similar places) due bugs in cache management and CSG normalization
* scale() with a scale factor of zero could cause a crash
* Fixed a number of issues related to use/include
* Providing an unknown parameter on the cmd-line caused a crash
* cmd-line overrides using -D now also work for USEd modules
* Modifier characters can now be used in front of if statements
* rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic.
* .csg files will now have relative filenames whenever possible
* Don't just ignore geometric nodes having zero volume/area - when doing difference/intersection, they tend to turn negative objects into positive ones.
* Always use utf-8 file encoding, also under Windows
* A lot of build script fixes
* Some other crash bugs fixes
Bugfixes:
o use'ing an non-existing file sometimes crashed under Windows
o Better font handling: Ensure a monospace font is chosen as default
o Division by zero caused hang in some cases (e.g. sin(1/0))
o Larger minkowski operations sometimes caused a crash after a CGAL assert was thrown
o Fixed crashes in shared_ptr.hpp (or similar places) due bugs in cache management and CSG normalization
o scale() with a scale factor of zero could cause a crash
o Fixed a number of issues related to use/include
o Providing an unknown parameter on the cmd-line caused a crash
o cmd-line overrides using -D now also work for USEd modules
o Modifier characters can now be used in front of if statements
o rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic.
o .csg files will now have relative filenames whenever possible
o Don't just ignore geometric nodes having zero volume/area - when doing difference/intersection, they tend to turn negative objects into positive ones.
o Always use utf-8 file encoding, also under Windows
o A lot of build script fixes
o Some other crash bugs fixes
Deprecations:
o The old include syntax "<filename.scad>" without the include keyword is no
**Deprecations:**
* The old include syntax "<filename.scad>" without the include keyword is no
longer supported and will cause a syntax error.
OpenSCAD 2011.12
================
# OpenSCAD 2011.12
Features:
o The MCAD library is now bundled with OpenSCAD
o Added len() function. Takes one vector or string parameter and returns its length.
o The index operator [] now works on strings
o The version() function will return the OpenSCAD version as a vector, e.g. [2011, 09]
o The version_num() function will return the OpenSCAD version as a number, e.g. 20110923
o hull() Now supports 3D objects
o hull() with 2D object can now use for loops and boolean operations as children
o New import() statement reads the correct file format based on the filename extension
**Features:**
* The MCAD library is now bundled with OpenSCAD
* Added len() function. Takes one vector or string parameter and returns its length.
* The index operator [] now works on strings
* The version() function will return the OpenSCAD version as a vector, e.g. [2011, 09]
* The version_num() function will return the OpenSCAD version as a number, e.g. 20110923
* hull() Now supports 3D objects
* hull() with 2D object can now use for loops and boolean operations as children
* New import() statement reads the correct file format based on the filename extension
(.stl, .dxf and .off is supported)
o The color() statement now supports an alpha parameter, e.g. color(c=[1,0,0], alpha=0.4)
o The color() statement now supports specifying colors as strings, e.g. color("Red")
o The color() statement now overrides colors specified further down in the tree
o if()/else() and the ternary operator can now take any value type as parameter. false, 0, empty string and empty vector or illegal value type will evaluate as false, everything else as true.
o Strings can now be lexographically compared using the <, <=, >, >= operators
o Added PI constant.
o Number literals in scientific notation are now accepted by the parser
o Added import and export of the OFF file format
o Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated.
* The color() statement now supports an alpha parameter, e.g. color(c=[1,0,0], alpha=0.4)
* The color() statement now supports specifying colors as strings, e.g. color("Red")
* The color() statement now overrides colors specified further down in the tree
* if()/else() and the ternary operator can now take any value type as parameter. false, 0, empty string and empty vector or illegal value type will evaluate as false, everything else as true.
* Strings can now be lexographically compared using the <, <=, >, >= operators
* Added PI constant.
* Number literals in scientific notation are now accepted by the parser
* Added import and export of the OFF file format
* Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated.
Bugfixes:
o Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview
o square() crashed if any of the dimensions were zero
o Flush Caches didn't flush cached USE'd modules
o STL export should be a bit more robust
o Dropping a file into the editor under Windows didn't work (double C:/C:/ problem)
o On some platforms it was possible to insertion rich text in the editor, causing confusion.
o Less crashes due to CGAL assertions
o OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available
o include now searches librarydir
o The $fs parameter yielded only half the number of segments it should have
o surface(center=true) is now correctly centered in the XY plane
**Bugfixes:**
* Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview
* square() crashed if any of the dimensions were zero
* Flush Caches didn't flush cached USE'd modules
* STL export should be a bit more robust
* Dropping a file into the editor under Windows didn't work (double C:/C:/ problem)
* On some platforms it was possible to insertion rich text in the editor, causing confusion.
* Less crashes due to CGAL assertions
* OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available
* include now searches librarydir
* The $fs parameter yielded only half the number of segments it should have
* surface(center=true) is now correctly centered in the XY plane
Deprecations:
o dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated.
**Deprecations:**
* dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated.
Use linear_extrude() and rotate_extrude() instead.
o The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude()
* The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude()
are now deprecated. Use an import() child instead.
o import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead.
o When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated.
o F2 and F3 for Save and Reload is now deprecated
* import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead.
* When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated.
* F2 and F3 for Save and Reload is now deprecated
# OpenSCAD 2011.06
OpenSCAD 2011.06
================
* Added "Export as Image" menu.
o Added "Export as Image" menu.
Bugfixes:
o Cylinder tesselation broke existing models which are using cylinders
**Bugfixes:**
* Cylinder tesselation broke existing models which are using cylinders
for e.g. captured nut slots and are dependent on the orientation not
changing.
o DXF output couldn't be imported into e.g. AutoCAD and Solidworks after updating
* DXF output couldn't be imported into e.g. AutoCAD and Solidworks after updating
to using the AutoCAD 2000 (AC1015) format. Reverted to the old entity-only output,
causing LWPOLYLINES to not exported allowed anymore.
# OpenSCAD 2011.04
* Added hull() for convex hulls (2D object only)
* minkowski() now supports 2D objects
* Added functions: rands(), sign()
* Now supports escaping of the following characters in strings: \n, \t, \r, \\, \"
* Support nested includes
* Improved parsing of numbers
* DXF: output LWPOLYLINE instead of just LINE entities
* Bugfixes: More robust DXF export, setting $fs/$fa to 0 caused a crash
* Some bugs fixed, maybe some new bugs added
# OpenSCAD 2010.05
* Added functions and statements
* Added abs() function
* Added exp(x), log(b, x), log(x) and ln(x) functions
* Added minkowski() statement for 3d minkowski sums
* Added 'include <filename>' and 'use <filename>' statements
* Old implicit '<filename>' include statement is now obsolete
* Some bugs fixed, maybe some new bugs added
# OpenSCAD 2010.02
OpenSCAD 2011.04
================
o Added hull() for convex hulls (2D object only)
o minkowski() now supports 2D objects
o Added functions: rands(), sign()
o Now supports escaping of the following characters in strings: \n, \t, \r, \\, \"
o Support nested includes
o Improved parsing of numbers
o DXF: output LWPOLYLINE instead of just LINE entities
o Bugfixes: More robust DXF export, setting $fs/$fa to 0 caused a crash
o Some bugs fixed, maybe some new bugs added
OpenSCAD 2010.05
================
o Added functions and statements
- Added abs() function
- Added exp(x), log(b, x), log(x) and ln(x) functions
- Added minkowski() statement for 3d minkowski sums
o Added 'include <filename>' and 'use <filename>' statements
- Old implicit '<filename>' include statement is now obsolete
o Some bugs fixed, maybe some new bugs added
OpenSCAD 2010.02
================
o Added functions and statements
- Added sqrt() function
- Added round(), ceil() and floor() functions
- Added lookup() function for linear interpolation in value list
- Added projection(cut = true/false) statement
- Added child() statement for accessing child nodes of module instances
- Added mirror() statement
o Improved DXF import code (more entities and some bugs fixed)
o Added feature for dumping animation as PNG files
o Added a preferences dialog
o Now using CGAL's delaunay tesselator
o Now using eigen2 for linear algebra
o Reorganisation of the source tree
o Some bugs fixed, maybe some new bugs added
OpenSCAD 2010.01
================
o Added functions and statements
- Added intersection_for()
- Added str function
- Added min and max function
- Added color() statement
o Added 2D Subsystem
- New primitives: circle(), square() and polygon()
- 2D->3D path: linear_extrude() and rotate_extrude()
- Import of DXF to 2d subsystem: import_dxf()
- Export of 2D data as DXF files
o Some bugs fixed, maybe some new bugs added
* Added functions and statements
* Added sqrt() function
* Added round(), ceil() and floor() functions
* Added lookup() function for linear interpolation in value list
* Added projection(cut = true/false) statement
* Added child() statement for accessing child nodes of module instances
* Added mirror() statement
* Improved DXF import code (more entities and some bugs fixed)
* Added feature for dumping animation as PNG files
* Added a preferences dialog
* Now using CGAL's delaunay tesselator
* Now using eigen2 for linear algebra
* Reorganisation of the source tree
* Some bugs fixed, maybe some new bugs added
# OpenSCAD 2010.01
* Added functions and statements
* Added intersection_for()
* Added str function
* Added min and max function
* Added color() statement
* Added 2D Subsystem
* New primitives: circle(), square() and polygon()
* 2D->3D path: linear_extrude() and rotate_extrude()
* Import of DXF to 2d subsystem: import_dxf()
* Export of 2D data as DXF files
* Some bugs fixed, maybe some new bugs added

View File

@ -29,7 +29,9 @@ o Set VERSION and VERSIONDATE environment variable
scripts/publish-macosx.sh
scripts/publish-mingw-x.sh
o Update RELEASE_NOTES
o Update releases/$VERSION.md
o scripts/makereleasenotes.sh
o Update copyright year in AboutDialog.html and mainwin.cc
o Tag release
@ -41,9 +43,9 @@ o build source package
o Sanity check; build a binary or two and manually run some tests
o git push --tags
o ./scripts/github-release.sh $VERSION
o Upload Source package
$ ./scripts/googlecode_upload.py -s 'Source Code' -p openscad -l Featured,Type-Source openscad-$VERSION.src.tar.gz
$ scp openscad-$VERSION.src.tar.gz openscad@files.openscad.org:www
o Remove VERSION environment variable
@ -62,6 +64,7 @@ o Notify package managers
- Fedora: Miro Hrončok <miro@hroncok.cz> or <mhroncok@redhat.com>
- OpenSUSE: Pavol Rusnak <prusnak@opensuse.org>
- MacPorts: Frank Schima <macports2000@gmail.com>
- Arch Linux: Kyle Keen <keenerd@gmail.com>
Build and Upload Release Binaries
---------------------------------

View File

@ -39,6 +39,16 @@ $ ctest -C <configs> Adds extended tests belonging to configs.
Bugs - test known bugs (tests will fail)
All - test everything
C) Automatically upload test results (experimental)
It's possible to automatically upload tests results to an external
server. This is good for CI, as well as being able to easily report
bugs.
To enable this feature, add '-DOPENSCAD_UPLOAD_TESTS=1' to the cmake cmd-line, e.g.:
cmake -DOPENSCAD_UPLOAD_TESTS=1 .
Adding a new test:
------------------

View File

@ -13,6 +13,10 @@
#
# http://en.wikibooks.org/wiki/OpenSCAD_User_Manual
!experimental {
message("If you're building a development binary, consider adding CONFIG+=experimental")
}
isEmpty(QT_VERSION) {
error("Please use qmake for Qt 4 (probably qmake-qt4)")
}
@ -92,6 +96,7 @@ else {
win* {
RC_FILE = openscad_win32.rc
QTPLUGIN += qtaccessiblewidgets
}
CONFIG += qt
@ -161,6 +166,11 @@ CONFIG += glib-2.0
#Uncomment the following line to enable QCodeEdit
#CONFIG += qcodeedit
# Make experimental features available
experimental {
DEFINES += ENABLE_EXPERIMENTAL
}
mdi {
DEFINES += ENABLE_MDI
}

11
releases/2010.01.md Normal file
View File

@ -0,0 +1,11 @@
* Added functions and statements
* Added intersection_for()
* Added str function
* Added min and max function
* Added color() statement
* Added 2D Subsystem
* New primitives: circle(), square() and polygon()
* 2D->3D path: linear_extrude() and rotate_extrude()
* Import of DXF to 2d subsystem: import_dxf()
* Export of 2D data as DXF files
* Some bugs fixed, maybe some new bugs added

14
releases/2010.02.md Normal file
View File

@ -0,0 +1,14 @@
* Added functions and statements
* Added sqrt() function
* Added round(), ceil() and floor() functions
* Added lookup() function for linear interpolation in value list
* Added projection(cut = true/false) statement
* Added child() statement for accessing child nodes of module instances
* Added mirror() statement
* Improved DXF import code (more entities and some bugs fixed)
* Added feature for dumping animation as PNG files
* Added a preferences dialog
* Now using CGAL's delaunay tesselator
* Now using eigen2 for linear algebra
* Reorganisation of the source tree
* Some bugs fixed, maybe some new bugs added

7
releases/2010.05.md Normal file
View File

@ -0,0 +1,7 @@
* Added functions and statements
* Added abs() function
* Added exp(x), log(b, x), log(x) and ln(x) functions
* Added minkowski() statement for 3d minkowski sums
* Added 'include <filename>' and 'use <filename>' statements
* Old implicit '<filename>' include statement is now obsolete
* Some bugs fixed, maybe some new bugs added

9
releases/2011.04.md Normal file
View File

@ -0,0 +1,9 @@
* Added hull() for convex hulls (2D object only)
* minkowski() now supports 2D objects
* Added functions: rands(), sign()
* Now supports escaping of the following characters in strings: \n, \t, \r, \\, \"
* Support nested includes
* Improved parsing of numbers
* DXF: output LWPOLYLINE instead of just LINE entities
* Bugfixes: More robust DXF export, setting $fs/$fa to 0 caused a crash
* Some bugs fixed, maybe some new bugs added

9
releases/2011.06.md Normal file
View File

@ -0,0 +1,9 @@
* Added "Export as Image" menu.
**Bugfixes:**
* Cylinder tesselation broke existing models which are using cylinders
for e.g. captured nut slots and are dependent on the orientation not
changing.
* DXF output couldn't be imported into e.g. AutoCAD and Solidworks after updating
to using the AutoCAD 2000 (AC1015) format. Reverted to the old entity-only output,
causing LWPOLYLINES to not exported allowed anymore.

41
releases/2011.12.md Normal file
View File

@ -0,0 +1,41 @@
**Features:**
* The MCAD library is now bundled with OpenSCAD
* Added len() function. Takes one vector or string parameter and returns its length.
* The index operator [] now works on strings
* The version() function will return the OpenSCAD version as a vector, e.g. [2011, 09]
* The version_num() function will return the OpenSCAD version as a number, e.g. 20110923
* hull() Now supports 3D objects
* hull() with 2D object can now use for loops and boolean operations as children
* New import() statement reads the correct file format based on the filename extension
(.stl, .dxf and .off is supported)
* The color() statement now supports an alpha parameter, e.g. color(c=[1,0,0], alpha=0.4)
* The color() statement now supports specifying colors as strings, e.g. color("Red")
* The color() statement now overrides colors specified further down in the tree
* if()/else() and the ternary operator can now take any value type as parameter. false, 0, empty string and empty vector or illegal value type will evaluate as false, everything else as true.
* Strings can now be lexographically compared using the <, <=, >, >= operators
* Added PI constant.
* Number literals in scientific notation are now accepted by the parser
* Added import and export of the OFF file format
* Now uses standard shortcuts for save, reload and quit on Linux and Windows. F2/F3 will still work but is deprecated.
**Bugfixes:**
* Complex CSG models sometimes took extremely long time to normalize before OpenCSG preview
* square() crashed if any of the dimensions were zero
* Flush Caches didn't flush cached USE'd modules
* STL export should be a bit more robust
* Dropping a file into the editor under Windows didn't work (double C:/C:/ problem)
* On some platforms it was possible to insertion rich text in the editor, causing confusion.
* Less crashes due to CGAL assertions
* OpenCSG should now work on systems with OpenGL 1.x, given that the right extensions are available
* include now searches librarydir
* The $fs parameter yielded only half the number of segments it should have
* surface(center=true) is now correctly centered in the XY plane
**Deprecations:**
* dxf_linear_extrude() and dxf_rotate_extrude() are now deprecated.
Use linear_extrude() and rotate_extrude() instead.
* The file, layer, origin and scale parameters to linear_extrude() and rotate_extrude()
are now deprecated. Use an import() child instead.
* import_dxf(), import_stl() and import_off() are now deprecated. Use import() instead.
* When exporting geometry from the cmd-line, use the universal -o option. It will export to the correct file format based on the given suffix (dxf, stl, off). The -x and -s parameters are still working but deprecated.
* F2 and F3 for Save and Reload is now deprecated

34
releases/2013.01.md Normal file
View File

@ -0,0 +1,34 @@
**Features:**
* Snappier GUI while performing CGAL computations (computations running in separate thread)
* The size of the misc. caches can now be adjusted from Preferences
* The limit for when to disable OpenCSG can now be adjusted from Preferences
* Added Dot product operator: vec * vec
* Added Matrix multiplication operator: vec * mat, mat * mat
* Added search() function
* Dependencies are now tracked - any changes in uses/included files will be detected and cause a recompile
* The OPENSCADPATH environment variable is now implemented will have precedence when searching for libraries
* .csg files can now be opened from the GUI
* linear_extrude() will now assume that the first parameter means 'height' if it's a number
**Bugfixes:**
* use'ing an non-existing file sometimes crashed under Windows
* Better font handling: Ensure a monospace font is chosen as default
* Division by zero caused hang in some cases (e.g. sin(1/0))
* Larger minkowski operations sometimes caused a crash after a CGAL assert was thrown
* Fixed crashes in shared_ptr.hpp (or similar places) due bugs in cache management and CSG normalization
* scale() with a scale factor of zero could cause a crash
* Fixed a number of issues related to use/include
* Providing an unknown parameter on the cmd-line caused a crash
* cmd-line overrides using -D now also work for USEd modules
* Modifier characters can now be used in front of if statements
* rotate() with a vector argument with less that 3 elements used uninitialized variables, ending up being non-deterministic.
* .csg files will now have relative filenames whenever possible
* Don't just ignore geometric nodes having zero volume/area - when doing difference/intersection, they tend to turn negative objects into positive ones.
* Always use utf-8 file encoding, also under Windows
* A lot of build script fixes
* Some other crash bugs fixes
**Deprecations:**
* The old include syntax "<filename.scad>" without the include keyword is no
longer supported and will cause a syntax error.

48
releases/2013.06.md Normal file
View File

@ -0,0 +1,48 @@
**Language Features:**
* linear_extrude now takes a scale parameter:
linear_extrude(height=a, slices=b, twist=c, scale=[x,y])
* Recursive use of modules is now supported (including cascading child() operations):
https://github.com/openscad/openscad/blob/master/examples/example024.scad
* Parameter list values can now depend on earlier values, e.g. for (i=[0:2], j=[0:i]) ..
* value assignments in parameters can now depend on already declared parameters
* Added resize() module:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#resize
**Program Features:**
* Added basic syntax highlighting in the editor
* There is now a built-in library path in user-space:
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Libraries#Library_Locations
* Commandline output to PNG, with various camera and rendering settings.
Run openscad -h to see usage info or see the OpenSCAD wiki user manual.
* Attempting to open dxf, off or stl files in the GUI will now create an import statement.
* The preview operator (%) will now preserve any manually set color
* The highlight operator (#) will now color the object in transparent red
* Mac: Added document icon
* Mac: Added auto-update check
* Windows: Better cmd-line support using the openscad.com executable
**Bugfixes:**
* Importing files is now always relative to the importing script, also for libraries
* We didn't always print a warning when CSG normalization created too many elements
* Binary STLs can now be read on big endian architectures
* Some binary STLs couldn't be read
* Fixed some issues related to ARM builds
* CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data
* The Automatic Reload feature is now more robust
* If a file couldn't be saved it no longer fails silently
* Fixed a number of crashes related to CGAL and OpenCSG rendering or complex models
* The lookup() function had bad boundary condition behavior
* The surface() module failed when the .dat file lacked a trailing newline
* The hull() module could crash if any of the children were empty objects
* Some problems using unicode filenames have been fixed
**Misc:**
* Build scripts have been further improved
* Regression test now creates single monolithic .html file for easier uploading
* Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine
* The backend is finally independent of Qt
* Windows: We now have a 64-bit version
**Known Bugs:**
* Linux: command-line png rendering on Gallium is flaky.
Workaround: use CGAL --render or hardware rendering.

47
releases/2014.Q1.md Normal file
View File

@ -0,0 +1,47 @@
**Language Features:**
* Added diameter argument: circle(d), cylinder(d, d1, d2) and sphere(d)
* Added parent_module() and $parent_modules
* Added children() as a replacement for child()
* Unicode strings (using UTF-8) are now correctly handled
* Ranges can have a negative step value
* Added norm() and cross() functions
**Program Features:**
* Cmd-line: --info parameter prints system/library info
* Cmd-line: --csglimit parameter to change CSG rendering limit
* Cmd-line: Better handling of cmd-line arguments under Windows
* GUI: Added Reset View
* GUI: Added Search&Replace in editor
* GUI: Syntax highlighting now has a dark background theme
* GUI: We now create a backup file before rendering to allow for recovery if OpenSCAD crashes/freezes
**Bugfixes/improvements:**
* Reading empty STL files sometimes caused a crash
* OPENSCADPATH now uses semicolon as path separator under Windows
* polyhedron() is now much more robust handling almost planar polygons
* Automatic reloads of large designs are more robust
* Boolean logic in if() statements are now correctly short-circuited
* rands() with zero range caused an infinite loop
* resize(, auto=true) didn't work when shrinking objects
* The $children variable sometimes misbehaved due to dynamic scoping
* The --camera cmd-line option behaved differently then the corresponding GUI function
* PNG export now doesn't leak transparency settings into the target image
* Improved performance of 3D hull() operations
* Some editor misbehaviors were fixed
* Stability fixes of CGAL-related crashes
* Windows cmd-line can now handle spaces in filenames
* Default CSG rendering limit is now 100K elements
* Fixed a crash reading DXF files using comma as decimal separator
* Fixed a crash running the cmd-line without a HOME env. variable
* Intersecting something with nothing now correctly results in an empty object
**Deprecations:**
* child() is no longer supported. Use children() instead.
* polyhedron(triangles=[...]): Use polyhedron(faces=[...]) instead.
**Misc:**
* Test framework now shares more code with the GUI app
* Test report can now be automatically uploaded to dinkypage.com
* Better compatibility with BSD systems
* Qt5 support

View File

@ -52,6 +52,12 @@ init_variables()
DOBUILD=1
DOUPLOAD=1
DRYRUN=
DOSNAPSHOT=1
if [ "`echo $* | grep release`" ]; then
echo "this script cannot yet build releases, only snapshots"
DOSNAPSHOT=0
exit 1
fi
if [ "`echo $* | grep uploadonly`" ]; then
DOUPLOAD=1
DOBUILD=
@ -69,6 +75,7 @@ init_variables()
export DOUPLOAD
export DRYRUN
export DATECODE
export DOSNAPSHOT
}
check_starting_path()
@ -104,7 +111,12 @@ build_win32()
. ./scripts/setenv-mingw-xbuild.sh clean
. ./scripts/setenv-mingw-xbuild.sh
./scripts/mingw-x-build-dependencies.sh
./scripts/release-common.sh mingw32
if [ $DOSNAPSHOT ] ; then
./scripts/release-common.sh snapshot mingw32
else
echo "this script cant yet build releases, only snapshots"
exit 1
fi
if [ "`echo $? | grep 0`" ]; then
echo build of win32 stage over
else
@ -120,7 +132,12 @@ build_win64()
. ./scripts/setenv-mingw-xbuild.sh clean
. ./scripts/setenv-mingw-xbuild.sh 64
./scripts/mingw-x-build-dependencies.sh 64
./scripts/release-common.sh mingw64
if [ $DOSNAPSHOT ] ; then
./scripts/release-common.sh snapshot mingw64
else
echo "this script cant yet build releases, only snapshots"
exit 1
fi
if [ "`echo $? | grep 0`" ]; then
echo build of win64 stage over
else
@ -135,7 +152,12 @@ build_lin32()
{
. ./scripts/setenv-unibuild.sh
./scripts/uni-build-dependencies.sh
./scripts/release-common.sh
if [ $DOSNAPSHOT ] ; then
./scripts/release-common.sh snapshot
else
echo "this script cant yet build releases, only snapshots"
exit 1
fi
DATECODE=`date +"%Y.%m.%d"`
export DATECODE
}

7
scripts/github-release.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
# Usage (in github root folder): ./scripts/github-release.sh <version>
#
# Requires release.token and releases/<version>.md
curl https://api.github.com/repos/openscad/openscad/releases -H "Authorization: token $(<release.token)" -d "$(./scripts/makereleasejson.py $1)"

13
scripts/makereleasejson.py Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env python
# Used by github-release.sh
import sys
import json
v = sys.argv[1]
print(json.JSONEncoder().encode({
'tag_name': 'openscad-'+v,
'name': 'OpenSCAD '+v,
'body': open('./releases/'+v+'.md').read()
}))

9
scripts/makereleasenotes.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
echo "" > RELEASE_NOTES
for v in `ls -r releases/*.md`; do
mdfile=${v#releases/}
version=${mdfile%.md}
echo "# OpenSCAD $version\n" >> RELEASE_NOTES
cat $v >> RELEASE_NOTES
done

View File

@ -46,8 +46,7 @@ if test -z "$VERSIONDATE"; then
fi
if test -z "$VERSION"; then
VERSION=$VERSIONDATE
COMMIT=-c
SNAPSHOT=true
SNAPSHOT=snapshot
fi
# Turn off ccache, just for safety
@ -59,7 +58,7 @@ export OPENSCAD_LIBRARIES=$PWD/../libraries/homebrew
# Make sure that the correct Qt tools are used
export PATH=$OPENSCAD_LIBRARIES/bin:$PATH
`dirname $0`/release-common.sh -v $VERSION $COMMIT
`dirname $0`/release-common.sh -v $VERSION $SNAPSHOT
if [[ $? != 0 ]]; then
exit 1
fi

View File

@ -10,17 +10,14 @@
# Usage: release-common.sh [-v <versionstring>] [-c] [-mingw[32|64]]
# -v Version string (e.g. -v 2010.01)
# -d Version date (e.g. -d 2010.01.23)
# -c Build with commit info
# -mingw32 Cross-compile for win32 using MXE
# -mingw64 Cross-compile for win64 using Tony Theodore's MXE fork
# -mingw64 Cross-compile for win64 using MXE
# -snapshot Build a snapshot binary (make e.g. experimental features available, build with commit info)
#
# If no version string or version date is given, todays date will be used (YYYY-MM-DD)
# If only verion date is given, it will be used also as version string.
# If only version date is given, it will be used also as version string.
# If no make target is given, release will be used on Windows, none one Mac OS X
#
# The commit info will extracted from git and be passed to qmake as OPENSCAD_COMMIT
# to identify a build in the about box.
#
# The mingw cross compile depends on the MXE cross-build tools. Please
# see the README.md file on how to install these dependencies.
@ -37,6 +34,8 @@ if [ ! -f $OPENSCADDIR/openscad.pro ]; then
exit 1
fi
CONFIG=deploy
if [[ "$OSTYPE" =~ "darwin" ]]; then
OS=MACOSX
elif [[ $OSTYPE == "msys" ]]; then
@ -63,6 +62,11 @@ if [ "`echo $* | grep mingw64`" ]; then
echo Mingw-cross build using ARCH=64
fi
if [ "`echo $* | grep snapshot`" ]; then
CONFIG="$CONFIG experimental"
OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"`
fi
if [ $OS ]; then
echo "Detected OS: $OS"
else
@ -75,7 +79,6 @@ do
case $c in
v) VERSION=$OPTARG;;
d) VERSIONDATE=$OPTARG;;
c) OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"`
esac
done
@ -97,7 +100,8 @@ case $OS in
elif [ "`command -v i686-pc-mingw32-makensis`" ]; then
MAKENSIS=i686-pc-mingw32-makensis
else
echo "makensis not found. please install nsis"
echo "makensis not found. please install nsis on your system."
echo "(for example, on debian linux, try apt-get install nsis)"
exit 1
fi
echo NSIS makensis found: $MAKENSIS
@ -116,7 +120,7 @@ if [ -d .git ]; then
git submodule update
fi
echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIGURATION..."
echo "Building openscad-$VERSION ($VERSIONDATE) $CONFIG..."
if [ ! $NUMCPU ]; then
echo "note: you can 'export NUMCPU=x' for multi-core compiles (x=number)";
@ -124,7 +128,6 @@ if [ ! $NUMCPU ]; then
fi
echo "NUMCPU: " $NUMCPU
CONFIG=deploy
case $OS in
LINUX|MACOSX)
TARGET=
@ -148,11 +151,11 @@ esac
case $OS in
UNIX_CROSS_WIN)
cd $DEPLOYDIR && qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro
cd $DEPLOYDIR && qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+="$CONFIG" CONFIG+=mingw-cross-env CONFIG-=debug ../openscad.pro
cd $OPENSCADDIR
;;
*)
qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG-=debug openscad.pro
qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+="$CONFIG" CONFIG-=debug openscad.pro
;;
esac

View File

@ -89,9 +89,13 @@ Please visit this link for a copy of the license: <a href="http://www.gnu.org/li
</p>
<ul>
<li><a href="http://www.debian.org">Debian</a> maintainer:</b>
<a href="http://christian.amsuess.com/">chrysn</a></lu>
<a href="http://christian.amsuess.com/">chrysn</a></li>
<li><a href="http://fedoraproject.org/">Fedora</a> maintainer:</b>
<a href="http://hroncok.cz/">Miro Hrončok</a></lu>
<a href="http://hroncok.cz/">Miro Hrončok</a></li>
<li><a href="https://www.archlinux.org">Arch Linux</a> maintainer:</b>
<a href="http://kmkeen.com">Kyle Keen</a></li>
<li><a href="http://www.opensuse.org">openSUSE</a> maintainer:</b>
<a href="http://stick.gk2.sk">Pavol Rusnak</a></li>
</ul>
<p>

View File

@ -20,7 +20,6 @@ public:
static void requestOpenFile(const QString &filename);
QString fileName;
class Highlighter *highlighter;
class Preferences *prefs;
@ -71,7 +70,6 @@ private slots:
void updateTVal();
void setFileName(const QString &filename);
void setFont(const QString &family, uint size);
void setSyntaxHighlight(const QString &s);
void showProgress();
void openCSGSettingsChanged();

View File

@ -96,7 +96,11 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent)
addPrefPage(group, prefsAction3DView, page3DView);
addPrefPage(group, prefsActionEditor, pageEditor);
addPrefPage(group, prefsActionUpdate, pageUpdate);
#ifdef ENABLE_EXPERIMENTAL
addPrefPage(group, prefsActionFeatures, pageFeatures);
#else
this->toolBar->removeAction(prefsActionFeatures);
#endif
addPrefPage(group, prefsActionAdvanced, pageAdvanced);
connect(group, SIGNAL(triggered(QAction*)), this, SLOT(actionTriggered(QAction*)));

View File

@ -386,7 +386,7 @@
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="label_10">
<property name="font">
<font>
<weight>75</weight>

View File

@ -40,7 +40,7 @@ public:
else this->cam.projection = Camera::PERSPECTIVE;
}
std::string getRendererInfo() const;
#if QT_VERSION >= 0x050000
#if QT_VERSION >= 0x050001
float getDPI() { return this->devicePixelRatio(); }
#endif
bool save(const char *filename);

View File

@ -161,7 +161,7 @@ AbstractNode *ControlModule::instantiate(const Context* /*ctx*/, const ModuleIns
if (type == CHILD)
{
PRINT("DEPRECATED: child() will be removed in future releases. Use children() instead.");
printDeprecation("DEPRECATED: child() will be removed in future releases. Use children() instead.");
int n = 0;
if (evalctx->numArgs() > 0) {
double v;

View File

@ -142,6 +142,12 @@ void Editor::unhighlightLastError()
highlighter->unhighlightLastError();
}
void Editor::setHighlightScheme(const QString &name)
{
highlighter->assignFormatsToTokens( name );
highlighter->rehighlight(); // slow on large files
}
Editor::~Editor()
{
delete highlighter;

View File

@ -25,7 +25,7 @@ public slots:
void setPlainText(const QString &text);
void highlightError(int error_pos);
void unhighlightLastError();
void setHighlightScheme(const QString &name);
private:
void wheelEvent ( QWheelEvent * event );
Highlighter *highlighter;

View File

@ -22,7 +22,7 @@ std::string lookup_file(const std::string &filename,
if (!fs::exists(absfile) && fs::exists(absfile_fallback)) {
resultfile = absfile_fallback.string();
PRINTB("WARNING: Imported file (%s) found in document root instead of relative to the importing module. This behavior is deprecated", filename);
PRINT_DEPRECATION("DEPRECATED: Imported file (%s) found in document root instead of relative to the importing module. This behavior is deprecated", filename);
}
else {
resultfile = absfile.string();

View File

@ -118,6 +118,20 @@
into a blank document.
expected result: don't crash esp. on mac
12. action: start openscad, open example 001. open edit/prefs/editor/
syntax-highlighter, 'for light background'. make your OS use a light
(white) background for the openscad text editor.
expected result: text is clearly visible, colors have good contrast
13. repeat test 12, but with 'for dark background' and dark background
expected result: text is clearly visible, colors have good contrast
14. repeat test 12, but turn the syntax highlighter off.
expected result: text is clearly visible, single color has good contrast
14. repeat test 13, but turn the syntax highlighter off.
expected result: text is clearly visible, single color has good contrast
*/
#include "highlighter.h"

View File

@ -95,7 +95,7 @@ AbstractNode *ImportModule::instantiate(const Context *ctx, const ModuleInstanti
if (v.isUndefined()) {
v = c.lookup_variable("filename");
if (!v.isUndefined()) {
PRINT("DEPRECATED: filename= is deprecated. Please use file=");
printDeprecation("DEPRECATED: filename= is deprecated. Please use file=");
}
}
std::string filename = lookup_file(v.isUndefined() ? "" : v.toString(), inst->path(), ctx->documentPath());
@ -119,7 +119,7 @@ AbstractNode *ImportModule::instantiate(const Context *ctx, const ModuleInstanti
if (layerval.isUndefined()) {
layerval = c.lookup_variable("layername");
if (!layerval.isUndefined()) {
PRINT("DEPRECATED: layername= is deprecated. Please use layer=");
printDeprecation("DEPRECATED: layername= is deprecated. Please use layer=");
}
}
node->layername = layerval.isUndefined() ? "" : layerval.toString();

View File

@ -74,7 +74,7 @@ AbstractNode *LinearExtrudeModule::instantiate(const Context *ctx, const ModuleI
Value slices = c.lookup_variable("slices", true);
if (!file.isUndefined() && file.type() == Value::STRING) {
PRINT("DEPRECATED: Support for reading files in linear_extrude will be removed in future releases. Use a child import() instead.");
printDeprecation("DEPRECATED: Support for reading files in linear_extrude will be removed in future releases. Use a child import() instead.");
node->filename = lookup_file(file.toString(), inst->path(), c.documentPath());
}

View File

@ -387,7 +387,7 @@ MainWindow::MainWindow(const QString &filename)
connect(Preferences::inst(), SIGNAL(openCSGSettingsChanged()),
this, SLOT(openCSGSettingsChanged()));
connect(Preferences::inst(), SIGNAL(syntaxHighlightChanged(const QString&)),
this, SLOT(setSyntaxHighlight(const QString&)));
editor, SLOT(setHighlightScheme(const QString&)));
Preferences::inst()->apply();
connect(this->findTypeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(selectFindType(int)));
@ -1313,6 +1313,7 @@ bool MainWindow::fileChangedOnDisk()
void MainWindow::compileTopLevelDocument()
{
updateTemporalVariables();
resetPrintedDeprecations();
this->last_compiled_doc = editor->toPlainText();
std::string fulltext =
@ -2100,12 +2101,6 @@ void MainWindow::setFont(const QString &family, uint size)
editor->setFont(font);
}
void MainWindow::setSyntaxHighlight(const QString &s)
{
this->highlighter->assignFormatsToTokens( s );
this->highlighter->rehighlight(); // slow on large files
}
void MainWindow::quit()
{
QCloseEvent ev;

View File

@ -115,7 +115,7 @@ const AbstractModule *ModuleContext::findLocalModule(const std::string &name) co
}
std::string replacement = Builtins::instance()->isDeprecated(name);
if (!replacement.empty()) {
PRINTB("DEPRECATED: The %s() module will be removed in future releases. Use %s() instead.", name % replacement);
PRINT_DEPRECATION("DEPRECATED: The %s() module will be removed in future releases. Use %s() instead.", name % replacement);
}
return m;
}

View File

@ -114,7 +114,9 @@ static void help(const char *progname)
"%2%[ --imgsize=width,height ] [ --projection=(o)rtho|(p)ersp] \\\n"
"%2%[ --render | --preview[=throwntogether] ] \\\n"
"%2%[ --csglimit=num ] \\\n"
#ifdef ENABLE_EXPERIMENTAL
"%2%[ --enable=<feature> ] \\\n"
#endif
"%2%filename\n",
progname % (const char *)tabstr);
exit(1);
@ -199,6 +201,13 @@ Camera get_camera( po::variables_map vm )
return camera;
}
#ifdef OPENSCAD_TESTING
#undef OPENSCAD_QTGUI
#else
#define OPENSCAD_QTGUI 1
#include <QApplication>
#endif
int cmdline(const char *deps_output_file, const std::string &filename, Camera &camera, const char *output_file, const fs::path &original_path, Render::type renderer, int argc, char ** argv )
{
#ifdef OPENSCAD_QTGUI
@ -438,27 +447,27 @@ int cmdline(const char *deps_output_file, const std::string &filename, Camera &c
return 0;
}
#ifdef OPENSCAD_TESTING
#undef OPENSCAD_QTGUI
#else
#define OPENSCAD_QTGUI 1
#endif
#ifdef OPENSCAD_QTGUI
#include <QtPlugin>
#if defined(__MINGW64__) || defined(__MINGW32__) || defined(_MSCVER)
Q_IMPORT_PLUGIN(qtaccessiblewidgets)
#endif
#include "MainWindow.h"
#ifdef __APPLE__
#include "EventFilter.h"
#endif
#include <QApplication>
#include <QString>
#include <QDir>
// Only if "fileName" is not absolute, prepend the "absoluteBase".
static QString assemblePath(const fs::path& absoluteBase,
static QString assemblePath(const fs::path& absoluteBaseDir,
const string& fileName) {
return fileName.empty() ? "" : QDir(QString::fromStdString((const string&) absoluteBase))
.absoluteFilePath(QString::fromStdString(fileName));
if (fileName.empty()) return "";
QString qsDir = QString::fromLocal8Bit( boosty::stringy( absoluteBaseDir ).c_str() );
QString qsFile = QString::fromLocal8Bit( fileName.c_str() );
// if qsfile is absolute, dir is ignored. (see documentation of QFileInfo)
QFileInfo info( qsDir, qsFile );
return info.absoluteFilePath();
}
bool QtUseGUI()
@ -542,7 +551,7 @@ int gui(vector<string> &inputFiles, const fs::path &original_path, int argc, cha
new MainWindow(assemblePath(original_path, infile));
}
#else
MainWindow *m = new MainWindow(assemblePath(original_path, inputFiles[0]));
new MainWindow(assemblePath(original_path, inputFiles[0]));
#endif
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
int rc = app.exec();
@ -597,7 +606,10 @@ int main(int argc, char **argv)
("d,d", po::value<string>(), "deps-file")
("m,m", po::value<string>(), "makefile")
("D,D", po::value<vector<string> >(), "var=val")
("enable", po::value<vector<string> >(), "enable experimental features");
#ifdef ENABLE_EXPERIMENTAL
("enable", po::value<vector<string> >(), "enable experimental features")
#endif
;
po::options_description hidden("Hidden options");
hidden.add_options()
@ -639,12 +651,12 @@ int main(int argc, char **argv)
output_file = vm["o"].as<string>().c_str();
}
if (vm.count("s")) {
PRINT("DEPRECATED: The -s option is deprecated. Use -o instead.\n");
printDeprecation("DEPRECATED: The -s option is deprecated. Use -o instead.\n");
if (output_file) help(argv[0]);
output_file = vm["s"].as<string>().c_str();
}
if (vm.count("x")) {
PRINT("DEPRECATED: The -x option is deprecated. Use -o instead.\n");
printDeprecation("DEPRECATED: The -x option is deprecated. Use -o instead.\n");
if (output_file) help(argv[0]);
output_file = vm["x"].as<string>().c_str();
}
@ -665,11 +677,13 @@ int main(int argc, char **argv)
commandline_commands += ";\n";
}
}
#ifdef ENABLE_EXPERIMENTAL
if (vm.count("enable")) {
BOOST_FOREACH(const string &feature, vm["enable"].as<vector<string> >()) {
Feature::enable_feature(feature);
}
}
#endif
vector<string> inputFiles;
if (vm.count("input-file")) {
inputFiles = vm["input-file"].as<vector<string> >();

View File

@ -245,7 +245,7 @@ AbstractNode *PrimitiveModule::instantiate(const Context *ctx, const ModuleInsta
// backwards compatable
node->faces = c.lookup_variable("triangles");
if (node->faces.type() != Value::UNDEFINED) {
PRINT("DEPRECATED: polyhedron(triangles=[]) will be removed in future releases. Use polyhedron(faces=[]) instead.");
printDeprecation("DEPRECATED: polyhedron(triangles=[]) will be removed in future releases. Use polyhedron(faces=[]) instead.");
}
}
}

View File

@ -69,3 +69,20 @@ std::string two_digit_exp_format( double x )
s << x;
return two_digit_exp_format( s.str() );
}
#include <set>
std::set<std::string> printedDeprecations;
void printDeprecation(const std::string &str)
{
if (printedDeprecations.find(str) == printedDeprecations.end()) {
PRINT(str);
printedDeprecations.insert(str);
}
}
void resetPrintedDeprecations()
{
printedDeprecations.clear();
}

View File

@ -15,6 +15,10 @@ void set_output_handler(OutputHandlerFunc *newhandler, void *userdata);
extern std::list<std::string> print_messages_stack;
void print_messages_push();
void print_messages_pop();
void printDeprecation(const std::string &str);
void resetPrintedDeprecations();
#define PRINT_DEPRECATION(_fmt, _arg) do { printDeprecation(str(boost::format(_fmt) % _arg)); } while (0)
void PRINT(const std::string &msg);
#define PRINTB(_fmt, _arg) do { PRINT(str(boost::format(_fmt) % _arg)); } while (0)
@ -49,5 +53,4 @@ public:
}
};
#endif

View File

@ -69,7 +69,7 @@ AbstractNode *RotateExtrudeModule::instantiate(const Context *ctx, const ModuleI
Value scale = c.lookup_variable("scale", true);
if (!file.isUndefined()) {
PRINT("DEPRECATED: Support for reading files in rotate_extrude will be removed in future releases. Use a child import() instead.");
printDeprecation("DEPRECATED: Support for reading files in rotate_extrude will be removed in future releases. Use a child import() instead.");
node->filename = lookup_file(file.toString(), inst->path(), c.documentPath());
}

View File

@ -641,7 +641,7 @@ Value Value::operator[](const Value &v)
void Value::RangeType::normalize() {
if ((step_val>0) && (end_val < begin_val)) {
std::swap(begin_val,end_val);
PRINT("DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.");
printDeprecation("DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.");
}
}

View File

@ -477,7 +477,7 @@ if (DEFINED OPENSCAD_DAY)
add_definitions(-DOPENSCAD_DAY=${OPENSCAD_DAY})
endif()
add_definitions(-DOPENSCAD_TESTING)
add_definitions(-DOPENSCAD_TESTING -DENABLE_EXPERIMENTAL)
# Search for MCAD in correct place
set(CTEST_ENVIRONMENT "${CTEST_ENVIRONMENT};OPENSCADPATH=${CMAKE_CURRENT_SOURCE_DIR}/../libraries")

View File

@ -1,5 +1,4 @@
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
WARNING: Bad range parameter in for statement: too many elements (4294967295).
ECHO: nan
ECHO: inf
@ -12,9 +11,7 @@ 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).
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
WARNING: Bad range parameter in for statement: too many elements (4294967295).
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
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

@ -22,7 +22,6 @@ ECHO: "[a05] ", -2
ECHO: "[a05] ", -1
ECHO: "[a05] ", 0
ECHO: "[a06] ----- [0:-3]"
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
ECHO: "[a06] ", -3
ECHO: "[a06] ", -2
ECHO: "[a06] ", -1
@ -34,7 +33,6 @@ ECHO: "[a07] ", 0
ECHO: "[a07] ", 1
ECHO: "[a07] ", 2
ECHO: "[a08] ----- [2:-2]"
DEPRECATED: Using ranges of the form [begin:end] with begin value greater than the end value is deprecated.
ECHO: "[a08] ", -2
ECHO: "[a08] ", -1
ECHO: "[a08] ", 0

View File

@ -36,9 +36,11 @@ import subprocess
import time
import platform
try:
from urllib.error import URLError
from urllib.request import urlopen
from urllib.parse import urlencode
except:
from urllib2 import URLError
from urllib2 import urlopen
from urllib import urlencode
@ -386,7 +388,8 @@ def upload_html(page_url, title, html):
}
try:
response = urlopen(page_url, data=postify(data))
except:
except URLError, e:
print 'Upload error: ' + str(e)
return False
return 'success' in response.read().decode()