Commit d46107ec authored by Whitham D. Reeve II's avatar Whitham D. Reeve II

Remove old commented out code.

parent 3e556f62
......@@ -143,9 +143,7 @@ class DXFParser(object):
groups.append(current_group)
def get_distance_between_groups(group1, group2):
forward = pnorm(psub(group1[-1].p2, group2[0].p1))
#forward = group1[-1].p2.sub(group2[0].p1).norm
backward = pnorm(psub(group2[-1].p2, group1[0].p1))
#backward = group2[-1].p2.sub(group1[0].p1).norm
return min(forward, backward)
remaining_groups = groups[:]
ordered_groups = []
......
......@@ -151,10 +151,8 @@ def ImportModel(filename, use_kdtree=True, callback=None, **kwargs):
attribs = unpack("<H", f.read(2))
dotcross = pdot(n, pcross(psub(p2, p1), psub(p3, p1)))
#dotcross = n.dot(p2.sub(p1).cross(p3.sub(p1)))
if a1 == a2 == a3 == 0:
dotcross = pcross(psub(p2, p1), psub(p3,p1))[2]
#dotcross = p2.sub(p1).cross(p3.sub(p1)).z
n = None
if dotcross > 0:
......@@ -245,7 +243,6 @@ def ImportModel(filename, use_kdtree=True, callback=None, **kwargs):
continue
if not n:
n = pnormalized(pcross(psub(p2, p1), psub(p3, p1)))
#n = p2.sub(p1).cross(p3.sub(p1)).normalized()
# validate the normal
# The three vertices of a triangle in an STL file are supposed
......@@ -257,7 +254,6 @@ def ImportModel(filename, use_kdtree=True, callback=None, **kwargs):
else:
# make sure the points are in ClockWise order
dotcross = pdot(n, pcross(psub(p2,p1), psub(p3, p1)))
#dotcross = n.dot(p2.sub(p1).cross(p3.sub(p1)))
if dotcross > 0:
# Triangle expects the vertices in clockwise order
t = Triangle(p1, p3, p2, n)
......
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