mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
debug internal mesher
This commit is contained in:
1 parent
97762756f8
commit
ceff5f3083
3 files changed
+73
-39
No files matched your search
@@ -251,11 +251,23 @@ class GeometryReachTableModel(PamhyrTableModel):
|
||||
self.layoutChanged.emit()
|
||||
|
||||
def meshing(self, mesher, data, tableView):
|
||||
|
||||
new_profiles = mesher.meshing(
|
||||
self._data,
|
||||
**data
|
||||
)
|
||||
|
||||
if new_profiles is None:
|
||||
return
|
||||
|
||||
if len(new_profiles) == 0:
|
||||
return
|
||||
|
||||
self.layoutAboutToBeChanged.emit()
|
||||
|
||||
self._undo.push(
|
||||
MeshingCommand(
|
||||
self._data, mesher, data, tableView
|
||||
self._data, new_profiles, data, tableView
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -274,15 +274,14 @@ class UpdateRKCommand(QUndoCommand):
|
||||
|
||||
|
||||
class MeshingCommand(QUndoCommand):
|
||||
def __init__(self, reach, mesher, data, tableView):
|
||||
def __init__(self, reach, new_profiles, data, tableView):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
self._reach = reach
|
||||
self._data = data
|
||||
self._limites = data["limites"]
|
||||
self._mesher = mesher
|
||||
|
||||
self._new_profiles = None
|
||||
self._new_profiles = new_profiles
|
||||
self._new_profiles_indexes = None
|
||||
self._tableView = tableView
|
||||
self._indexes = tableView.selectionModel().selection()
|
||||
@@ -308,12 +307,6 @@ class MeshingCommand(QUndoCommand):
|
||||
)
|
||||
|
||||
def redo(self):
|
||||
if self._new_profiles is None:
|
||||
self._new_profiles = self._mesher.meshing(
|
||||
self._reach,
|
||||
**self._data
|
||||
)
|
||||
|
||||
if self._new_profiles_indexes is None:
|
||||
k = self._limites[0]
|
||||
self._new_profiles_indexes = []
|
||||
|
||||
Reference in new issue
Block a user