Skip to content
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

added prompt before KdTree generation to get at least some informatio… #394

Merged
merged 1 commit into from
May 27, 2024
Merged
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
5 changes: 4 additions & 1 deletion src/PRo3D.Core/Surface/SurfaceApp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,10 @@ module SurfaceApp =
yield GuiEx.iconCheckBox s.isActive (ToggleActiveFlag key)
|> UI.wrapToolTip DataPosition.Bottom "Toggle IsActive"

yield i [clazz "exclamation circle icon"; onClick (fun _ -> RebuildKdTrees key)] []
yield
i [ clazz "exclamation circle icon"; onEvent "generate" [] (fun _ -> RebuildKdTrees key)
// kdTreeRebuildOptions is in utilities.js
clientEvent "onclick" "top.aardvark.dialog.showMessageBox(null, kdTreeRebuildOptions).then((r) => { console.warn(r.response); if(r.response == 1) { aardvark.processEvent('__ID__', 'generate');} else { console.warn('user cancelled kdtree construction.'); } });" ] []
|> UI.wrapToolTip DataPosition.Bottom "rebuild kdTree"

let! path = s.importPath
Expand Down
1 change: 1 addition & 0 deletions src/PRo3D.Viewer/PRo3D.Viewer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
<Compile Include="QueriesRemoteApi.fs" />
<Compile Include="RemoteApi.fs" />
<Compile Include="Program.fs" />
<EmbeddedResource Include="resources\utilities.js" />

<Content Include="resources\rotationcubeXYZ\back.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
Expand Down
1 change: 1 addition & 0 deletions src/PRo3D.Viewer/Viewer/Viewer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,7 @@ module ViewerApp =
{ kind = Script; name = "errorReporting"; url = "./resources/errorReporting.js" }
{ kind = Script; name = "resize"; url = "./resources/ResizeSensor.js" }
{ kind = Script; name = "resizeElem"; url = "./resources/ElementQueries.js" }
{ kind = Script; name = "utilities"; url = "./resources/utilities.js" }
]

let bodyAttributes : list<Attribute<ViewerAnimationAction>> =
Expand Down
8 changes: 8 additions & 0 deletions src/PRo3D.Viewer/resources/utilities.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const kdTreeRebuildOptions = {
type: 'question',
buttons: ['Cancel', 'Yes'],
defaultId: 0,
title: 'Rebuilding KdTrees',
message: 'Creating KdTrees may take some time.',
detail: 'For progress and feedback please look at the console output. After regeneration, reload restart PRo3D and reload the surface.'
};
Loading