Commit 3a99ef31 authored by sumpfralle's avatar sumpfralle

merged r1055 and r1058 from branches/release-0.5.1


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1059 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent f1b0f4a7
Version 0.6 - UNRELEASED
Version 0.5.1 - UNRELEASED
* added extrusion for 2D models
* 2D projection of multi-layered 2D models
* improved detection of library locations for Windows package
* minor bugs fixed
Version 0.5 - 2011-03-28
* Toolpaths:
......
......@@ -63,6 +63,33 @@ except ImportError:
AuthenticationError = socket.error
# The installer for PyODE does not add the required PATH variable.
if pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS:
os.environ["PATH"] = os.environ.get("PATH", "") + os.path.pathsep + sys.exec_prefix
# The GtkGLExt installer does not add the required PATH variable.
if pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS:
import _winreg
path = None
try:
reg = _winreg.ConnectRegistry(None, _winreg.HKEY_LOCAL_MACHINE)
regkey = _winreg.OpenKey(reg, r"SOFTWARE\GtkGLExt\1.0\Runtime")
except WindowsError:
regkey = None
index = 0
while regkey:
try:
key, value = _winreg.EnumValue(regkey, index)[:2]
except WindowsError:
# no more items left
break
if key == "Path":
path = os.path.join(str(value), "bin")
break
index += 1
if path:
os.environ["PATH"] = os.environ.get("PATH", "") + os.path.pathsep + path
log = pycam.Utils.log.get_logger()
EXAMPLE_MODEL_LOCATIONS = [
......
......@@ -204,7 +204,10 @@ class PolygonSorter(object):
done_polygons.extend(usable_polys)
def get_polygons(self):
return [poly.polygon for poly in self.sorter.get_polygons()]
if not self.sorter:
return []
else:
return [poly.polygon for poly in self.sorter.get_polygons()]
class Polygon(TransformableContainer):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment