diff options
-rw-r--r-- | RELEASE_NOTES | 2 | ||||
-rw-r--r-- | doc/TODO.txt | 65 | ||||
-rwxr-xr-x | scripts/googlecode_upload.py | 248 | ||||
-rwxr-xr-x | scripts/publish-macosx.sh | 9 | ||||
-rwxr-xr-x | scripts/release-common.sh | 14 | ||||
-rw-r--r-- | scripts/release-win32.sh | 96 | ||||
-rw-r--r-- | src/mainwin.cc | 6 | ||||
-rw-r--r-- | testdata/scad/bugs/minkowski-assert.scad | 12 | ||||
-rw-r--r-- | version.pri | 4 |
9 files changed, 67 insertions, 389 deletions
diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 8602943..f0fe1c4 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -4,7 +4,7 @@ OpenSCAD 2012.XX 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 OpenCSGcan now be adjusted from Preferences +o The limit for when to disable OpenCSG can now be adjusted from Preferences Bugfixes: o use'ing an non-existing file sometimes crashed under Windows diff --git a/doc/TODO.txt b/doc/TODO.txt index d523d1c..e7e0105 100644 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -123,14 +123,24 @@ o When specifying a transparency with the color() statement, o Bug: Using the background operator (%) on the only object in a scene triggers a CSG error: No top level object found -ENGINE ------- +CGAL-related +------------ +o Hollow donut problem + When extruding a 2D CSG tree (e.g. a polygon with a hole), the hole + information is lost when performing the extrusion. For linear + extrusions, this has only a minor visual impact, but for rotate + extrusion, the resulting CGAL models will lose the hole. The OpenCSG + rendering keeps the hole, but renders slightly incorrect. +o CGAL issues + - CGAL doesn't handle almost planar polygons. Consider splitting into triangles ourselves. See WillamAdams/dodec.scad + +LANGUAGE && BUILTINS +-------------------- o Primitives - Springs, spirals (requested by Cathal Garvey) - (TTF) Text - Image-based height field like http://www.thingiverse.com/thing:2078 - mesh (coordinates and indices) - - polygon(): Allow omitting the paths parameter to create a single polygon from a list of vertices. o 2D Subsystem - Performance: Is it necessary to union children before extrusion when compiling? Can this be postponed to CGAL evaluation time? @@ -141,7 +151,6 @@ o Built-in modules o Advanced Transformations - Add statement for refinement via surface subdivision - Add statement for intersections in cartesian product of childs - - non-convex minkowski example from chrysn fails with an exception (testdata/scad/bugs/minkowski-assert.scad) o Function-Module-Interface - Pass a module instanciation to a function (e.g. for a volume() function) - Pass a function to a module instanciation (e.g. for dynamic extrusion paths) @@ -150,17 +159,6 @@ o Language Frontend - Rethink for vs. intersection_for vs. group. Should for loops generate child lists instead, and make these passable to other modules or accessible by child()? -o DXF Import/Export - - Use dxflib from RibbonSoft for import/export? -> investigate - - Import - - Support for POLYLINE entity - - Support for SPLINE entity - - Support for LEADER entity - - Support for MTEXT entity ? - - idea: DXF inline - convert from dxf to OpenSCAD syntax -> parametrize dxf content -o Mesh optimization on STL export - - Remove super small triangles (all sides are short) - - Replace super thin triangles (one h is short) o Misc - center as default: Very often, center=true is used everywhere. Make a global variable ($center?) control this to beautify code @@ -177,14 +175,22 @@ o Grammar/Parser - linear_extrude()/rotate_extrude(): Cumbersome names? -> (extrude, revolve, lathe, sweep ?) - If a compile error occurs in an included file, line numbers are global and doesn't say in which file the error occurred. -o Hollow donut problem - When extruding a 2D CSG tree (e.g. a polygon with a hole), the hole - information is lost when performing the extrusion. For linear - extrusions, this has only a minor visual impact, but for rotate - extrusion, the resulting CGAL models will lose the hole. The OpenCSG - rendering keeps the hole, but renders slightly incorrect. -o CGAL issues - - CGAL doesn't handle almost planar polygons. Consider splitting into triangles ourselves. See WillamAdams/dodec.scad + +INFRASTRUCTURE +-------------- +o DXF Import/Export + - Use dxflib from RibbonSoft for import/export? -> investigate + - Import + - Support for POLYLINE entity + - Support for SPLINE entity + - Support for LEADER entity + - Support for MTEXT entity ? + - idea: DXF inline - convert from dxf to OpenSCAD syntax -> parametrize dxf content +o Mesh optimization on STL export + - Remove super small triangles (all sides are short) + - Replace super thin triangles (one h is short) +o Use a logging framework to get debugging/info output more under control? + (check log4j, google project) IDEAS FOR LANGUAGE CHANGES @@ -202,26 +208,15 @@ o Refactor from MainWindow: - CSG data structure (compiled model) - CGAL data structure (compiled model) o C++-ify - - Use smart pointers where it makes sense (e.g. instead of homegrown refcount, - and to get memory ownership under control) - Use static_cast/dynamic_cast instead of C-style casts o dxflinextrude and dxfrotextrude could share code o Consider decoupling DXF-specific functionality from the 2D subsystem o Visitation refactoring - Make AbstractNode members private/protected? -o Consider evaluating all referenced files relative to the document path instead - of being absolute. This would e.g. make regression testing of dumpcaching easier. - This would require us to pass a document contect to all traversal methods though. BUILD SYSTEM ------------ o Fedora is reported to ship with byacc, which doesn't support bison extensions (e.g. %debuig). Look into this, either be yacc-compatible or force the build system to use bison. -o We currently link in -lboost_thread. Should we always use -lboost_thread-mt under Linux or can we pick this up using qmake? - -INFRASTRUCTURE --------------- -o Use a logging framework to get debugging/info output more under control? - (check log4j, google project) DOCUMENTATION ------------- @@ -251,8 +246,6 @@ o import_off o import_* - open polylines o include: test subdirs under librarydir (e.g. include <MCAD/gears.scad>) -o use: Basically same tests as include. + use restrictions -o include and use: remember filenames with space o variants of module transparent() { %child(); } o define modules o define functions diff --git a/scripts/googlecode_upload.py b/scripts/googlecode_upload.py deleted file mode 100755 index d2d5f97..0000000 --- a/scripts/googlecode_upload.py +++ /dev/null @@ -1,248 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2006, 2007 Google Inc. All Rights Reserved. -# Author: danderson@google.com (David Anderson) -# -# Script for uploading files to a Google Code project. -# -# This is intended to be both a useful script for people who want to -# streamline project uploads and a reference implementation for -# uploading files to Google Code projects. -# -# To upload a file to Google Code, you need to provide a path to the -# file on your local machine, a small summary of what the file is, a -# project name, and a valid account that is a member or owner of that -# project. You can optionally provide a list of labels that apply to -# the file. The file will be uploaded under the same name that it has -# in your local filesystem (that is, the "basename" or last path -# component). Run the script with '--help' to get the exact syntax -# and available options. -# -# Note that the upload script requests that you enter your -# googlecode.com password. This is NOT your Gmail account password! -# This is the password you use on googlecode.com for committing to -# Subversion and uploading files. You can find your password by going -# to http://code.google.com/hosting/settings when logged in with your -# Gmail account. If you have already committed to your project's -# Subversion repository, the script will automatically retrieve your -# credentials from there (unless disabled, see the output of '--help' -# for details). -# -# If you are looking at this script as a reference for implementing -# your own Google Code file uploader, then you should take a look at -# the upload() function, which is the meat of the uploader. You -# basically need to build a multipart/form-data POST request with the -# right fields and send it to https://PROJECT.googlecode.com/files . -# Authenticate the request using HTTP Basic authentication, as is -# shown below. -# -# Licensed under the terms of the Apache Software License 2.0: -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Questions, comments, feature requests and patches are most welcome. -# Please direct all of these to the Google Code users group: -# http://groups.google.com/group/google-code-hosting - -"""Google Code file uploader script. -""" - -__author__ = 'danderson@google.com (David Anderson)' - -import httplib -import os.path -import optparse -import getpass -import base64 -import sys - - -def upload(file, project_name, user_name, password, summary, labels=None): - """Upload a file to a Google Code project's file server. - - Args: - file: The local path to the file. - project_name: The name of your project on Google Code. - user_name: Your Google account name. - password: The googlecode.com password for your account. - Note that this is NOT your global Google Account password! - summary: A small description for the file. - labels: an optional list of label strings with which to tag the file. - - Returns: a tuple: - http_status: 201 if the upload succeeded, something else if an - error occured. - http_reason: The human-readable string associated with http_status - file_url: If the upload succeeded, the URL of the file on Google - Code, None otherwise. - """ - # The login is the user part of user@gmail.com. If the login provided - # is in the full user@domain form, strip it down. - if user_name.endswith('@gmail.com'): - user_name = user_name[:user_name.index('@gmail.com')] - - form_fields = [('summary', summary)] - if labels is not None: - form_fields.extend([('label', l.strip()) for l in labels]) - - content_type, body = encode_upload_request(form_fields, file) - - upload_host = '%s.googlecode.com' % project_name - upload_uri = '/files' - auth_token = base64.b64encode('%s:%s'% (user_name, password)) - headers = { - 'Authorization': 'Basic %s' % auth_token, - 'User-Agent': 'Googlecode.com uploader v0.9.4', - 'Content-Type': content_type, - } - - server = httplib.HTTPSConnection(upload_host) - server.request('POST', upload_uri, body, headers) - resp = server.getresponse() - server.close() - - if resp.status == 201: - location = resp.getheader('Location', None) - else: - location = None - return resp.status, resp.reason, location - - -def encode_upload_request(fields, file_path): - """Encode the given fields and file into a multipart form body. - - fields is a sequence of (name, value) pairs. file is the path of - the file to upload. The file will be uploaded to Google Code with - the same file name. - - Returns: (content_type, body) ready for httplib.HTTP instance - """ - BOUNDARY = '----------Googlecode_boundary_reindeer_flotilla' - CRLF = '\r\n' - - body = [] - - # Add the metadata about the upload first - for key, value in fields: - body.extend( - ['--' + BOUNDARY, - 'Content-Disposition: form-data; name="%s"' % key, - '', - value, - ]) - - # Now add the file itself - file_name = os.path.basename(file_path) - f = open(file_path, 'rb') - file_content = f.read() - f.close() - - body.extend( - ['--' + BOUNDARY, - 'Content-Disposition: form-data; name="filename"; filename="%s"' - % file_name, - # The upload server determines the mime-type, no need to set it. - 'Content-Type: application/octet-stream', - '', - file_content, - ]) - - # Finalize the form body - body.extend(['--' + BOUNDARY + '--', '']) - - return 'multipart/form-data; boundary=%s' % BOUNDARY, CRLF.join(body) - - -def upload_find_auth(file_path, project_name, summary, labels=None, - user_name=None, password=None, tries=3): - """Find credentials and upload a file to a Google Code project's file server. - - file_path, project_name, summary, and labels are passed as-is to upload. - - Args: - file_path: The local path to the file. - project_name: The name of your project on Google Code. - summary: A small description for the file. - labels: an optional list of label strings with which to tag the file. - config_dir: Path to Subversion configuration directory, 'none', or None. - user_name: Your Google account name. - tries: How many attempts to make. - """ - - while tries > 0: - if user_name is None: - # Read username if not specified or loaded from svn config, or on - # subsequent tries. - sys.stdout.write('Please enter your googlecode.com username: ') - sys.stdout.flush() - user_name = sys.stdin.readline().rstrip() - if password is None: - # Read password if not loaded from svn config, or on subsequent tries. - print 'Please enter your googlecode.com password.' - print '** Note that this is NOT your Gmail account password! **' - print 'It is the password you use to access Subversion repositories,' - print 'and can be found here: http://code.google.com/hosting/settings' - password = getpass.getpass() - - status, reason, url = upload(file_path, project_name, user_name, password, - summary, labels) - # Returns 403 Forbidden instead of 401 Unauthorized for bad - # credentials as of 2007-07-17. - if status in [httplib.FORBIDDEN, httplib.UNAUTHORIZED]: - # Rest for another try. - user_name = password = None - tries = tries - 1 - else: - # We're done. - break - - return status, reason, url - - -def main(): - parser = optparse.OptionParser(usage='googlecode-upload.py -s SUMMARY ' - '-p PROJECT [options] FILE') - parser.add_option('-s', '--summary', dest='summary', - help='Short description of the file') - parser.add_option('-p', '--project', dest='project', - help='Google Code project name') - parser.add_option('-u', '--user', dest='user', - help='Your Google Code username') - parser.add_option('-w', '--password', dest='password', - help='Your Google Code password') - parser.add_option('-l', '--labels', dest='labels', - help='An optional list of comma-separated labels to attach ' - 'to the file') - - options, args = parser.parse_args() - - if not options.summary: - parser.error('File summary is missing.') - elif not options.project: - parser.error('Project name is missing.') - elif len(args) < 1: - parser.error('File to upload not provided.') - elif len(args) > 1: - parser.error('Only one file may be specified.') - - file_path = args[0] - - if options.labels: - labels = options.labels.split(',') - else: - labels = None - - status, reason, url = upload_find_auth(file_path, options.project, - options.summary, labels, - options.user, options.password) - if url: - print 'The file was uploaded successfully.' - print 'URL: %s' % url - return 0 - else: - print 'An error occurred. Your file was not uploaded.' - print 'Google Code upload server said: %s (%s)' % (reason, status) - return 1 - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/scripts/publish-macosx.sh b/scripts/publish-macosx.sh index a2451fa..a2ded8a 100755 --- a/scripts/publish-macosx.sh +++ b/scripts/publish-macosx.sh @@ -1,15 +1,20 @@ #!/bin/sh -VERSION=`date "+%Y.%m.%d"` +# Set this if we're doing a release build. Comment it out for development builds #VERSION=2011.12 +if test -z "$VERSION"; then + VERSION=`date "+%Y.%m.%d"` + COMMIT=-c +fi + # Turn off ccache, just for safety PATH=${PATH//\/opt\/local\/libexec\/ccache:} # This is the same location as DEPLOYDIR in macosx-build-dependencies.sh export OPENSCAD_LIBRARIES=$PWD/../libraries/install -`dirname $0`/release-common.sh -v $VERSION +`dirname $0`/release-common.sh -v $VERSION $COMMIT if [[ $? != 0 ]]; then exit 1 fi diff --git a/scripts/release-common.sh b/scripts/release-common.sh index 9f03ee5..296c14a 100755 --- a/scripts/release-common.sh +++ b/scripts/release-common.sh @@ -7,16 +7,19 @@ # The script will create a file called openscad-<versionstring>.zip # in the current directory. # -# Usage: release-common.sh [-v <versionstring>] +# Usage: release-common.sh [-v <versionstring>] [-c] # -v Version string (e.g. -v 2010.01) +# -c Build with commit info # # If no version string is given, todays date will be used (YYYY-MM-DD) # 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. printUsage() { - echo "Usage: $0 -v <versionstring> + echo "Usage: $0 -v <versionstring> -c echo echo " Example: $0 -v 2010.01 } @@ -29,10 +32,11 @@ fi echo "Detected OS: $OS" -while getopts 'v:' c +while getopts 'v:c' c do case $c in v) VERSION=$OPTARG;; + c) OPENSCAD_COMMIT=`git log -1 --pretty=format:"%h"` esac done @@ -66,10 +70,10 @@ esac case $OS in LINXWIN) - i686-pc-mingw32-qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro + i686-pc-mingw32-qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG+=mingw-cross-env CONFIG-=debug openscad.pro ;; *) - qmake VERSION=$VERSION CONFIG+=$CONFIG CONFIG-=debug openscad.pro + qmake VERSION=$VERSION OPENSCAD_COMMIT=$OPENSCAD_COMMIT CONFIG+=$CONFIG CONFIG-=debug openscad.pro ;; esac diff --git a/scripts/release-win32.sh b/scripts/release-win32.sh deleted file mode 100644 index 540eab9..0000000 --- a/scripts/release-win32.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh
-#
-# This script creates a binary release of OpenSCAD for Mac OS X.
-# The script will create a file called openscad-<versionstring>.zip
-# in the current directory.
-#
-# Usage: release-win32.sh [-v <versionstring>]
-# -v Version string (e.g. -v 2010.01)
-#
-# If no version string is given, todays date will be used (YYYY-MM-DD)
-#
-
-#used for windows
-ZIP="/c/Program Files/7-Zip/7z.exe"
-ZIPARGS="a -tzip"
-
-printUsage()
-{
- echo "Usage: $0 -v <versionstring> -t <buildtarget>"
- echo
- echo " Example: $0 -v 2010.01 -t release"
-}
-
-OS=OSX
-if test "`uname -o`" == "Msys"; then
- OS=WIN
-fi
-
-echo "detected OS= $OS"
-
-while getopts 'v:' c
-do
- case $c in
- v) VERSION=$OPTARG;;
- b) TARGET=$OPTARG;;
- esac
-done
-
-if test -z "$VERSION"; then
- VERSION=`date "+%Y.%m.%d"`
-fi
-
-if test -z "$TARGET"; then
- TARGET=release
-fi
-
-echo "Building openscad-$VERSION $CONFIGURATION..."
-
-case $OS in
- OSX)
- CONFIG = mdi;;
- WIN)
- unset CONFIG
- export QTDIR=/c/devmingw/qt2009.03
- export QTMAKESPEC=win32-g++
- export PATH=$PATH:/c/devmingw/qt2009.03/bin:/c/devmingw/qt2009.03/qt/bin
- ;;
-esac
-
-qmake VERSION=$VERSION CONFIG+=$CONFIG
-make clean
-if test $OS == WIN; then
- #if the following files are missing their tried removal stops the build process on msys
- touch -t 200012121010 parser_yacc.h parser_yacc.cpp lexer_lex.cpp
-fi
-
-make -j2 $TARGET
-
-echo "Preparing executable..."
-
-echo "Creating directory structure..."
-rm -rf openscad-$VERSION
-rm -f openscad-$VERSION.zip
-mkdir -p openscad-$VERSION/examples
-cp examples/* openscad-$VERSION/examples/
-
-case $OS in
- OSX) ;;
- WIN)
- #package
- cp win32deps/* openscad-$VERSION
- cp $TARGET/openscad.exe openscad-$VERSION
- ;;
-esac
-
-echo "Creating directory structure..."
-case $OS in
- OSX) ;;
- WIN)
- "$ZIP" $ZIPARGS openscad-$VERSION.zip openscad-$VERSION
- ;;
-esac
-
-rm -rf openscad-$VERSION
-
-echo "binary created: openscad-$VERSION.zip"
diff --git a/src/mainwin.cc b/src/mainwin.cc index a8507c0..cbfa46a 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -101,7 +101,11 @@ unsigned int GuiLocker::gui_locked = 0; #define QUOTED(x__) QUOTE(x__) static char helptitle[] = - "OpenSCAD " QUOTED(OPENSCAD_VERSION) " (www.openscad.org)\n\n"; + "OpenSCAD " QUOTED(OPENSCAD_VERSION) +#ifdef OPENSCAD_COMMIT + " (git " QUOTED(OPENSCAD_COMMIT) ")" +#endif + "\nhttp://www.openscad.org\n\n"; static char copyrighttext[] = "Copyright (C) 2009-2011 Marius Kintel <marius@kintel.net> and Clifford Wolf <clifford@clifford.at>\n" "\n" diff --git a/testdata/scad/bugs/minkowski-assert.scad b/testdata/scad/bugs/minkowski-assert.scad index 4ae81da..74bce5c 100644 --- a/testdata/scad/bugs/minkowski-assert.scad +++ b/testdata/scad/bugs/minkowski-assert.scad @@ -1,3 +1,15 @@ +/* + Originally reported by chrysn 20100516: + + terminate called after throwing an instance of 'CGAL::Assertion_exception' + what(): CGAL ERROR: assertion violation! + Expr: N.is_valid(0,0) + File: /usr/include/CGAL/convex_decomposition_3.h + Line: 113 + + This appears to have been a CGAL issue and it appears to work correctly in OpenSCAD-2011.12 with CGAL-3.9 +*/ + minkowski() { cube(20, center=true); rotate([20, 30, 40]) diff --git a/version.pri b/version.pri index 6b91ecd..e490d7d 100644 --- a/version.pri +++ b/version.pri @@ -66,3 +66,7 @@ VERSION_DAY=$${VERSION_DAY}.0 DEFINES += OPENSCAD_VERSION=$$VERSION OPENSCAD_YEAR=$$VERSION_YEAR OPENSCAD_MONTH=$$VERSION_MONTH !isEmpty(VERSION_DAY): DEFINES += OPENSCAD_DAY=$$VERSION_DAY + +!isEmpty(OPENSCAD_COMMIT) { + DEFINES += OPENSCAD_COMMIT=$$OPENSCAD_COMMIT +} |