# ----------------------------------
# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
# ----------------------------------
APP_START
meshmanagermodel
-150.374274:130.740991:-900.000000
FIN_COMPLEX_PORT
-BOXES:81
+BOXES:83
BOX
creaMaracasVisu:ShowNPoints:showNpoints
ISEXEC:FALSE
-24.787568:83.025910:-900.000000
-61.627568:80.525910:-900.000000
+-20.157943:99.596730:-900.000000
+16.682057:97.096730:-900.000000
PORT
Radio:"2"
PORT
BOX
std:MultipleInputs:Box31
ISEXEC:FALSE
-18.992085:-64.219001:-900.000000
-40.962085:-66.719001:-900.000000
+-257.036910:-81.243816:-900.000000
+-235.066910:-83.743816:-900.000000
FIN_BOX
BOX
creaMaracasVisu:ManualContourModel_Box:Box29
BOX
creaMaracasVisu:ShowNPoints_Tools:Box60
ISEXEC:FALSE
--271.997629:60.063100:-900.000000
--249.562629:57.563100:-900.000000
+-273.132617:53.934167:-900.000000
+-250.697617:51.434167:-900.000000
FIN_BOX
BOX
vtk:ImageVtkProperties:Box68
BOX
wx:LayoutLine:Box101
ISEXEC:FALSE
-75.262796:-54.319784:-900.000000
-108.582796:-56.819784:-900.000000
+78.195133:-42.092223:-900.000000
+111.515133:-44.592223:-900.000000
PORT
Orientation:"V"
FIN_BOX
BOX
wx:CommandButton:Box121
ISEXEC:FALSE
--390.668472:-8.967632:-900.000000
--368.283472:-11.467632:-900.000000
+-390.668472:4.266324:-900.000000
+-368.283472:1.766324:-900.000000
PORT
Label:"+"
FIN_BOX
BOX
wx:CommandButton:Box127
ISEXEC:FALSE
--322.149651:-11.922729:-900.000000
--299.764651:-14.422729:-900.000000
+-324.646624:4.307594:-900.000000
+-302.261624:1.807594:-900.000000
PORT
Label:"-"
FIN_BOX
PORT
In2:" -1"
FIN_BOX
-CONNECTIONS:168
+BOX
+std:MultipleInputs:Box126
+ISEXEC:FALSE
+-262.331700:-55.177234:-900.000000
+-240.251700:-57.677234:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box129
+ISEXEC:FALSE
+-363.353902:-10.160808:-900.000000
+-330.033902:-12.660808:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:172
CONNECTION
Box06:LstContourPointsX:Box04:LstX
NumberOfControlPoints:0
Box66:Out:Box48:render
NumberOfControlPoints:0
CONNECTION
-showNpoints:BoxChange:Box31:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
Box48:boxchange:Box31:In1
NumberOfControlPoints:0
CONNECTION
Box121:BoxChange:Box120:BoxExecute
NumberOfControlPoints:0
CONNECTION
-Box121:Widget:Box101:Widget5
-NumberOfControlPoints:0
-CONNECTION
Box127:BoxChange:Box128:BoxExecute
NumberOfControlPoints:0
CONNECTION
-Box127:Widget:Box101:Widget6
-NumberOfControlPoints:0
-CONNECTION
Box68:Spacing:Box128:Spacing
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box128:BoxChange:Box31:In5
NumberOfControlPoints:0
+CONNECTION
+showNpoints:BoxChange:Box126:In4
+NumberOfControlPoints:0
+CONNECTION
+Box128:BoxChange:Box126:In2
+NumberOfControlPoints:0
+CONNECTION
+Box120:BoxChange:Box126:In1
+NumberOfControlPoints:0
+CONNECTION
+Box126:BoxChange:Box31:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box127:Widget:Box129:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box129:Widget:Box101:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box121:Widget:Box129:Widget6
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
# ----------------------------------
include std
new std:ConcatStrings Box131
set Box131.In2 " -1"
+new std:MultipleInputs Box126
+
+new wx:LayoutLine Box129
+ set Box129.Orientation "H"
+
connect Box06.LstContourPointsX Box04.LstX
connect showNpoints.lstIndexs Box06.LstIndexsIn
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
connect Box35.Out Box68.In
connect Box68.Spacing Box70.k1
connect Box68.Spacing Box120.Spacing
connect showNpoints.WidgetShowNPoints Box120.WidgetShowNPoints
connect Box121.BoxChange Box120.BoxExecute
-connect Box121.Widget Box101.Widget5
connect Box127.BoxChange Box128.BoxExecute
-connect Box127.Widget Box101.Widget6
connect Box68.Spacing Box128.Spacing
connect showNpoints.WidgetShowNPoints Box128.WidgetShowNPoints
connect Box60.Out Box130.In1
connect Box131.Out Box128.Params
connect Box120.BoxChange Box31.In3
connect Box128.BoxChange Box31.In5
+connect showNpoints.BoxChange Box126.In4
+connect Box128.BoxChange Box126.In2
+connect Box120.BoxChange Box126.In1
+connect Box126.BoxChange Box31.BoxExecute
+connect Box127.Widget Box129.Widget4
+connect Box129.Widget Box101.Widget7
+connect Box121.Widget Box129.Widget6
# Complex input ports
input point showNpoints.In " "
normal.push_back(params[1]);
normal.push_back(params[2]);
- int direction = -params[3];
+ int direction = -3 * params[3];
WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
wsp->GetCollectionPoint(1,1, centerPoint);
- modPoint.push_back(centerPoint[0] + direction*normal[0]);
- modPoint.push_back(centerPoint[1] + direction*normal[1]);
- modPoint.push_back(centerPoint[2] + direction*normal[2]);
+ modPoint.push_back(centerPoint[0] + direction * normal[0]);
+ modPoint.push_back(centerPoint[1] + direction * normal[1]);
+ modPoint.push_back(centerPoint[2] + direction * normal[2]);
wsp->SetCollectionPoint(1, 1, modPoint);
wsp->GetViewShowNPoints()->RefreshPoints();
+
+ // --- Finish ---
+ wsp->SetOutputBox();
+ wsp->UndoRedo_SaveCollection();
}else{
printf("PG ShowNPoints_Tools::MovePatchCenter() Warning params are wrong. Need 4: normal x y z and direction of movement (1 or -1)\n");
}