Custom deepcopy() implementations to help speed things up
This commit is contained in:
parent
94410dffc9
commit
a461446059
9 changed files with 80 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import List, Tuple
|
||||
from typing import List, Tuple, Dict
|
||||
import math
|
||||
import numpy
|
||||
from numpy import pi
|
||||
|
|
@ -98,6 +98,13 @@ class Ellipse(Shape):
|
|||
self.poly_num_points = poly_num_points
|
||||
self.poly_max_arclen = poly_max_arclen
|
||||
|
||||
def __deepcopy__(self, memo: Dict = None) -> 'Ellipse':
|
||||
memo = {} if memo is None else memo
|
||||
new = copy.copy(self)
|
||||
new._offset = self._offset.copy()
|
||||
new._radii = self._radii.copy()
|
||||
return new
|
||||
|
||||
def to_polygons(self,
|
||||
poly_num_points: int=None,
|
||||
poly_max_arclen: float=None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue