From: Eduardo DAVILA Date: Fri, 14 Oct 2022 09:40:36 +0000 (+0200) Subject: #3493 ShowNPoints_UndoRedo X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1c964b18c4abd1a3854a9dad2e818f196256dab0;p=creaMaracasVisu.git #3493 ShowNPoints_UndoRedo --- diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg index b3de03f..bc1e87e 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg @@ -77,7 +77,7 @@ BOX creaMaracasVisu:ShowNPoints:showNpoints ISEXEC:FALSE 24.787568:83.025910:-900.000000 -61.627568:80.525910:-900.000000 +46.637568:80.525910:-900.000000 PORT Radio:"1" PORT @@ -95,7 +95,7 @@ BOX creaMaracasVisu:ManualContourModel_Box:Box06 ISEXEC:FALSE 29.075845:30.364799:-900.000000 -53.595845:27.864799:-900.000000 +52.285845:27.864799:-900.000000 PORT DoubleContour:"1" PORT @@ -109,7 +109,7 @@ BOX wx:LayoutLine:Box08 ISEXEC:FALSE -182.125107:-147.642582:-900.000000 --148.805107:-150.142582:-900.000000 +33.320000:-150.142582:-900.000000 FIN_BOX BOX vtk:UpdateRender:Box11 @@ -123,7 +123,7 @@ BOX creaMaracasVisu:DrawAxisTree3D:Box30 ISEXEC:FALSE 66.011927:-0.645212:-900.000000 -94.051927:-3.145212:-900.000000 +88.191927:-3.145212:-900.000000 PORT Colour:"0 0 1" PORT @@ -139,7 +139,7 @@ BOX creaMaracasVisu:ManualContourModel_Box:Box29 ISEXEC:FALSE 76.240145:29.637449:-900.000000 -100.760145:27.137449:-900.000000 +99.450145:27.137449:-900.000000 PORT NbPoints:"40" PORT @@ -178,6 +178,8 @@ PORT In7:"+> Insert group after" PORT In8:"- Delete group" +PORT +In9:"Tool - Inverse Normals" FIN_BOX BOX creaMaracasVisu:ShowNPoints_Tools:Box60 @@ -188,8 +190,8 @@ FIN_BOX BOX std:StringSelect:Box61 ISEXEC:FALSE --269.579256:64.985526:-900.000000 --245.059256:62.485526:-900.000000 +-269.755079:70.260206:-900.000000 +-245.235079:67.760206:-900.000000 PORT In0:"5" PORT @@ -208,18 +210,20 @@ PORT In7:"100" PORT In8:"110" +PORT +In9:"210" FIN_BOX BOX vtk:ImageVtkProperties:Box68 ISEXEC:FALSE -111.766259:110.196821:-900.000000 --89.231259:107.696821:-900.000000 +16.720000:107.696821:-900.000000 FIN_BOX BOX std:VectorFilterDouble:Box70 ISEXEC:FALSE 49.750242:60.953814:-900.000000 -76.030242:58.453814:-900.000000 +72.180242:58.453814:-900.000000 PORT Type:"11" FIN_BOX @@ -227,7 +231,7 @@ BOX creaVtk:BooleanOperationPolyDataFilter:Box77 ISEXEC:FALSE -85.849843:-22.221970:-900.000000 --62.119843:-24.721970:-900.000000 +12.200000:-24.721970:-900.000000 PORT BoxProcessMode:"Manual" PORT @@ -237,7 +241,7 @@ BOX wx:ComboBox:Box78 ISEXEC:FALSE -153.877713:-5.775167:-900.000000 --127.597713:-8.275167:-900.000000 +26.280000:-8.275167:-900.000000 PORT In:"Union Intersection Difference" FIN_BOX @@ -245,7 +249,7 @@ BOX wx:LayoutLine:Box79 ISEXEC:FALSE -144.841026:-82.628158:-900.000000 --111.521026:-85.128158:-900.000000 +33.320000:-85.128158:-900.000000 PORT Orientation:"H" PORT @@ -255,7 +259,7 @@ BOX wx:CommandButton:Box80 ISEXEC:FALSE -107.184095:21.801731:-900.000000 --84.909095:19.301731:-900.000000 +21.000000:19.301731:-900.000000 PORT Label:"Run" FIN_BOX @@ -263,13 +267,13 @@ BOX std:MagicBox:Box66 ISEXEC:FALSE -148.055989:80.219744:-900.000000 --126.455989:77.719744:-900.000000 +8.680000:77.719744:-900.000000 FIN_BOX BOX std:MagicBox:Box67 ISEXEC:FALSE -67.526006:124.007723:-900.000000 --45.926006:121.507723:-900.000000 +8.680000:121.507723:-900.000000 FIN_BOX BOX creaMaracasVisu:PolyDataToActor_Widget:Box48 @@ -281,13 +285,13 @@ BOX vtk:vtkImageDataPointerRelay:Box35 ISEXEC:FALSE -107.091396:123.633118:-900.000000 --83.881396:121.133118:-900.000000 +6.920000:121.133118:-900.000000 FIN_BOX BOX wx:Slider:Box34 ISEXEC:FALSE -198.941120:-3.426364:-900.000000 --169.141120:-5.926364:-900.000000 +29.800000:-5.926364:-900.000000 PORT In:"50" PORT @@ -305,7 +309,7 @@ BOX std:Div:Box36 ISEXEC:FALSE -190.788172:-9.261990:-900.000000 --169.863172:-11.761990:-900.000000 +8.680000:-11.761990:-900.000000 PORT In2:"100" FIN_BOX @@ -313,7 +317,7 @@ BOX creaMaracasVisu:PolyDataToActor_Widget:Box37 ISEXEC:FALSE -67.388857:-39.476785:-900.000000 --44.368857:-41.976785:-900.000000 +12.200000:-41.976785:-900.000000 PORT color:"0 1 1" FIN_BOX @@ -321,7 +325,7 @@ BOX wx:LayoutLine:Box38 ISEXEC:FALSE -190.854929:-82.522396:-900.000000 --157.534929:-85.022396:-900.000000 +33.320000:-85.022396:-900.000000 PORT Orientation:"H" PORT @@ -331,19 +335,19 @@ BOX wx:LayoutTab:Box39 ISEXEC:FALSE -195.888488:-89.508403:-900.000000 --162.568488:-92.008403:-900.000000 +33.320000:-92.008403:-900.000000 FIN_BOX BOX wx:LayoutTab:Box40 ISEXEC:FALSE -148.825313:-89.038628:-900.000000 --115.505313:-91.538628:-900.000000 +33.320000:-91.538628:-900.000000 FIN_BOX BOX wx:CommandButton:Box42 ISEXEC:FALSE -91.903796:13.441695:-900.000000 --69.628796:10.941695:-900.000000 +21.000000:10.941695:-900.000000 PORT Label:"Apply (Magenta->To Red)" FIN_BOX @@ -351,7 +355,7 @@ BOX wx:CommandButton:Box43 ISEXEC:FALSE -85.356515:8.083838:-900.000000 --63.081515:5.583838:-900.000000 +21.000000:5.583838:-900.000000 PORT Label:"Reset Tool" FIN_BOX @@ -359,7 +363,7 @@ BOX wx:LayoutLine:Box44 ISEXEC:FALSE -154.036190:-43.432527:-900.000000 --120.716190:-45.932527:-900.000000 +33.320000:-45.932527:-900.000000 PORT Orientation:"V" PORT @@ -369,7 +373,7 @@ BOX creaVtk:MeshManager_tool:Box45 ISEXEC:FALSE -90.848443:-133.408000:-900.000000 --68.348443:-135.908000:-900.000000 +10.440000:-135.908000:-900.000000 PORT Tool:"30" FIN_BOX @@ -377,13 +381,13 @@ BOX std:MagicBox:Box46 ISEXEC:FALSE -137.131256:113.921532:-900.000000 --115.531256:111.421532:-900.000000 +8.680000:111.421532:-900.000000 FIN_BOX BOX wx:ComboBox:Box49 ISEXEC:FALSE -182.639251:-13.479145:-900.000000 --156.359251:-15.979145:-900.000000 +26.280000:-15.979145:-900.000000 PORT In:"25 50 100 150" PORT @@ -395,7 +399,7 @@ BOX wx:LayoutLine:Box50 ISEXEC:FALSE -57.295971:-56.374591:-900.000000 --23.975971:-58.874591:-900.000000 +33.320000:-58.874591:-900.000000 PORT Orientation:"V" PORT @@ -405,13 +409,13 @@ BOX std:MultipleInputs:Box51 ISEXEC:FALSE -92.949669:-148.627142:-900.000000 --70.979669:-151.127142:-900.000000 +21.000000:-151.127142:-900.000000 FIN_BOX BOX creaMaracasVisu:ShowNPoints_Tools:Box52 ISEXEC:FALSE -48.321002:-133.648902:-900.000000 --25.886002:-136.148902:-900.000000 +12.200000:-136.148902:-900.000000 PORT Type:"120" FIN_BOX @@ -419,19 +423,19 @@ BOX std:MultipleInputs:Box53 ISEXEC:FALSE -96.292390:-13.293248:-900.000000 --74.322390:-15.793248:-900.000000 +21.000000:-15.793248:-900.000000 FIN_BOX BOX std:MultipleInputs:Box55 ISEXEC:FALSE -54.535637:-149.462814:-900.000000 --32.565637:-151.962814:-900.000000 +21.000000:-151.962814:-900.000000 FIN_BOX BOX creaMaracasVisu:MeshContours_Widget:Box62 ISEXEC:FALSE -228.707140:-3.136982:-900.000000 --205.912140:-5.636982:-900.000000 +13.960000:-5.636982:-900.000000 PORT colorMesh:"1 1 0" FIN_BOX @@ -469,7 +473,7 @@ BOX creaMaracasVisu:MeshContours_Widget:Box72 ISEXEC:FALSE -180.819147:-56.018495:-900.000000 --158.024147:-58.518495:-900.000000 +13.960000:-58.518495:-900.000000 PORT colorMesh:"0 1 1" FIN_BOX @@ -477,7 +481,7 @@ BOX wx:LayoutLine:Box81 ISEXEC:FALSE -184.734921:-96.564525:-900.000000 --151.414921:-99.064525:-900.000000 +33.320000:-99.064525:-900.000000 PORT WinTitle:"Step 1. Surface" FIN_BOX @@ -485,43 +489,43 @@ BOX wx:LayoutTab:Box82 ISEXEC:FALSE -142.286608:-51.350487:-900.000000 --108.966608:-53.850487:-900.000000 +33.320000:-53.850487:-900.000000 FIN_BOX BOX wx:OutputText:Box84 ISEXEC:FALSE -127.611417:-38.148449:-900.000000 --105.941417:-40.648449:-900.000000 +19.240000:-40.648449:-900.000000 FIN_BOX BOX wx:LayoutTab:Box86 ISEXEC:FALSE -57.013911:-62.286670:-900.000000 --23.693911:-64.786670:-900.000000 +33.320000:-64.786670:-900.000000 FIN_BOX BOX wx:OutputText:Box87 ISEXEC:FALSE -35.032220:-44.152050:-900.000000 --13.362220:-46.652050:-900.000000 +19.240000:-46.652050:-900.000000 FIN_BOX BOX wx:OutputText:Box88 ISEXEC:FALSE -31.367033:-49.235762:-900.000000 --9.697033:-51.735762:-900.000000 +19.240000:-51.735762:-900.000000 FIN_BOX BOX creaVtk:MeshManager:Box92 ISEXEC:FALSE -56.608588:-81.789032:-900.000000 --34.578588:-84.289032:-900.000000 +9.680000:-84.289032:-900.000000 FIN_BOX BOX creaVtk:MeshManager_tool:Box93 ISEXEC:FALSE -61.627153:-92.643884:-900.000000 --39.127153:-95.143884:-900.000000 +10.440000:-95.143884:-900.000000 PORT Tool:"35" FIN_BOX @@ -529,19 +533,19 @@ BOX std:MagicBox:Box94 ISEXEC:FALSE -70.989776:-33.864327:-900.000000 --49.389776:-36.364327:-900.000000 +8.680000:-36.364327:-900.000000 FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_Info:Box96 ISEXEC:FALSE -157.021318:90.558496:-900.000000 --129.741318:88.058496:-900.000000 +27.280000:88.058496:-900.000000 FIN_BOX BOX creaVtk:PolyDataNormals:Box97 ISEXEC:FALSE -88.026860:-72.332654:-900.000000 --65.731860:-74.832654:-900.000000 +12.200000:-74.832654:-900.000000 FIN_BOX CONNECTIONS:122 CONNECTION diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs index 3e319d9..0511975 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs @@ -60,6 +60,7 @@ new std:AddStringToVector Box58 set Box58.In6 "----------------------" set Box58.In7 "+> Insert group after" set Box58.In8 "- Delete group" + set Box58.In9 "Tool - Inverse Normals" new creaMaracasVisu:ShowNPoints_Tools Box60 @@ -73,6 +74,7 @@ new std:StringSelect Box61 set Box61.In6 "0" set Box61.In7 "100" set Box61.In8 "110" + set Box61.In9 "210" new vtk:ImageVtkProperties Box68 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx index 47fbbc3..f31e871 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx @@ -813,7 +813,6 @@ void WidgetShowNPoints::DeleteAllPoints() { ErasePoint(id); }// for id - SetOutputBox(); } @@ -821,6 +820,7 @@ void WidgetShowNPoints::DeleteAllPoints() void WidgetShowNPoints::OnDeleteAllPoints(wxCommandEvent& event) { DeleteAllPoints(); + SetOutputBox(); GetViewShowNPoints()->Render(); UndoRedo_SaveCollection(); } @@ -981,6 +981,7 @@ void WidgetShowNPoints::DeleteCollection_() void WidgetShowNPoints::OnDeleteCollection_() { DeleteCollection_(); + SetOutputBox(); GetViewShowNPoints()->Render(); RefreshCollectionText(); RefreshColourCollection();