Fix #3521. Forgot to commit function.

This commit is contained in:
Dion Moult
2023-07-29 10:21:10 +10:00
parent 9d4715c0a9
commit 32e02db3f7
@@ -1765,3 +1765,11 @@ class Drawing(blenderbim.core.tool.Drawing):
else:
result += float(child) * factor
return result * 0.0254
@classmethod
def extend_line(cls, start, end, distance):
start = np.array(start)
end = np.array(end)
direction = end - start
offset = distance * (direction / np.linalg.norm(direction))
return (start - offset).tolist(), (end + offset).tolist()