Commit 5223de46 authored by sumpfralle's avatar sumpfralle

merged r1088-r1093


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1096 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 249f874a
Version 0.5.1 - UNRELEASED
Version 0.5.1 - 2011-06-13
* added extrusion for 2D models
* 2D projection of multi-layered 2D models
* significantly improved performance of 3D visualization
* fixed "help" links for Windows users
* added GTK theme with a native look&feel for Windows
* improved detection of library locations for Windows package
* added file type associations (mime) to the debian package
* minor bugs fixed
Version 0.5 - 2011-03-28
......
......@@ -8,7 +8,7 @@ include release_info.txt
include pycam
recursive-include desktop *
recursive-include man *
recursive-include src *
recursive-include src *.py
recursive-include share *
recursive-include samples *
recursive-include Tests *
pycam (0.4-2) unstable; urgency=low
pycam (0.5.1-1) unstable; urgency=low
* Improved the packaging based on suggestions by Benoît Knecht:
* Changed the copyright file to the format specified by DEP5
* Removed postinst and prerm placeholders
* Added descriptions to the patches
* Added a watch file
* initial debian package
* Closes: #600779
-- Lars Kruse <devel@sumpfralle.de> Sun, 14 Nov 2010 15:46:01 +0100
-- Lars Kruse <devel@sumpfralle.de> Mon, 13 Jun 2011 02:04:59 +0200
pycam (0.4-1) unstable; urgency=low
* new upstream release
-- Lars Kruse <devel@sumpfralle.de> Tue, 19 Oct 2010 12:11:27 +0200
pycam (0.3-1) unstable; urgency=low
* new upstream release
* Switch to dpkg-source 3.0 (quilt) format
* Updated policy to 3.9.1 (no changes)
-- Lars Kruse <devel@sumpfralle.de> Mon, 16 Aug 2010 15:57:45 +0200
pycam (0.2.3-1) unstable; urgency=low
* new upstream release
-- Lars Kruse <devel@sumpfralle.de> Mon, 05 Apr 2010 02:48:36 +0200
pycam (0.2.2-1) unstable; urgency=low
* Initial debianization of r243 of the SVN repo on sourceforge
-- Sebastian Kuzminsky <seb@highlab.com> Tue, 16 Mar 2010 22:14:56 -0600
......@@ -4,7 +4,7 @@ Priority: extra
Maintainer: Lars Kruse <devel@sumpfralle.de>
Build-Depends: python, debhelper (>= 7), cdbs, patchutils
Build-Depends-Indep: python-support, help2man
Standards-Version: 3.9.1
Standards-Version: 3.9.2
Homepage: http://sourceforge.net/projects/pycam/
Package: pycam
......@@ -12,18 +12,20 @@ Architecture: all
Depends: python-gtk2, python-opengl (>>3.0.0~b6-3), python-gtkglext1,
${misc:Depends}, ${python:Depends}
Recommends: python-pyode (>>1.2.0-3), python-psyco, python-setproctitle
Description: CAM program & library written in Python
This is a set of Python modules for toolpath generation for 3-Axis
CNC machining, and a GUI program that uses them.
Suggests: inkscape, pstoedit, qcad-data
Description: CAM program & Python library for generating toolpaths
PyCAM is a toolpath generator for 3 axis machines. The generated
GCode can be used with EMC2 and other machine controllers.
The included Python library can be used independently from the GUI.
.
Features:
* read and write STL model files
* limited support for 2D models (SVG or DXF)
* generate and export toolpaths (gcode) for various strategies and
drill definitions
* manage processing templates (e.g. rough, semi-finish and finish
operations)
* read and write STL model files (3D)
* support for 2D models (DXF/SVG/PS)
* generate toolpaths (GCode) for various strategies and drill
definitions
* manage and store processing templates
* scale, move, rotate, flip and transform the model
* interactive 3D model view
* interactive 3D model view based on OpenGL
* non-interactive generation of GCode via commandline
* render single-line fonts (provided by QCAD)
......@@ -4,12 +4,12 @@ Maintainer: Lars Kruse <devel@sumpfralle.de>
Source: http://pycam.sourceforge.net
Files: *
Copyright: 2010, Lars Kruse <devel@sumpfralle.de>
Copyright: 2010-2011, Lars Kruse <devel@sumpfralle.de>
2006-2010, Lode Leroy
License: GPL-3+
Files: debian/*
Copyright: 2010, Lars Kruse <devel@sumpfralle.de>
Copyright: 2010-2011, Lars Kruse <devel@sumpfralle.de>
2010, Sebastian Kuzminsky <seb@highlab.com>
License: GPL-3+
......
usr/share/applications
usr/share/icons/hicolor/scalable/apps
Changelog
technical_details.txt
README.TXT
Description: Remove windows-only file from the Debian package
The respective file is a helper script for packaging the windows installer
of PyCAM.
Forwarded: not-needed
Author: Lars Kruse <devel@sumpfralle.de>
diff -Nur -x '*.orig' -x '*~' pycam-0.2.2//setup.py pycam-0.2.2.new//setup.py
--- pycam-0.2.2//setup.py 2010-03-20 12:57:16.000000000 +0100
+++ pycam-0.2.2.new//setup.py 2010-03-20 13:07:53.026518970 +0100
@@ -76,7 +76,7 @@
"pycam.Toolpath",
"pycam.Physics",
],
- scripts = ['pycam', 'pycam_win32_postinstall.py'],
+ scripts = ['pycam'],
data_files=[("share/pycam/doc", [
"COPYING.TXT",
"technical_details.txt",
Subject: Remove documentation files that are not useful for the package.
Forwarded: not-needed
Author: Lars Kruse <devel@sumpfralle.de>
diff --git a/setup.py b/setup.py
index 3046304..9f66f6d 100755
--- a/setup.py
+++ b/setup.py
@@ -78,13 +78,9 @@ setup(
],
scripts = ['pycam'],
data_files=[("share/pycam/doc", [
- "COPYING.TXT",
"technical_details.txt",
- "INSTALL.TXT",
- "LICENSE.TXT",
"README.TXT",
- "Changelog",
- "release_info.txt"]),
+ "Changelog"]),
("share/pycam/ui", [
os.path.join("share", "ui", "pycam-project.ui"),
os.path.join("share", "ui", "menubar.xml"),
00.remove_windows_install_script.patch
01.remove-superfluous-files-from-doc.patch
../share/mime/pycam.mime
\ No newline at end of file
../share/mime/pycam.xml
\ No newline at end of file
......@@ -27,6 +27,14 @@ build/pycam::
# install the .desktop file
install/pycam::
cp -v desktop/pycam.desktop `pwd`/debian/pycam/usr/share/applications/
# "desktop" file
cp -v share/desktop/pycam.desktop `pwd`/debian/pycam/usr/share/applications/
# application logo for the menu entry
cp -v share/ui/logo_scalable.svg `pwd`/debian/pycam/usr/share/icons/hicolor/scalable/apps/pycam.svg
# remove "doc" directory from /usr/share/pycam/
rm -rf `pwd`/debian/pycam/usr/share/pycam/doc
# the CXF fonts are distributed by QCAD - use them instead of the embedded ones
rm -rf `pwd`/debian/pycam/usr/share/pycam/fonts
# the gtkrc file for Windows is useless
rm `pwd`/debian/pycam/usr/share/pycam/ui/gtkrc_windows
......@@ -95,6 +95,7 @@ log = pycam.Utils.log.get_logger()
EXAMPLE_MODEL_LOCATIONS = [
os.path.join(BASE_DIR, "samples"),
os.path.join(sys.prefix, "share", "pycam", "samples"),
os.path.join(sys.prefix, "local", "share", "pycam", "samples"),
os.path.join("usr", "share", "pycam", "samples")]
# for pyinstaller (windows distribution)
if "_MEIPASS2" in os.environ:
......
......@@ -9,6 +9,7 @@ from pycam.Utils import get_platform, PLATFORM_LINUX, PLATFORM_WINDOWS, PLATFORM
from pycam import VERSION
USE_DEBUG=False
UI_DATA_RELATIVE = os.path.join("share", "ui")
UI_DATA_DIR = os.path.join(BASE_DIR, UI_DATA_RELATIVE)
ORIGINAL_STARTUP_SCRIPT = os.path.join(BASE_DIR, "pycam")
......@@ -23,11 +24,8 @@ if rename_startup_script:
else:
STARTUP_SCRIPT = ORIGINAL_STARTUP_SCRIPT
data = [(os.path.join(UI_DATA_RELATIVE, "pycam-project.ui"), os.path.join(UI_DATA_DIR, "pycam-project.ui"), "DATA"),
(os.path.join(UI_DATA_RELATIVE, "menubar.xml"), os.path.join(UI_DATA_DIR, "menubar.xml"), "DATA"),
(os.path.join(UI_DATA_RELATIVE, "logo_gui.png"), os.path.join(UI_DATA_DIR, "logo_gui.png"), "DATA"),
(os.path.join(UI_DATA_RELATIVE, "gtkrc_windows"), os.path.join(UI_DATA_DIR, "gtkrc_windows"), "DATA"),
]
data = []
data.extend(Tree(UI_DATA_DIR, prefix=UI_DATA_RELATIVE))
# sample models
data.extend(Tree(os.path.join(BASE_DIR, "samples"), prefix="samples"))
......@@ -183,10 +181,10 @@ exe = EXE(pyz,
exclude_binaries=False,
name=output_name,
icon=icon_file,
debug=True,
debug=USE_DEBUG,
strip=False,
upx=False,
console=True,
upx=True,
console=USE_DEBUG,
)
......
......@@ -2,6 +2,9 @@
install_script = pycam_win32_postinstall.py
bitmap = share/ui/logo_gui_vertical.bmp
[bdist_msi]
install_script = pycam_win32_postinstall.py
[bdist_rpm]
packager = Lars Kruse <devel@sumpfralle.de>
doc_files = Changelog
......
......@@ -37,7 +37,7 @@ WINDOWS_START_SCRIPT = "pycam-loader.py"
DEFAULT_START_SCRIPT = "pycam"
# we don't want to include the windows postinstall script in other installers
is_windows_installer = "bdist_wininst" in sys.argv
is_windows_installer = "bdist_wininst" in sys.argv or "bdist_msi" in sys.argv
if is_windows_installer:
shutil.copy2(os.path.join(BASE_DIR, DEFAULT_START_SCRIPT),
......
......@@ -2,8 +2,12 @@
Version=1.0
Name=PyCAM
GenericName=Toolpath Generator
Comment=Toolpath Generation for 3-Axis CNC machining
Exec=pycam
Comment=generate GCode for 3-Axis CNC machining
Exec=pycam %u
TryExec=pycam
Terminal=false
Type=Application
Categories=Development;Engineering;Robotics;
Categories=Development;Engineering;Robotics;Education;Science;2DGraphics;VectorGraphics;3DGraphics
MimeType=application/sla;image/svg+xml;application/postscript;image/vnd.dxf
Icon=pycam
application/sla; pycam '%s'; description="Stereo Lithographic File"; test=test -n "$DISPLAY"; nametemplate=%s.stl
image/vnd.dxf; pycam '%s'; description="Drawing Interchange File"; test=test -n "$DISPLAY"; nametemplate=%s.dxf
image/svg+xml; pycam '%s'; description="Vector Graphics"; test=test -n "$DISPLAY" && which inkscape && which pstoedit; nametemplate=%s.svg
application/postscript; pycam '%s'; description="Postscript"; test=test -n "$DISPLAY" && which pstoedit
......@@ -7,5 +7,12 @@
</magic>
<glob pattern="*.stl"/>
</mime-type>
<mime-type type="image/vnd.dxf">
<comment>Drawing Interchange Files (2D or 3D models)</comment>
<magic priority="50">
<match type="string" offset="0:20" value="SECTION"/>
</magic>
<glob pattern="*.dxf"/>
</mime-type>
</mime-info>
This diff is collapsed.
......@@ -59,7 +59,7 @@ def _get_num_converter(step_width):
""" Return a float-to-decimal conversion function with a prevision suitable
for the given step width.
"""
digits=_get_num_of_significant_digits(step_width)
digits = _get_num_of_significant_digits(step_width)
format_string = "%%.%df" % digits
return lambda number: decimal.Decimal(format_string % number)
......
......@@ -50,12 +50,11 @@ from pycam import VERSION
import pycam.Physics.ode_physics
# this requires ODE - we import it later, if necessary
#import pycam.Simulation.ODEBlocks
import gtk
import gobject
import webbrowser
import ConfigParser
import urllib
import urlparse
import string
import StringIO
import pickle
......@@ -69,10 +68,9 @@ import re
import os
import sys
GTKBUILD_FILE = "pycam-project.ui"
GTKMENU_FILE = "menubar.xml"
GTKRC_FILE_WINDOWS = os.path.join(UI_SUBDIR, "gtkrc_windows")
GTKRC_FILE_WINDOWS = "gtkrc_windows"
WINDOW_ICON_FILENAMES = ["logo_%dpx.png" % pixels for pixels in (16, 32, 48, 64, 128)]
......@@ -347,7 +345,7 @@ class ProjectGui(object):
gtk.main_quit()
self.gui.add_from_file(gtk_build_file)
if pycam.Utils.get_platform() == pycam.Utils.PLATFORM_WINDOWS:
gtkrc_file = get_data_file_location(GTKRC_FILE_WINDOWS)
gtkrc_file = get_ui_file_location(GTKRC_FILE_WINDOWS)
if gtkrc_file:
print "GTKRC: %s" % str(gtkrc_file)
gtk.rc_add_default_file(gtkrc_file)
......
......@@ -73,10 +73,27 @@ def convert_eps2dxf(eps_filename, dxf_filename, location=None, unit="mm"):
return False
returncode = process.wait()
if returncode == 0:
try:
# pstoedit fails with exitcode=0 if ghostscript is not installed.
# The resulting file seems to be quite small (268 byte). But it is
# not certain, that this filesize is fixed in case of this problem.
if os.path.getsize(dxf_filename) < 280:
log.warn(("SVGImporter: maybe there was a problem with " + \
"the conversion from EPS (%s) to DXF.\nProbably " + \
"you need to install 'ghostscript' " + \
"(http://pages.cs.wisc.edu/~ghost).") % \
str(eps_filename))
return True
except OSError:
# The dxf file was not created.
log.warn("SVGImporter: no DXF file was created, even though " + \
"no error code was returned. This seems to be a bug " + \
"of 'pstoedit'. Please send the original model file " + \
"to the PyCAM developers. Thanks!")
return False
elif returncode == -11:
log.warn(("SVGImporter: maybe there was a problem with the " + \
"conversion from EPS (%s) to DXF\n Users of Ubuntu 'lucid' " + \
"conversion from EPS (%s) to DXF.\n Users of Ubuntu 'lucid' " + \
"should install the package 'libpstoedit0c2a' from the " + \
"'maverick' repository to avoid this warning.") % \
str(eps_filename))
......
......@@ -23,6 +23,8 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
import os
import sys
import pycam.Utils.log
DATA_DIR_ENVIRON_KEY = "PYCAM_DATA_DIR"
FONT_DIR_ENVIRON_KEY = "PYCAM_FONT_DIR"
......@@ -44,7 +46,10 @@ if FONT_DIR_ENVIRON_KEY in os.environ:
FONT_DIR_OVERRIDE = os.path.normpath(os.environ[FONT_DIR_ENVIRON_KEY])
else:
FONT_DIR_OVERRIDE = None
FONT_DIR_FALLBACK = "/usr/share/qcad/fonts"
FONT_DIRS_FALLBACK = ["/usr/share/librecad/fonts", "/usr/share/qcad/fonts"]
log = pycam.Utils.log.get_logger()
def get_ui_file_location(filename, silent=False):
......@@ -78,11 +83,13 @@ def get_font_dir():
else:
log.warn(("Failed to locate the fonts directory '%s' below '%s'. " \
+ "Falling back to '%s'.") \
% (FONTS_SUBDIR, DATA_BASE_DIRS, FONT_DIR_FALLBACK))
if os.path.isdir(FONT_DIR_FALLBACK):
return FONT_DIR_FALLBACK
% (FONTS_SUBDIR, DATA_BASE_DIRS, ":".join(FONT_DIRS_FALLBACK)))
for font_dir_fallback in FONT_DIRS_FALLBACK:
if os.path.isdir(font_dir_fallback):
return font_dir_fallback
else:
log.warn(("The fallback font directory (%s) does not exist. " \
+ "No fonts will be available.") % FONT_DIR_FALLBACK)
log.warn(("None of the fallback font directories (%s) exist. " + \
"No fonts will be available.") % \
":".join(FONT_DIRS_FALLBACK))
return None
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