From cfcc5b323f6e322ed8ab8b74bd9573f6aa903fdc Mon Sep 17 00:00:00 2001 From: KPhans Date: Tue, 31 Aug 2021 12:42:11 -0400 Subject: [PATCH 1/2] add buttons, logo, ui change --- apps/dash-vehicle-geometry/app.py | 76 ++++++++++++++++-- .../assets/dash-logo.png | Bin 0 -> 17304 bytes apps/dash-vehicle-geometry/requirements.txt | 2 +- 3 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 apps/dash-vehicle-geometry/assets/dash-logo.png diff --git a/apps/dash-vehicle-geometry/app.py b/apps/dash-vehicle-geometry/app.py index 409256ace..1e5b157c2 100644 --- a/apps/dash-vehicle-geometry/app.py +++ b/apps/dash-vehicle-geometry/app.py @@ -4,10 +4,12 @@ import dash import dash_bootstrap_components as dbc +from dash_bootstrap_components._components.Col import Col import dash_html_components as html import dash_core_components as dcc from dash.dependencies import Input, Output, State +from dash_html_components.Br import Br import dash_vtk from dash_vtk.utils import to_mesh_state, preset_as_options @@ -173,8 +175,54 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]): ), ] ), + html.Br(), + dbc.Alert( + "Please click on the vehicle to display the cones", + color="info", + dismissable=True, + ), ] +external_buttons = html.Div( + [ + html.A( + dbc.Button( + "Enterprise Demo", + color="primary", + size="md", + className="mr-1", + ), + href="https://plotly.com/get-demo/", + target="_blank", + ), + html.A( + dbc.Button( + "Source Code", + size="md", + className="mr-1", + color="secondary", + ), + href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-vehicle-geometry", + target="_blank", + ), + html.A( + html.Img( + src=app.get_asset_url("dash-logo.png"), + alt="MIT Logo", + height="100%", + style={"margin-left": "15px"}, + ), + href="https://plotly.com/dash/", + target="_blank", + ), + ], + style={ + "float": "right", + "height": "60px", + "padding-bottom": "0px", + }, +) + # ----------------------------------------------------------------------------- # App UI # ----------------------------------------------------------------------------- @@ -182,7 +230,17 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]): app.layout = dbc.Container( fluid=True, children=[ - html.H2("Vehicle Geometry with OpenFOAM"), + dbc.Row( + [ + dbc.Col( + [html.H2("Vehicle Geometry with OpenFOAM")], + width=7, + style={"padding-top": "10px"}, + ), + dbc.Col([external_buttons], width=5), + ], + style={"margin-bottom": "1px"}, + ), html.Hr(), dbc.Row( [ @@ -204,7 +262,10 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]): ), ], id="vtk-view-container", - style={"height": "calc(100vh - 230px)", "width": "100%",}, + style={ + "height": "calc(100vh - 230px)", + "width": "100%", + }, ), ], ), @@ -246,7 +307,7 @@ def initial_loading(geometry): return dash_vtk.View( id="vtk-view", children=vehicle_vtk + isosurfs_vtk + [cone_pointer, tooltip], - pickingModes=["hover"], + pickingModes=["click"], ) @@ -313,8 +374,13 @@ def update_scene(geometry, isosurfaces, surfcolor): @app.callback( - [Output("tooltip", "children"), Output("pointer", "state"),], - [Input("vtk-view", "hoverInfo"),], + [ + Output("tooltip", "children"), + Output("pointer", "state"), + ], + [ + Input("vtk-view", "clickInfo"), + ], ) def probe_data(info): cone_state = {"resolution": 12} diff --git a/apps/dash-vehicle-geometry/assets/dash-logo.png b/apps/dash-vehicle-geometry/assets/dash-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9ed7cd16048d9edfd25eda43682bdaba43369ca1 GIT binary patch literal 17304 zcmeIa$LB!-fq8%0Xe06`jo0cPlKlvL>$x`$4Y zj$zKm=bV4wT-Wc#xz582_U!)Ds(amQzt_=HB`0Ab0f9i|FP=Zs1%dFFL7-bX#Du_+ zK6mB^z~+wIb0ZHBNC5aP@ZgqjKG+)sx(|BsOcCOnzB^|U`^qOs@FMBwb8$xhbT^@? zXQLDiBwZ)L&G4M3+^G`YL z$em~Int!R(P2M}V4`BhOy+ zin$RraWR2J*0gS);;?P&tH~CnKx08~np-E%@PHo*!J(2j2OcX>5#4MFh=HDgK-nNg zmYXf@{ixf(<_#V`{AO3@&3%fSEeTcUEnuT?>wjUsHcK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rG=vvgPf>qba>^3%l>K@!;2-EWvEv32 z{Ws;uQ-eV{@VFE34IBr?eq=8bpFbV2c~`R0fAV!Or~=OGrBZkdU{hCaeS*!Wk>-au zRkyR*b=;a;llpOG+W48TAMSGA&zXv;r`J9c+rCumV`)WrqozPL)SX^BkTfVvdX-0$ zE7ooM`Z9R&&w|BSWQb7_)#LV(fQ5^oNZfq&;w~S`zj^E*Y^>n2_at$y%29F15ML41 zxJ%7c>UcbfjF$o)C>jTZH^ATjmny#9DuZlpD%Q*zSvq&cEScZf0SXqVFHI95f(w)b zeCnN>>eBwx=BvNG8LU9@!_Zs?(SW;+=&X^18qn9V{B61AQt_J`nf!o?22i2i#5+lb z>F+NhRDhEHH_~2mQ64$uEbD*oj%b!YAoC(UEiI7^)g@H`UZQ+~m0xSVH z{Zyv%LGiej0rg}|<=o%h&GZ4k4Wu9tT5s@-uJ0J(Or|qiGwh}cxU3-16!G$>n{pW_ zG!5p+G{k?d8Yr07haS7-ij(}b zWoh5NX9b*ar|Dz`hGL4YTXFl&O(PzwQTc?@cDGmzN;>3k0~QY`R;KC9;55rCGk|*4 zR50J^+q%PX(}LbVH-c9AHcP1t97RVb2%K&`U?yc*SK;dh3|DOIO)X&W{iw8;zdY>OwY919)7jKk#{WJ2OsEn;M5RpXgw1Ef|_3eHGOeN zl}C5~?~e}XYXY^#|NBh>U=03$@g0U)pdJQy>)oc% VZHA12E1=h)7s^`CN|h`_|1THltRw&c literal 0 HcmV?d00001 diff --git a/apps/dash-vehicle-geometry/requirements.txt b/apps/dash-vehicle-geometry/requirements.txt index 4620c3c69..a53926002 100644 --- a/apps/dash-vehicle-geometry/requirements.txt +++ b/apps/dash-vehicle-geometry/requirements.txt @@ -27,6 +27,6 @@ scooby==0.5.6 six==1.15.0 transforms3d==0.3.1 typing-extensions==3.7.4.3 -vtk==9.0.1 +vtk==9.0.* Werkzeug==1.0.1 zipp==3.4.1 From 9276e693471c97cb3c4899f833eb5efb66408d16 Mon Sep 17 00:00:00 2001 From: KPhans Date: Tue, 31 Aug 2021 12:53:19 -0400 Subject: [PATCH 2/2] black --- apps/dash-vehicle-geometry/app.py | 32 ++++++------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/apps/dash-vehicle-geometry/app.py b/apps/dash-vehicle-geometry/app.py index 1e5b157c2..60a920754 100644 --- a/apps/dash-vehicle-geometry/app.py +++ b/apps/dash-vehicle-geometry/app.py @@ -187,21 +187,13 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]): [ html.A( dbc.Button( - "Enterprise Demo", - color="primary", - size="md", - className="mr-1", + "Enterprise Demo", color="primary", size="md", className="mr-1", ), href="https://plotly.com/get-demo/", target="_blank", ), html.A( - dbc.Button( - "Source Code", - size="md", - className="mr-1", - color="secondary", - ), + dbc.Button("Source Code", size="md", className="mr-1", color="secondary",), href="https://github.com/plotly/dash-sample-apps/tree/main/apps/dash-vehicle-geometry", target="_blank", ), @@ -216,11 +208,7 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]): target="_blank", ), ], - style={ - "float": "right", - "height": "60px", - "padding-bottom": "0px", - }, + style={"float": "right", "height": "60px", "padding-bottom": "0px",}, ) # ----------------------------------------------------------------------------- @@ -262,10 +250,7 @@ def cache_mesh(filepath, di, fieldname=None, point_arrays=[], cell_arrays=[]): ), ], id="vtk-view-container", - style={ - "height": "calc(100vh - 230px)", - "width": "100%", - }, + style={"height": "calc(100vh - 230px)", "width": "100%",}, ), ], ), @@ -374,13 +359,8 @@ def update_scene(geometry, isosurfaces, surfcolor): @app.callback( - [ - Output("tooltip", "children"), - Output("pointer", "state"), - ], - [ - Input("vtk-view", "clickInfo"), - ], + [Output("tooltip", "children"), Output("pointer", "state"),], + [Input("vtk-view", "clickInfo"),], ) def probe_data(info): cone_state = {"resolution": 12}