From: Eduardo DAVILA Date: Mon, 5 Jun 2023 10:02:34 +0000 (+0200) Subject: #3511 Add Patch option in Mesh_tool_ApplySurface X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=61de0f421eda417716d472107812ff55546b40be;p=creaMaracasVisu.git #3511 Add Patch option in Mesh_tool_ApplySurface --- diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg index 568bcb5..b7d1951 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBG BlackBox Diagram file -# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg # ---------------------------------- APP_START @@ -72,12 +72,12 @@ COMPLEX_PORT meshmanagermodel -150.374274:130.740991:-900.000000 FIN_COMPLEX_PORT -BOXES:69 +BOXES:70 BOX creaMaracasVisu:ShowNPoints:showNpoints ISEXEC:FALSE -24.787568:83.025910:-900.000000 -61.627568:80.525910:-900.000000 +26.647528:81.320946:-900.000000 +63.487528:78.820946:-900.000000 PORT Radio:"2" PORT @@ -88,8 +88,8 @@ FIN_BOX BOX creaVtk:CreateMeshFromPoints:Box04 ISEXEC:FALSE -29.752185:-0.390826:-900.000000 -52.607185:-2.890826:-900.000000 +28.357215:-1.010813:-900.000000 +51.212215:-3.510813:-900.000000 FIN_BOX BOX creaMaracasVisu:ManualContourModel_Box:Box06 @@ -150,8 +150,8 @@ FIN_BOX BOX std:AddStringToVector:Box58 ISEXEC:FALSE --304.297403:100.641432:-900.000000 --279.777403:98.141432:-900.000000 +-320.426360:96.890512:-900.000000 +-295.906360:94.390512:-900.000000 PORT In0:"+ Add point" PORT @@ -171,7 +171,7 @@ In7:"+> Insert group after" PORT In8:"- Delete group" PORT -In9:"Tool - Inverse Normals" +In9:"Tool - 3 or 4 points to surface" FIN_BOX BOX creaMaracasVisu:ShowNPoints_Tools:Box60 @@ -244,8 +244,8 @@ FIN_BOX BOX creaMaracasVisu:PolyDataToActor_Widget:Box48 ISEXEC:FALSE -2.746015:-16.179561:-900.000000 -25.766015:-18.679561:-900.000000 +2.281025:-25.169370:-900.000000 +25.301025:-27.669370:-900.000000 FIN_BOX BOX vtk:vtkImageDataPointerRelay:Box35 @@ -514,8 +514,8 @@ FIN_BOX BOX std:AddStringToVector:Box99 ISEXEC:FALSE --309.024176:108.151656:-900.000000 --284.504176:105.651656:-900.000000 +-300.772152:108.901840:-900.000000 +-276.252152:106.401840:-900.000000 PORT In0:"Auto Add Points (Start/Stop)" FIN_BOX @@ -525,9 +525,9 @@ ISEXEC:FALSE -265.790737:67.872984:-900.000000 -237.750737:65.372984:-900.000000 PORT -In0:"0 1 2 3 4 5 6 7 8 9 10 " +In0:"0 1 2 3 4 5 6 7 8 9 10 11" PORT -In1:"1 5 10 20 30 40 50 0 100 110 210" +In1:"1 5 10 20 30 40 50 0 100 110 200 210" PORT Type:"2" FIN_BOX @@ -641,7 +641,15 @@ Orientation:"V" PORT WinTitle:"1.3 Apply Changes" FIN_BOX -CONNECTIONS:144 +BOX +std:AddStringToVector:Box115 +ISEXEC:FALSE +-303.164612:89.794401:-900.000000 +-278.644612:87.294401:-900.000000 +PORT +In0:"Tool - Inverse Normals" +FIN_BOX +CONNECTIONS:147 CONNECTION Box06:LstContourPointsX:Box04:LstX NumberOfControlPoints:0 @@ -679,9 +687,6 @@ CONNECTION Box31:BoxChange:Box11:BoxExecute NumberOfControlPoints:0 CONNECTION -Box58:Out:Box57:In -NumberOfControlPoints:0 -CONNECTION showNpoints:WidgetShowNPoints:Box60:WidgetShowNPoints NumberOfControlPoints:0 CONNECTION @@ -742,9 +747,6 @@ CONNECTION Box67:Out:Box77:In1 NumberOfControlPoints:0 CONNECTION -Box04:Out:Box48:polydata -NumberOfControlPoints:0 -CONNECTION Box66:Out:Box48:render NumberOfControlPoints:0 CONNECTION @@ -1074,4 +1076,19 @@ NumberOfControlPoints:0 CONNECTION Box114:Widget:Box82:Widget3 NumberOfControlPoints:0 +CONNECTION +Box105:Out:Box48:polydata +NumberOfControlPoints:0 +CONNECTION +Box58:Out:Box115:StringVector +NumberOfControlPoints:0 +CONNECTION +Box115:Out:Box57:In +NumberOfControlPoints:0 +CONNECTION +Box67:Out:Box60:Mesh +NumberOfControlPoints:0 +CONNECTION +Box49:OutString:Box29:BoxProcessMode +NumberOfControlPoints:0 APP_END diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs index 08da796..f5b6369 100644 --- a/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs +++ b/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs @@ -1,6 +1,6 @@ # ---------------------------------- # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box) -# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs +# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs # ---------------------------------- include std @@ -56,7 +56,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" + set Box58.In9 "Tool - 3 or 4 points to surface" new creaMaracasVisu:ShowNPoints_Tools Box60 @@ -186,8 +186,8 @@ new std:AddStringToVector Box99 set Box99.In0 "Auto Add Points (Start/Stop)" new std:VectorFilterString Box100 - set Box100.In0 "0 1 2 3 4 5 6 7 8 9 10 " - set Box100.In1 "1 5 10 20 30 40 50 0 100 110 210" + set Box100.In0 "0 1 2 3 4 5 6 7 8 9 10 11" + set Box100.In1 "1 5 10 20 30 40 50 0 100 110 200 210" set Box100.Type "2" new std:ConcatStrings Box101 @@ -233,6 +233,9 @@ new wx:LayoutLine Box114 set Box114.Orientation "V" set Box114.WinTitle "1.3 Apply Changes" +new std:AddStringToVector Box115 + set Box115.In0 "Tool - Inverse Normals" + connect Box06.LstContourPointsX Box04.LstX connect showNpoints.lstIndexs Box06.LstIndexsIn @@ -246,7 +249,6 @@ connect Box29.LstContourPointsY Box30.lstPointY connect Box29.LstContourPointsZ Box30.lstPointZ connect Box29.LstIndexsOut Box30.lstIndexs connect Box31.BoxChange Box11.BoxExecute -connect Box58.Out Box57.In connect showNpoints.WidgetShowNPoints Box60.WidgetShowNPoints connect Box57.BoxChange Box60.BoxExecute connect Box68.Spacing Box60.Spacing @@ -264,7 +266,6 @@ connect Box66.Out Box11.Renderer connect Box66.Out Box30.Renderer connect Box66.Out showNpoints.Renderer connect Box67.Out Box77.In1 -connect Box04.Out Box48.polydata connect Box66.Out Box48.render connect showNpoints.BoxChange Box31.BoxExecute connect Box48.boxchange Box31.In1 @@ -363,6 +364,11 @@ connect Box113.Out Box97.In connect Box04.Out Box77.In2 connect Box42.Widget Box114.Widget2 connect Box114.Widget Box82.Widget3 +connect Box105.Out Box48.polydata +connect Box58.Out Box115.StringVector +connect Box115.Out Box57.In +connect Box67.Out Box60.Mesh +connect Box49.OutString Box29.BoxProcessMode # Complex input ports input point showNpoints.In " " diff --git a/bbtk/src/bbmaracasvisuShowNPoints.cxx b/bbtk/src/bbmaracasvisuShowNPoints.cxx index bca02d7..5103f9c 100644 --- a/bbtk/src/bbmaracasvisuShowNPoints.cxx +++ b/bbtk/src/bbmaracasvisuShowNPoints.cxx @@ -111,9 +111,9 @@ void ShowNPoints::Process() mwxwidget->SetOpacity( bbGetInputOpacity() ); mwxwidget->SetRadio( bbGetInputRadio() ); - if (firsttime==true) - { - firsttime=false; +// if (firsttime==true) +// { +// firsttime=false; if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==false ) { mwxwidget->DetectCollectionActive(); @@ -123,7 +123,7 @@ void ShowNPoints::Process() mwxwidget->GetModelShowNPoints()->SetFirstTime(false); mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() , bbGetInputInitLstIndexs() ); } - } // firsttime OJO machete Eduardo pour Adreas a verificar +// } // firsttime OJO machete Eduardo pour Adreas a verificar mwxwidget->AutoAddPoints(); mwxwidget->TrackingPoint();