Skip to content

feat: visualize well intersection in geos-trame #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion geos-trame/src/geos_trame/app/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from geos_trame.app.ui.inspector import DeckInspector
from geos_trame.app.ui.plotting import DeckPlotting
from geos_trame.app.ui.timeline import TimelineEditor
from geos_trame.app.ui.viewer import DeckViewer
from geos_trame.app.ui.viewer.viewer import DeckViewer

import sys

Expand Down
1 change: 1 addition & 0 deletions geos-trame/src/geos_trame/app/deck/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def _build_inspect_tree_inner( key, obj, path ) -> dict:
"VTKMesh",
"InternalMesh",
"InternalWell",
"VTKWell",
"Perforation",
]
sub_node[ "drawn" ] = False
Expand Down
32 changes: 15 additions & 17 deletions geos-trame/src/geos_trame/app/ui/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Renderable( Enum ):
VTKMESH = "VTKMesh"
INTERNALMESH = "InternalMesh"
INTERNALWELL = "InternalWell"
VTKWELL = "VTKWell"
PERFORATION = "Perforation"


Expand Down Expand Up @@ -100,7 +101,7 @@ def get_node_dict( obj, node_id, path ):
title=node_name,
children=children if len( children ) else [],
hidden_children=[],
is_drawable=node_id in ( k for k in Renderable ),
is_drawable=node_id in ( k.value for k in Renderable ),
drawn=False,
)

Expand Down Expand Up @@ -201,7 +202,7 @@ def __init__( self, listen_to_active=True, source=None, **kwargs ):
self._source = None
self.listen_to_active = listen_to_active

self.state.obj_path = ""
self.state.object_state = [ "", False ]

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

with self:
with vuetify.Template( v_slot_append="{ item }" ):
with vuetify.VBtn(
v_if=( "item.is_drawable" ),
icon=True,
flat=True,
slim=True,
input_value=( "item.drawn" ),
click=( self.to_draw_change, "[item.id]" ),
):
vuetify.VIcon(
"{{ ((item.drawn)) ? 'mdi-eye' : 'mdi-eye-off' }}",
v_if=( "item.is_drawable" ),
)
vuetify.VCheckboxBtn(
v_if="item.is_drawable",
icon=True,
true_icon="mdi-eye",
false_icon="mdi-eye-off",
dense=True,
hide_details=True,
update_modelValue=( self.to_draw_change, "[ item.id, $event ] " ),
)

def to_draw_change( self, id, drawn ):
self.state.object_state = [ id, drawn ]

@property
def source( self ):
Expand Down Expand Up @@ -298,9 +299,6 @@ def set_source( self, v ):
debug.set_property( key, getattr( active_block, key ) )
debug.commit()

def to_draw_change( self, path ):
self.state.obj_path = path

# def on_active_change(self, **_):
# if self.listen_to_active:
# print("on_active_change")
Expand Down
299 changes: 0 additions & 299 deletions geos-trame/src/geos_trame/app/ui/viewer.py

This file was deleted.

Empty file.
Loading