mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
add purge in profile and geometry
This commit is contained in:
1 parent
5164891928
commit
5790bdfe82
12 files changed
+217
-28
No files matched your search
@@ -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):
|
||||
|
||||
@@ -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]:
|
||||
|
||||
Reference in new issue
Block a user