add purge in profile and geometry

This commit is contained in:
Theophile Terraz committed 2024-05-07 17:42:43 +02:00
1 parent 5164891928
commit 5790bdfe82
12 files changed
+217 -28

No files matched your search

+5
View File
@@ -295,6 +295,11 @@ class Profile(object):
)
self._status.modified()
@timer
def reverse(self):
self._points.reverse()
self._status.modified()
# Sediment Layers
def get_sl(self):
-3
View File
@@ -544,15 +544,12 @@ class ProfileXYZ(Profile, SQLSubModel):
if self.point(i).point_is_named():
area.append(9999999.999)
nb_named += 1
print(self.point(i).name.strip())
else:
area.append(PointXYZ.areatriangle3d(self.point(i-1),self.point(i),self.point(i+1)))
area.append(0.0)
print(area)
while (self.nb_points > max(np_purge, nb_named)):
to_rm = np.argmin(area[1:self.nb_points-1])+1
print('to rm = ', to_rm)
self.delete_i([to_rm])
area.pop(to_rm)
for i in [to_rm-1, to_rm]: