mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Remove unneeded semicolons
This commit is contained in:
parent
96003c1335
commit
6a6ad6e815
2 changed files with 5 additions and 3 deletions
|
@ -170,7 +170,7 @@ class ColorMix(Script):
|
||||||
modelNumber = 0
|
modelNumber = 0
|
||||||
for active_layer in data:
|
for active_layer in data:
|
||||||
modified_gcode = ""
|
modified_gcode = ""
|
||||||
lineIndex = 0;
|
lineIndex = 0
|
||||||
lines = active_layer.split("\n")
|
lines = active_layer.split("\n")
|
||||||
for line in lines:
|
for line in lines:
|
||||||
#dont leave blanks
|
#dont leave blanks
|
||||||
|
|
|
@ -653,7 +653,7 @@ class X3DReader(MeshReader):
|
||||||
|
|
||||||
def processGeometryTriangleSet2D(self, node):
|
def processGeometryTriangleSet2D(self, node):
|
||||||
verts = readFloatArray(node, "vertices", ())
|
verts = readFloatArray(node, "vertices", ())
|
||||||
num_faces = len(verts) // 6;
|
num_faces = len(verts) // 6
|
||||||
verts = [(verts[i], verts[i+1], 0) for i in range(0, 6 * num_faces, 2)]
|
verts = [(verts[i], verts[i+1], 0) for i in range(0, 6 * num_faces, 2)]
|
||||||
self.reserveFaceAndVertexCount(num_faces, num_faces * 3)
|
self.reserveFaceAndVertexCount(num_faces, num_faces * 3)
|
||||||
for vert in verts:
|
for vert in verts:
|
||||||
|
@ -904,6 +904,7 @@ def findOuterNormal(face):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
# Given two *collinear* vectors a and b, returns the coefficient that takes b to a.
|
# Given two *collinear* vectors a and b, returns the coefficient that takes b to a.
|
||||||
# No error handling.
|
# No error handling.
|
||||||
# For stability, taking the ration between the biggest coordinates would be better...
|
# For stability, taking the ration between the biggest coordinates would be better...
|
||||||
|
@ -915,12 +916,13 @@ def ratio(a, b):
|
||||||
else:
|
else:
|
||||||
return a.z / b.z
|
return a.z / b.z
|
||||||
|
|
||||||
|
|
||||||
def pointInsideTriangle(vx, next, prev, nextXprev):
|
def pointInsideTriangle(vx, next, prev, nextXprev):
|
||||||
vxXprev = vx.cross(prev)
|
vxXprev = vx.cross(prev)
|
||||||
r = ratio(vxXprev, nextXprev)
|
r = ratio(vxXprev, nextXprev)
|
||||||
if r < 0:
|
if r < 0:
|
||||||
return False
|
return False
|
||||||
vxXnext = vx.cross(next);
|
vxXnext = vx.cross(next)
|
||||||
s = -ratio(vxXnext, nextXprev)
|
s = -ratio(vxXnext, nextXprev)
|
||||||
return s > 0 and (s + r) < 1
|
return s > 0 and (s + r) < 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue