mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-10 15:25:09 -06:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
f5085ef205
4 changed files with 34 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
import math
|
||||
import numpy
|
||||
|
||||
from typing import Optional, cast
|
||||
|
@ -186,6 +187,11 @@ class LayerPolygon:
|
|||
def types(self):
|
||||
return self._types
|
||||
|
||||
@property
|
||||
def lineLengths(self):
|
||||
data_array = numpy.array(self._data)
|
||||
return numpy.linalg.norm(data_array[1:] - data_array[:-1], axis=1)
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
return self._data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue