Commit a36ef40c authored by Lars Kruse's avatar Lars Kruse

some more Point -> tuple fixes

parent 7d9bd732
......@@ -303,7 +303,7 @@ class Model(BaseModel):
return
contour.append(line)
counter += 1
log.debug("Waterline: %f - %d - %s" % (plane.p.z,
log.debug("Waterline: %f - %d - %s" % (plane.p[2],
len(contour.get_polygons()),
[len(p.get_lines()) for p in contour.get_polygons()]))
return contour
......@@ -992,7 +992,7 @@ class PolygonGroup(object):
direction = psub(point, p)
dist = pnorm(direction)
line_distances.append(dist)
elif cross_product.z == 0:
elif cross_product[2] == 0:
# the point is on the line
line_distances.append(0.0)
# no other line can get closer than this
......
......@@ -79,7 +79,7 @@ def pmul(a, c):
def pdiv(a, c):
c = number(c)
return (a[0] / c, a[0] / c, a[0] / c)
return (a[0] / c, a[1] / c, a[2] / c)
def padd(a, b):
return (a[0] + b[0], a[1] + b[1], a[2] + b[2])
......@@ -107,3 +107,4 @@ def pis_inside(a, minx=None, maxx=None, miny=None, maxy=None, minz=None, maxz=No
and ((maxy is None) or (a[1] <= maxy + epsilon)) \
and ((minz is None) or (minz - epsilon <= a[2])) \
and ((maxz is None) or (a[2] <= maxz + epsilon))
......@@ -67,7 +67,7 @@ class DropCutter(object):
args = []
for one_grid_line in lines:
# simplify the data (useful for remote processing)
xy_coords = [(pos.x, pos.y) for pos in one_grid_line]
xy_coords = [(pos[0], pos[1]) for pos in one_grid_line]
args.append((xy_coords, minz, maxz, model, cutter,
self.physics))
for points in run_in_parallel(_process_one_grid_line, args,
......
......@@ -96,7 +96,7 @@ class ModelProjection(pycam.Plugins.PluginBase):
name_template="Projected model #%d")
else:
self.log.warn("The 2D projection at z=%g is empty. Aborted." % \
plane.p.z)
plane.p[2])
break
progress.update_multiple()
progress.finish()
......
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