From fe47200dd183cc84345b9d017ff01145e50505b4 Mon Sep 17 00:00:00 2001 From: Pablo Garzon Date: Tue, 18 Jul 2023 13:29:38 +0200 Subject: [PATCH] #3509 Geodesic deformation --- bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg | 122 +++++++++++++++--- bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs | 43 +++++- 2 files changed, 143 insertions(+), 22 deletions(-) diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg index 4adb2fa..c8ab33b 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBG BlackBox Diagram file -# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg +# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbg # ---------------------------------- APP_START @@ -56,7 +56,7 @@ COMPLEX_PORT meshmanagermodel -131.800179:136.578564:-900.000000 FIN_COMPLEX_PORT -BOXES:84 +BOXES:90 BOX wx:LayoutLine:Box08 ISEXEC:FALSE @@ -228,8 +228,8 @@ FIN_BOX BOX creaVtk:MeshDeformation:Box39 ISEXEC:FALSE --404.535808:-81.757400:-900.000000 --382.190808:-84.257400:-900.000000 +-409.619944:-79.385524:-900.000000 +-387.274944:-81.885524:-900.000000 PORT TypeIn:"1" FIN_BOX @@ -332,6 +332,8 @@ creaVtk:MeshManager:Box62 ISEXEC:FALSE -118.710595:82.225283:-900.000000 -96.680595:79.725283:-900.000000 +PORT +MemoryMode:"true" FIN_BOX BOX std:MultipleInputs:Box73 @@ -400,6 +402,8 @@ creaMaracasVisu:SetPosition:Box89 ISEXEC:FALSE -280.871840:-68.898121:-900.000000 -259.211840:-71.398121:-900.000000 +PORT +Active:"false" FIN_BOX BOX creaMaracasVisu:wxVtkBaseView_info_tool:Box90 @@ -699,7 +703,61 @@ ISEXEC:FALSE -78.065349:-79.242161:-900.000000 -56.285349:-81.742161:-900.000000 FIN_BOX -CONNECTIONS:161 +BOX +wx:CommandButton:Box131 +ISEXEC:FALSE +-486.377164:-22.498438:-900.000000 +-463.992164:-24.998438:-900.000000 +PORT +Label:"Undo" +FIN_BOX +BOX +wx:CommandButton:Box132 +ISEXEC:FALSE +-460.460308:-21.270947:-900.000000 +-438.075308:-23.770947:-900.000000 +PORT +Label:"Redo" +FIN_BOX +BOX +wx:LayoutLine:Box133 +ISEXEC:FALSE +-472.454001:-31.934830:-900.000000 +-439.134001:-34.434830:-900.000000 +PORT +Orientation:"H" +FIN_BOX +BOX +creaVtk:MeshManager_tool:Box134 +ISEXEC:FALSE +-425.084450:-69.566462:-900.000000 +-402.474450:-72.066462:-900.000000 +PORT +BoxProcessMode:"Manual" +PORT +Tool:"37" +FIN_BOX +BOX +creaVtk:MeshManager_tool:Box137 +ISEXEC:FALSE +-483.739977:-50.316487:-900.000000 +-461.129977:-52.816487:-900.000000 +PORT +BoxProcessMode:"Manual" +PORT +Tool:"10" +FIN_BOX +BOX +creaVtk:MeshManager_tool:Box138 +ISEXEC:FALSE +-454.314007:-48.284227:-900.000000 +-431.704007:-50.784227:-900.000000 +PORT +BoxProcessMode:"Manual" +PORT +Tool:"20" +FIN_BOX +CONNECTIONS:171 CONNECTION Box08:Widget:widget:widget NumberOfControlPoints:0 @@ -806,9 +864,6 @@ CONNECTION Box49:BoxChange:Box61:In1 NumberOfControlPoints:0 CONNECTION -Box58:BoxChange:Box61:In2 -NumberOfControlPoints:0 -CONNECTION Box67:Out:Box62:Mesh NumberOfControlPoints:0 CONNECTION @@ -854,9 +909,6 @@ CONNECTION Box88:Out:Box89:Point NumberOfControlPoints:0 CONNECTION -Box58:BoxChange:Box89:BoxExecute -NumberOfControlPoints:0 -CONNECTION Box76:InteractorwxVtkBaseView_model:Box90:InteractorwxVtkBaseView_model NumberOfControlPoints:0 CONNECTION @@ -899,9 +951,6 @@ CONNECTION Box96:wxVtkBaseView:Box89:wxVtkBaseView NumberOfControlPoints:0 CONNECTION -Box50:Out:Box89:Active -NumberOfControlPoints:0 -CONNECTION Box96:vtkRenderer:Box92:Renderer NumberOfControlPoints:0 CONNECTION @@ -920,9 +969,6 @@ CONNECTION Box95:Box_ConcatStrings:Box94:Box_ConcatString NumberOfControlPoints:0 CONNECTION -Box95:Out:Box58:Origin -NumberOfControlPoints:0 -CONNECTION Box98:Box_ConcatStrings:Box97:Box_ConcatString NumberOfControlPoints:0 CONNECTION @@ -1183,4 +1229,46 @@ NumberOfControlPoints:0 CONNECTION Box130:Widget:Box127:Widget9 NumberOfControlPoints:0 +CONNECTION +Box131:Widget:Box133:Widget2 +NumberOfControlPoints:0 +CONNECTION +Box132:Widget:Box133:Widget4 +NumberOfControlPoints:0 +CONNECTION +Box133:Widget:Box44:Widget5 +NumberOfControlPoints:0 +CONNECTION +Box62:MeshManagerModel:Box134:MeshManagerModel +NumberOfControlPoints:0 +CONNECTION +Box122:BoxChange:Box134:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box131:BoxChange:Box137:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box132:BoxChange:Box138:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box62:MeshManagerModel:Box138:MeshManagerModel +NumberOfControlPoints:0 +CONNECTION +Box62:MeshManagerModel:Box137:MeshManagerModel +NumberOfControlPoints:0 +CONNECTION +Box50:Out:Box89:Active +NumberOfControlPoints:0 +CONNECTION +Box95:Out:Box58:Origin +NumberOfControlPoints:0 +CONNECTION +Box58:BoxChange:Box61:In2 +NumberOfControlPoints:0 +CONNECTION +Box58:BoxChange:Box89:BoxExecute +NumberOfControlPoints:0 +CONNECTION +Box122:Out:Box134:StringParam +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs index b3dfcaf..1d13c17 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box) -# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs +# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyDeformation.bbs # ---------------------------------- include std @@ -120,6 +120,7 @@ new creaVtk:PlaneWidget_Base Box60 new std:MultipleInputs Box61 new creaVtk:MeshManager Box62 + set Box62.MemoryMode "true" new std:MultipleInputs Box73 @@ -144,6 +145,7 @@ new std:MathOperationVector Box88 set Box88.Type "3" new creaMaracasVisu:SetPosition Box89 + set Box89.Active "false" new creaMaracasVisu:wxVtkBaseView_info_tool Box90 set Box90.Type "1" @@ -256,6 +258,27 @@ new wx:OutputText Box129 new wx:OutputText Box130 +new wx:CommandButton Box131 + set Box131.Label "Undo" + +new wx:CommandButton Box132 + set Box132.Label "Redo" + +new wx:LayoutLine Box133 + set Box133.Orientation "H" + +new creaVtk:MeshManager_tool Box134 + set Box134.BoxProcessMode "Manual" + set Box134.Tool "37" + +new creaVtk:MeshManager_tool Box137 + set Box137.BoxProcessMode "Manual" + set Box137.Tool "10" + +new creaVtk:MeshManager_tool Box138 + set Box138.BoxProcessMode "Manual" + set Box138.Tool "20" + connect Box66.Out Box11.Renderer connect Box66.Out Box37.render @@ -282,7 +305,6 @@ connect Box58.Base Box60.In connect Box53.BoxChange Box57.BoxExecute connect Box54.BoxChange Box60.BoxExecute connect Box49.BoxChange Box61.In1 -connect Box58.BoxChange Box61.In2 connect Box67.Out Box62.Mesh connect Box62.MeshManagerModel Box48.MeshManagerModel connect Box50.Out Box37.active @@ -298,7 +320,6 @@ connect Box78.Out Box75.Point connect Box58.Center Box88.In0 connect Box83.Spacing Box88.In1 connect Box88.Out Box89.Point -connect Box58.BoxChange Box89.BoxExecute connect Box76.InteractorwxVtkBaseView_model Box90.InteractorwxVtkBaseView_model connect Box76.InteractorwxVtkBaseView_model2 Box90.InteractorwxVtkBaseView_model2 connect Box64.Out Box90.wxVtkBaseView @@ -313,14 +334,12 @@ connect Box75.PointId Box87.In connect Box75.Normal Box86.In connect Box75.PointOut Box85.In connect Box96.wxVtkBaseView Box89.wxVtkBaseView -connect Box50.Out Box89.Active connect Box96.vtkRenderer Box92.Renderer connect Box92.Point Box85.In1 connect Box92.PointId Box87.In1 connect Box92.Normal Box86.In1 connect Box75.PointOut Box94.In1 connect Box95.Box_ConcatStrings Box94.Box_ConcatString -connect Box95.Out Box58.Origin connect Box98.Box_ConcatStrings Box97.Box_ConcatString connect Box92.Normal Box97.In1 connect Box95.Box_ConcatStrings Box99.Box_ConcatString @@ -407,6 +426,20 @@ connect Box125.Widget Box128.Widget2 connect Box127.Widget Box128.Widget4 connect Box129.Widget Box125.Widget9 connect Box130.Widget Box127.Widget9 +connect Box131.Widget Box133.Widget2 +connect Box132.Widget Box133.Widget4 +connect Box133.Widget Box44.Widget5 +connect Box62.MeshManagerModel Box134.MeshManagerModel +connect Box122.BoxChange Box134.BoxExecute +connect Box131.BoxChange Box137.BoxExecute +connect Box132.BoxChange Box138.BoxExecute +connect Box62.MeshManagerModel Box138.MeshManagerModel +connect Box62.MeshManagerModel Box137.MeshManagerModel +connect Box50.Out Box89.Active +connect Box95.Out Box58.Origin +connect Box58.BoxChange Box61.In2 +connect Box58.BoxChange Box89.BoxExecute +connect Box122.Out Box134.StringParam # Complex input ports input mesh Box67.In " " -- 2.47.1