Commit 07552ff6 authored by sumpfralle's avatar sumpfralle

merged r1070 and r1071

* new default model
* fixes for support grid generation
* more verbose error message for missing converter programs


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1072 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 3da0e550
......@@ -100,7 +100,7 @@ EXAMPLE_MODEL_LOCATIONS = [
if "_MEIPASS2" in os.environ:
EXAMPLE_MODEL_LOCATIONS.insert(0, os.path.join(os.path.normpath(
os.environ["_MEIPASS2"]), "samples"))
DEFAULT_MODEL_FILE = "pycam.stl"
DEFAULT_MODEL_FILE = "pycam-textbox.stl"
EXIT_CODES = {"ok": 0, "requirements": 1, "load_model_failed": 2,
"write_output_failed": 3, "parsing_failed": 4,
"server_without_password": 5, "connection_error": 6}
......
This diff is collapsed.
// Combine the PyCAM logo with a slightly depressed rounded-cornered box.
module block(a, b, height, radius) {
translate([radius, radius, 0]) union() {
translate([-radius, 0, 0]) cube([a, b - 2 * radius, height]);
translate([0, -radius, 0]) cube([a - 2 * radius, b, height]);
cylinder(r=radius, h=height);
translate([a - 2 * radius, 0, 0]) cylinder(r=radius, h=height);
translate([a - 2 * radius, b - 2 * radius, 0]) cylinder(r=radius, h=height);
translate([0, b - 2 * radius, 0]) cylinder(r=radius, h=height);
}
}
translate([0, 0, -10]) difference() {
block(130, 50, 10, 10);
translate([5, 5, 5]) block(120, 40, 6, 10);
}
translate([15, 17, -5.05]) linear_extrude(file="pycam-text.dxf", height=3);
This diff is collapsed.
......@@ -39,8 +39,9 @@ def convert_svg2eps(svg_filename, eps_filename, location=None):
args = [location, "--export-area-page", "--export-eps",
eps_filename, svg_filename])
except OSError, err_msg:
log.error("SVGImporter: failed to execute 'inkscape' (%s): %s" \
% (location, err_msg))
log.error(("SVGImporter: failed to execute 'inkscape' (%s): %s%s" + \
"Maybe you need to install Inkscape (http://inkscape.org)?") % \
(location, err_msg, os.linesep))
return False
returncode = process.wait()
if returncode == 0:
......@@ -66,8 +67,9 @@ def convert_eps2dxf(eps_filename, dxf_filename, location=None, unit="mm"):
process = subprocess.Popen(stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, args=args)
except OSError, err_msg:
log.error("SVGImporter: failed to execute 'pstoedit' (%s): %s" \
% (location, err_msg))
log.error(("SVGImporter: failed to execute 'pstoedit' (%s): %s%s" + \
"Maybe you need to install pstoedit (http://pstoedit.net)?") % \
(location, err_msg, os.linesep))
return False
returncode = process.wait()
if returncode == 0:
......
......@@ -157,16 +157,18 @@ def get_support_distributed(model, z_plane, average_distance,
or (height == 0):
return
result = Model()
if hasattr(model, "get_polygons"):
polygons = model.get_cropped_model_by_bounds(bounds).get_polygons(
z=z_plane, ignore_below=False)
if not hasattr(model, "get_polygons"):
model = model.get_waterline_contour(
Plane(Point(0, 0, max(model.minz, z_plane)), Vector(0, 0, 1)))
if model:
model = model.get_flat_projection(Plane(Point(0, 0, z_plane),
Vector(0, 0, 1)))
if model:
model = model.get_cropped_model_by_bounds(bounds)
if model:
polygons = model.get_polygons()
else:
waterline_model = model.get_waterline_contour(Plane(Point(0, 0, z_plane),
Vector(0, 0, 1))).get_cropped_model_by_bounds(bounds)
if not waterline_model:
return
else:
polygons = waterline_model.get_polygons()
return None
# minimum required distance between two bridge start points
avoid_distance = 1.5 * (abs(length) + thickness)
if start_at_corners:
......
......@@ -23,5 +23,5 @@ along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
__all__ = ["Cutters", "Exporters", "Geometry", "Gui", "Importers",
"PathGenerators", "PathProcessors", "Utils"]
VERSION = "0.5"
VERSION = "0.5.1"
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