Avoid unnecessary mid-Op tool movements to origin: don't add the end vector of 0-length segments to the Op move list.

This commit is contained in:
jim
2023-04-27 09:53:37 -07:00
parent f77d67ad28
commit be22aefe1e

View File

@@ -265,7 +265,10 @@ class ObjectOp(PathOp.ObjectOp):
(pp, end_vector) = Path.fromShapes(**pathParams)
Path.Log.debug("pp: {}, end vector: {}".format(pp, end_vector))
self.endVector = end_vector
# Keep track of this segment's end only if it has movement (otherwise end_vector is 0,0,0 and the next segment will unnecessarily start there)
if pp.Size > 0:
self.endVector = end_vector
simobj = None
if getsim: