Commit 8a7037e6 authored by sumpfralle's avatar sumpfralle

fixed projection (was done multiple times before)


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1065 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 5c7af0cf
...@@ -71,12 +71,14 @@ class ModelProjection(pycam.Plugins.PluginBase): ...@@ -71,12 +71,14 @@ class ModelProjection(pycam.Plugins.PluginBase):
("ProjectionModelBottom", model.minz), ("ProjectionModelBottom", model.minz),
("ProjectionModelCustom", ("ProjectionModelCustom",
self.gui.get_object("ProjectionZLevel").get_value())): self.gui.get_object("ProjectionZLevel").get_value())):
plane = Plane(Point(0, 0, z_level), Vector(0, 0, 1)) if self.gui.get_object(objname).get_active():
log.info("Projecting 3D model at level z=%g" % plane.p.z) plane = Plane(Point(0, 0, z_level), Vector(0, 0, 1))
projection = model.get_waterline_contour(plane) log.info("Projecting 3D model at level z=%g" % plane.p.z)
if projection: projection = model.get_waterline_contour(plane)
self.core.get("load_model")(projection) if projection:
else: self.core.get("load_model")(projection)
log.warn("The 2D projection at z=%g is empty. Aborted." % \ else:
plane.p.z) log.warn("The 2D projection at z=%g is empty. Aborted." % \
plane.p.z)
break
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