Skip to content

Commit 2d1cf3f

Browse files
committed
feat(wells): add visualization and interaction with well
Improve DeckViewer to be able to show mesh (Region), wells (InternalWell, Vtkmesh) and perforation (Perforation) Update also the gui to be able to hide and control radius property of these datas.
1 parent 5a0f75e commit 2d1cf3f

File tree

9 files changed

+546
-315
lines changed

9 files changed

+546
-315
lines changed

geos-trame/src/geos_trame/app/core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from geos_trame.app.ui.inspector import DeckInspector
1414
from geos_trame.app.ui.plotting import DeckPlotting
1515
from geos_trame.app.ui.timeline import TimelineEditor
16-
from geos_trame.app.ui.viewer import DeckViewer
16+
from geos_trame.app.ui.viewer.viewer import DeckViewer
1717

1818
import sys
1919

geos-trame/src/geos_trame/app/deck/file.py

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def _build_inspect_tree_inner( key, obj, path ) -> dict:
221221
"VTKMesh",
222222
"InternalMesh",
223223
"InternalWell",
224+
"VTKWell",
224225
"Perforation",
225226
]
226227
sub_node[ "drawn" ] = False

geos-trame/src/geos_trame/app/ui/inspector.py

+14-15
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Renderable( Enum ):
1515
VTKMESH = "VTKMesh"
1616
INTERNALMESH = "InternalMesh"
1717
INTERNALWELL = "InternalWell"
18+
VTKWELL = "VTKWell"
1819
PERFORATION = "Perforation"
1920

2021

@@ -201,7 +202,7 @@ def __init__( self, listen_to_active=True, source=None, **kwargs ):
201202
self._source = None
202203
self.listen_to_active = listen_to_active
203204

204-
self.state.obj_path = ""
205+
self.state.object_state = ["", False]
205206

206207
# register used types from Problem
207208
self.simput_types = []
@@ -225,18 +226,18 @@ def on_change( topic, ids=None, **kwargs ):
225226

226227
with self:
227228
with vuetify.Template( v_slot_append="{ item }" ):
228-
with vuetify.VBtn(
229-
v_if=( "item.is_drawable" ),
230-
icon=True,
231-
flat=True,
232-
slim=True,
233-
input_value=( "item.drawn" ),
234-
click=( self.to_draw_change, "[item.id]" ),
235-
):
236-
vuetify.VIcon(
237-
"{{ ((item.drawn)) ? 'mdi-eye' : 'mdi-eye-off' }}",
238-
v_if=( "item.is_drawable" ),
239-
)
229+
vuetify.VCheckboxBtn(
230+
v_if="item.is_drawable",
231+
icon=True,
232+
true_icon="mdi-eye",
233+
false_icon="mdi-eye-off",
234+
dense=True,
235+
hide_details=True,
236+
update_modelValue=( self.to_draw_change, "[ item.id, $event ] "),
237+
)
238+
239+
def to_draw_change(self, id, drawn):
240+
self.state.object_state = [id, drawn]
240241

241242
@property
242243
def source( self ):
@@ -298,8 +299,6 @@ def set_source( self, v ):
298299
debug.set_property( key, getattr( active_block, key ) )
299300
debug.commit()
300301

301-
def to_draw_change( self, path ):
302-
self.state.obj_path = path
303302

304303
# def on_active_change(self, **_):
305304
# if self.listen_to_active:

geos-trame/src/geos_trame/app/ui/viewer.py

-299
This file was deleted.

geos-trame/src/geos_trame/app/ui/viewer/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)