Another try...
parent
a4b0c7e229
commit
87a54de2a3
|
@ -2136,13 +2136,7 @@ class Path(MutableSequence):
|
||||||
|
|
||||||
def cropped(self, T0, T1):
|
def cropped(self, T0, T1):
|
||||||
"""returns a cropped copy of the path."""
|
"""returns a cropped copy of the path."""
|
||||||
assert 0 <= T0 <= 1 and 0 <= T1<= 1
|
|
||||||
assert T0 != T1
|
assert T0 != T1
|
||||||
assert not (T0 == 1 and T1 == 0)
|
|
||||||
|
|
||||||
if T0 == 1 and 0 < T1 < 1 and self.isclosed():
|
|
||||||
return self.cropped(0, T1)
|
|
||||||
|
|
||||||
if T1 == 1:
|
if T1 == 1:
|
||||||
seg1 = self[-1]
|
seg1 = self[-1]
|
||||||
t_seg1 = 1
|
t_seg1 = 1
|
||||||
|
@ -2177,7 +2171,7 @@ class Path(MutableSequence):
|
||||||
|
|
||||||
# T1<T0 must cross discontinuity case
|
# T1<T0 must cross discontinuity case
|
||||||
if T1 < T0:
|
if T1 < T0:
|
||||||
if not self.isclosed():
|
if self.isclosed():
|
||||||
raise ValueError("This path is not closed, thus T0 must "
|
raise ValueError("This path is not closed, thus T0 must "
|
||||||
"be less than T1.")
|
"be less than T1.")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue