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>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="55.810001"
height="55.810001"
id="svg3630"
version="1.1"
inkscape:version="0.48.1 r9760"
sodipodi:docname="logo_scalable.svg">
<defs
id="defs3632">
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3700-4"
id="radialGradient3467"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.4153198,0,0,0.25101027,10.861852,647.26637)"
cx="135.66414"
cy="493.29932"
fx="135.66414"
fy="493.29932"
r="52.733212" />
<linearGradient
id="linearGradient3700-4">
<stop
id="stop3702-1"
offset="0"
style="stop-color:#ff0707;stop-opacity:1;" />
<stop
id="stop3704-9"
offset="1"
style="stop-color:#b80000;stop-opacity:1;" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3688-9"
id="radialGradient3464"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.37035716,0,0,0.22162846,16.858853,663.09704)"
cx="135.66414"
cy="493.29932"
fx="135.66414"
fy="493.29932"
r="52.733212" />
<linearGradient
id="linearGradient3688-9">
<stop
style="stop-color:#ca0000;stop-opacity:1;"
offset="0"
id="stop3690-8" />
<stop
style="stop-color:#800000;stop-opacity:1;"
offset="1"
id="stop3692-8" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3756-8"
id="radialGradient3437"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.2513142,-1.8486663,0.25803354,0.3142345,-288.07409,481.85651)"
cx="119.74957"
cy="445.79269"
fx="119.74957"
fy="445.79269"
r="44.738205" />
<linearGradient
id="linearGradient3756-8">
<stop
id="stop3758-4"
offset="0"
style="stop-color:#ffffff;stop-opacity:0;" />
<stop
id="stop3760-3"
offset="1"
style="stop-color:#ffffff;stop-opacity:1;" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3778-7"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.69893161"
id="feGaussianBlur3780-1" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3680-8"
id="linearGradient3439"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-16.339111,-86.804204)"
x1="171.39058"
y1="488.19067"
x2="160.49783"
y2="498.15848" />
<linearGradient
id="linearGradient3680-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3682-0" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop3684-9" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3728-7"
x="-0.10590583"
width="1.2118117"
y="-0.10037731"
height="1.2007546"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="1.924465"
id="feGaussianBlur3730-9" />
</filter>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3680-8"
id="radialGradient3441"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.09858455,-0.2123738,0.15734806,0.07304145,-14.390874,401.5929)"
cx="82.141899"
cy="528.59595"
fx="82.141899"
fy="528.59595"
r="47.72847" />
<linearGradient
id="linearGradient3593">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3595" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop3597" />
</linearGradient>
<filter
inkscape:collect="always"
id="filter3810-3"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.99847373"
id="feGaussianBlur3812-2" />
</filter>
<filter
inkscape:collect="always"
id="filter3726-4"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.43417404"
id="feGaussianBlur3728-3" />
</filter>
<filter
inkscape:collect="always"
id="filter3722-7"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.43417404"
id="feGaussianBlur3724-1" />
</filter>
<filter
inkscape:collect="always"
id="filter3718-2"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.43417404"
id="feGaussianBlur3720-2" />
</filter>
<filter
inkscape:collect="always"
id="filter3714-0"
color-interpolation-filters="sRGB">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="0.43417404"
id="feGaussianBlur3716-2" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="10.300175"
inkscape:cx="30.575218"
inkscape:cy="25.936044"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1440"
inkscape:window-height="825"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata3635">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0.45525569,-996.5615)">
<g
id="g3540"
transform="translate(-40.512048,254.39135)">
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc"
id="path3794-9-1"
d="m 53.897101,761.46985 c 1.336018,0.15803 2.119221,0.48368 2.119221,0.48368"
style="fill:none;stroke:#000000;stroke-width:0.8306728;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc"
id="path3794-6-1"
d="m 47.687672,768.6674 c 0.483419,0.13614 2.036076,0.84717 2.036076,0.84717"
style="fill:none;stroke:#000000;stroke-width:0.8306728;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc"
id="path3794-7"
d="m 44.5659,776.86233 c 0.257817,-0.0295 2.416117,-0.0737 2.416117,-0.0737"
style="fill:none;stroke:#000000;stroke-width:0.8306728;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsc"
id="path3779-0"
d="m 89.792446,780.42606 c -10.364355,5.88358 -36.083736,5.60902 -45.173176,0 0,-12.65075 10.112357,-22.90622 22.586588,-22.90622 12.474226,0 22.586588,10.25547 22.586588,22.90622 z"
style="fill:#ffffff;fill-opacity:1;stroke:none" />
<path
inkscape:connector-curvature="0"
style="fill:url(#radialGradient3467);fill-opacity:1;stroke:none"
d="m 89.003174,780.06259 c -10.002182,5.67799 -34.822818,5.41302 -43.594634,0 0,-12.20868 9.758989,-22.10577 21.797318,-22.10577 12.038325,0 21.797316,9.89709 21.797316,22.10577 z"
id="path3719-4"
sodipodi:nodetypes="ccsc" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsc"
id="path3721-0"
d="m 86.540574,780.34889 c -8.919347,5.01336 -31.052895,4.77941 -38.875066,0 0,-10.77959 8.702474,-19.5182 19.437529,-19.5182 10.735056,0 19.437537,8.73861 19.437537,19.5182 z"
style="opacity:0.34782607;fill:url(#radialGradient3464);fill-opacity:1;stroke:none" />
<path
inkscape:connector-curvature="0"
transform="matrix(0.4153198,0,0,0.4153198,18.675984,601.85282)"
style="fill:url(#radialGradient3437);fill-opacity:1;stroke:none;filter:url(#filter3778-7)"
d="m 153.0056,399.0821 c -31.03804,-17.23532 -58.392613,0.5679 -62.645763,5.87133 -10.81566,13.4865 -12.55956,22.24876 -20.55935,13.93365 -8.63607,-8.97646 16.99268,-42.04435 42.840363,-42.04435 9.01344,0 29.47201,5.69179 40.36475,22.23937 z"
id="path3723-8"
sodipodi:nodetypes="csssc" />
<path
inkscape:connector-curvature="0"
transform="matrix(0.4153198,0,0,0.4153198,18.675984,601.85282)"
sodipodi:nodetypes="ccsc"
id="path3725-5"
d="m 165.9645,422.0224 c -28.02934,9.37607 -16.50157,-10.92709 -37.82497,-28.2221 -7.42687,-13.60345 -10.89284,-20.47293 9.75267,-11.10174 15.7347,7.14213 28.0723,22.25452 28.0723,39.32384 z"
style="fill:url(#linearGradient3439);fill-opacity:1;stroke:none;filter:url(#filter3728-7)" />
<path
inkscape:connector-curvature="0"
transform="matrix(0.4153198,0,0,0.4153198,18.675984,600.43851)"
sodipodi:nodetypes="csssc"
id="path3727-1"
d="m 151.52023,403.53822 c -31.03804,-17.23532 -58.392613,0.5679 -62.645763,5.87133 -10.81567,13.4865 -12.55956,22.24876 -20.55936,13.93365 -8.63606,-8.97646 16.99269,-42.04435 42.840373,-42.04435 9.01344,0 29.47201,5.69179 40.36475,22.23937 z"
style="fill:url(#radialGradient3441);fill-opacity:1;stroke:none;filter:url(#filter3810-3)" />
<g
transform="matrix(0.47143746,0,0,0.47143746,18.465589,499.15085)"
id="g4476-6">
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3726-4)"
d="m 160.59108,598.66407 -5.76426,0 c -30.64112,14.22882 -89.375134,9.43361 -105.486144,-8.34929 0,0 1.235243,-1.20821 4.474955,-1.31256"
id="path2930-6"
sodipodi:nodetypes="cccc" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3722-7)"
d="m 60.694219,571.18656 c -2.881133,-1.09022 -4.608584,0.11777 -4.608584,0.11777 8.776361,16.81142 69.763805,29.52112 96.378035,11.32393 0,0 -0.0304,2.30444 -1.89465,2.84785"
id="path2932-2"
sodipodi:nodetypes="cccc" />
<path
inkscape:connector-curvature="0"
id="path2934-1"
d="m 73.433044,556.12674 c -3.754832,-0.48678 -4.690608,0.44508 -4.690608,0.44508 8.252115,13.92107 59.476344,22.87995 78.645714,12.18322 0,0 -1.55726,3.01129 -2.48635,3.49566"
style="fill:none;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3718-2)"
sodipodi:nodetypes="cccc" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
id="path2936-9"
d="m 130.88415,556.28732 c 2.09703,-0.46198 1.63965,-1.6834 1.63965,-1.6834 -15.15578,2.98627 -36.191694,-2.99659 -40.901029,-8.71884 7.869715,-2.36948 16.109379,-0.80296 16.109379,-0.80296"
style="fill:none;stroke:#ffffff;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3714-0)" />
</g>
<g
transform="matrix(0.47143746,0,0,0.47143746,15.798736,571.8226)"
id="g3953-6">
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
id="path3745-4"
d="m 168.87293,444.51479 -8.38926,0 c -30.64112,14.22882 -89.37513,9.43361 -105.48614,-8.34929 0,0 3.091398,-1.16402 6.33111,-1.26837"
style="fill:none;stroke:#000000;stroke-width:1.76192951;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
id="path3747-8"
d="m 67.721092,417.56761 c -2.881133,-1.09022 -5.978603,-0.41256 -5.978603,-0.41256 8.776361,16.81142 69.763801,29.52112 96.378031,11.32393 0,0 -0.0304,2.30444 -1.89465,2.84785"
style="fill:none;stroke:#000000;stroke-width:1.76192951;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
style="fill:none;stroke:#000000;stroke-width:1.76192951;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 80.946053,402.28682 c -3.754832,-0.48678 -6.546763,0.13572 -6.546763,0.13572 8.252115,13.92107 59.47634,22.87995 78.64571,12.18322 0,0 -1.55726,3.01129 -2.48635,3.49566"
id="path3751-0" />
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:1.76192951;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 136.20077,401.70682 c 0.85959,-0.10843 1.97988,-1.25218 1.97988,-1.25218 -15.15578,2.98627 -36.19169,-2.99659 -40.901025,-8.71884 7.869715,-2.36948 16.109375,-0.80296 16.109375,-0.80296"
id="path3755-8"
sodipodi:nodetypes="cccc" />
</g>
<path
inkscape:connector-curvature="0"
style="fill:none;stroke:#000000;stroke-width:0.8306728;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 79.769596,761.35236 c 0.596382,-0.78307 0.379516,-0.18134 0.379516,-0.18134"
id="path3827-0"
sodipodi:nodetypes="cc" />
</g>
</g>
</svg>
......@@ -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)
......
......@@ -928,15 +928,15 @@ class PolygonGroup(object):
if len(valid_points) < 3:
result = []
elif len(valid_points) == 3:
result = [Triangle(*valid_points)]
result = [Triangle(*valid_points)]
else:
# create a simple star-like fan of triangles - not perfect, but ok
result = []
start = valid_points.pop(0)
while len(valid_points) > 1:
p2, p3 = valid_points[0:2]
result.append(Triangle(start, p2, p3))
valid_points.pop(0)
# create a simple star-like fan of triangles - not perfect, but ok
result = []
start = valid_points.pop(0)
while len(valid_points) > 1:
p2, p3 = valid_points[0:2]
result.append(Triangle(start, p2, p3))
valid_points.pop(0)
return result
def _get_grid_matrix(self, stepping):
......
......@@ -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:
return True
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