mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pamhyr: Add just-in-time database geometry loading.
This commit is contained in:
1 parent
a603c3a63f
commit
ab9ebc6400
9 files changed
+140
-77
No files matched your search
@@ -68,6 +68,26 @@ class FrictionList(PamhyrModelList):
|
||||
|
||||
return ok
|
||||
|
||||
def _get_frictions_list(self):
|
||||
# Frictions list generator is type (int, Point) with the first
|
||||
# element the index of the Point in list
|
||||
return list(
|
||||
map(
|
||||
lambda p: p[1],
|
||||
sorted(
|
||||
self._lst,
|
||||
key = lambda p: p[0]
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@property
|
||||
def lst(self):
|
||||
if not isinstance(self._lst, list):
|
||||
self._lst = self._get_frictions_list()
|
||||
|
||||
return self._lst
|
||||
|
||||
@property
|
||||
def frictions(self):
|
||||
return self.lst
|
||||
|
||||
Reference in new issue
Block a user