]> Creatis software - creaMaracasVisu.git/commitdiff
#3506 New Tool Cut Surface
authorPablo Garzon <garzon@ei-pfe-706.creatis.insa-lyon.fr>
Thu, 13 Apr 2023 10:08:56 +0000 (12:08 +0200)
committerPablo Garzon <garzon@ei-pfe-706.creatis.insa-lyon.fr>
Thu, 13 Apr 2023 10:08:56 +0000 (12:08 +0200)
bbtk/bbs/boxes/Mesh_Application.bbg
bbtk/bbs/boxes/Mesh_Application.bbs
bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg [new file with mode: 0644]
bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs [new file with mode: 0644]
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx

index 281c5ca8d9c63313bfaf357913e912ef9454c35a..cc19821f62e2bfb55f1f993ef1806f664b045c33 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /home/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_Application.bbg
+# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_Application.bbg
 # ----------------------------------
 
 APP_START
@@ -56,7 +56,7 @@ COMPLEX_PORT
 wxvtkbaseview4_In
 206.922345:93.364879:-900.000000
 FIN_COMPLEX_PORT
-BOXES:53
+BOXES:56
 BOX
 creaMaracasVisu:ImageChangeInformation:Box07
 ISEXEC:FALSE
@@ -73,7 +73,7 @@ BOX
 creaMaracasVisu:PolyDataToActor_Widget:Box15
 ISEXEC:FALSE
 -104.267222:-30.685106:-900.000000
--80.678442:-33.185106:-900.000000
+-81.247222:-33.185106:-900.000000
 PORT
 color:"1 0.7 0.7"
 PORT
@@ -93,27 +93,27 @@ BOX
 wx:LayoutSplit:Box11
 ISEXEC:FALSE
 -96.149542:-151.649281:-900.000000
--71.246729:-154.149281:-900.000000
+-73.389542:-154.149281:-900.000000
 PORT
 Proportion:"5"
 FIN_BOX
 BOX
 wx:LayoutTab:Box12
 ISEXEC:FALSE
-134.740588:-25.816081:-900.000000
-168.060588:-28.316081:-900.000000
+127.242069:-31.715040:-900.000000
+160.562069:-34.215040:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:SetPositionPointPicker:Box13
 ISEXEC:FALSE
 -138.511818:-28.191873:-900.000000
--85.883220:-30.691873:-900.000000
+-115.781818:-30.691873:-900.000000
 FIN_BOX
 BOX
 wx:LayoutLine:Box14
 ISEXEC:FALSE
 -34.558347:-6.679515:-900.000000
--12.898347:-9.179515:-900.000000
+-1.238347:-9.179515:-900.000000
 PORT
 WinTitle:"Nothing"
 FIN_BOX
@@ -129,13 +129,13 @@ BOX
 wx:LayoutTab:Box20
 ISEXEC:FALSE
 -97.190069:-143.295975:-900.000000
--60.765693:-145.795975:-900.000000
+-63.870069:-145.795975:-900.000000
 FIN_BOX
 BOX
 wx:LayoutLine:Box22
 ISEXEC:FALSE
 -100.046840:-134.742726:-900.000000
--61.002585:-137.242726:-900.000000
+-66.726840:-137.242726:-900.000000
 PORT
 Orientation:"H"
 PORT
@@ -153,11 +153,11 @@ In1:"false  true   false  false  false false"
 PORT
 In2:"false  false  true   false  false false"
 PORT
-In3:"false  false  false   false  false false"
+In3:"false  false  false   true  false false"
 PORT
-In4:"false  false  false   false  true  false"
+In4:"false  false  false   false  false  false"
 PORT
-In5:"false  false  false   false  false false"
+In5:"false  false  false   false  true  false"
 PORT
 In6:"false  false  false   false  false false"
 PORT
@@ -185,13 +185,13 @@ BOX
 vtk:SurfaceTexture:Box26
 ISEXEC:FALSE
 -145.884447:-3.104612:-900.000000
--80.395968:-5.604612:-900.000000
+-123.824447:-5.604612:-900.000000
 FIN_BOX
 BOX
 wx:RadioButton:Box27
 ISEXEC:FALSE
 -138.054594:54.648057:-900.000000
--60.483220:52.148057:-900.000000
+-101.214594:52.148057:-900.000000
 PORT
 In0:"Red"
 PORT
@@ -203,13 +203,13 @@ BOX
 std:MultipleInputs:Box28
 ISEXEC:FALSE
 -155.246087:44.364360:-900.000000
--77.665609:41.864360:-900.000000
+-133.276087:41.864360:-900.000000
 FIN_BOX
 BOX
 std:StringSelect:Box29
 ISEXEC:FALSE
 -108.969636:14.830202:-900.000000
--70.434298:12.330202:-900.000000
+-84.449636:12.330202:-900.000000
 PORT
 In0:"false"
 PORT
@@ -221,7 +221,7 @@ BOX
 std:Add:Box30
 ISEXEC:FALSE
 -133.940296:18.182303:-900.000000
--88.248400:15.682303:-900.000000
+-112.905296:15.682303:-900.000000
 PORT
 In2:"-1"
 FIN_BOX
@@ -229,13 +229,13 @@ BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box31
 ISEXEC:FALSE
 -111.518153:35.023891:-900.000000
--67.911190:32.523891:-900.000000
+-84.238153:32.523891:-900.000000
 FIN_BOX
 BOX
 std:GetVectorDoubleElement:Box32
 ISEXEC:FALSE
 -185.764370:25.475119:-900.000000
--90.594531:22.975119:-900.000000
+-162.639370:22.975119:-900.000000
 PORT
 I:"1"
 FIN_BOX
@@ -243,7 +243,7 @@ BOX
 std:GetVectorDoubleElement:Box33
 ISEXEC:FALSE
 -154.849811:22.322554:-900.000000
--88.146645:19.822554:-900.000000
+-131.724811:19.822554:-900.000000
 PORT
 I:"0"
 FIN_BOX
@@ -251,7 +251,7 @@ BOX
 wx:LayoutLine:Box34
 ISEXEC:FALSE
 -208.241265:-123.706763:-900.000000
--69.530705:-126.206763:-900.000000
+-174.921265:-126.206763:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:Mesh_tool_ApplyPatch:Box38
@@ -267,7 +267,7 @@ ISEXEC:FALSE
 -1.791941:-44.880446:-900.000000
 21.163059:-47.380446:-900.000000
 PORT
-I:"2"
+I:"3"
 FIN_BOX
 BOX
 creaMaracasVisu:InteractorStyleMaracas_Model:Box40
@@ -295,7 +295,7 @@ BOX
 creaVtk:PlaneWidget:Box48
 ISEXEC:FALSE
 -145.259232:-61.985653:-900.000000
--78.635968:-64.485653:-900.000000
+-123.414232:-64.485653:-900.000000
 PORT
 ReactiveType:"0"
 PORT
@@ -307,7 +307,7 @@ BOX
 creaVtk:PlaneWidget_Base:Box49
 ISEXEC:FALSE
 -286.533170:-79.025808:-900.000000
--98.569903:-81.525808:-900.000000
+-264.123170:-81.525808:-900.000000
 PORT
 Param:"-1"
 PORT
@@ -317,7 +317,7 @@ BOX
 creaVtk:PlaneWidget_Base:Box50
 ISEXEC:FALSE
 -253.995440:-80.358971:-900.000000
--95.964088:-82.858971:-900.000000
+-231.585440:-82.858971:-900.000000
 PORT
 Param:"1"
 PORT
@@ -327,7 +327,7 @@ BOX
 wx:CommandButton:Box51
 ISEXEC:FALSE
 -287.789041:-65.458170:-900.000000
--88.088867:-67.958170:-900.000000
+-265.514041:-67.958170:-900.000000
 PORT
 Label:"-"
 FIN_BOX
@@ -335,7 +335,7 @@ BOX
 wx:CommandButton:Box52
 ISEXEC:FALSE
 -251.116181:-64.335441:-900.000000
--85.246160:-66.835441:-900.000000
+-228.841181:-66.835441:-900.000000
 PORT
 Label:"+"
 FIN_BOX
@@ -343,7 +343,7 @@ BOX
 wx:LayoutLine:Box53
 ISEXEC:FALSE
 -190.138796:-112.361388:-900.000000
--68.109352:-114.861388:-900.000000
+-156.818796:-114.861388:-900.000000
 PORT
 Orientation:"H"
 FIN_BOX
@@ -351,7 +351,7 @@ BOX
 wx:CheckBox:Box54
 ISEXEC:FALSE
 -211.761741:-50.048031:-900.000000
--82.087597:-52.548031:-900.000000
+-190.131741:-52.548031:-900.000000
 PORT
 In:"false"
 PORT
@@ -361,7 +361,7 @@ BOX
 std:MultipleInputs:Box55
 ISEXEC:FALSE
 -150.826236:-42.647094:-900.000000
--77.270789:-45.147094:-900.000000
+-128.856236:-45.147094:-900.000000
 FIN_BOX
 BOX
 creaVtk:PolyDataNormals:Box56
@@ -389,13 +389,13 @@ BOX
 creaMaracasVisu:SetPosition:Box59
 ISEXEC:FALSE
 -141.049598:-108.060523:-900.000000
--85.360112:-110.560523:-900.000000
+-119.389598:-110.560523:-900.000000
 FIN_BOX
 BOX
 std:MathOperationVector:Box60
 ISEXEC:FALSE
 -133.238482:-99.296683:-900.000000
--72.408400:-101.796683:-900.000000
+-108.718482:-101.796683:-900.000000
 PORT
 Type:"3"
 FIN_BOX
@@ -403,7 +403,7 @@ BOX
 vtk:ImageVtkProperties:Box61
 ISEXEC:FALSE
 -124.789103:-78.215157:-900.000000
--79.497723:-80.715157:-900.000000
+-102.254103:-80.715157:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box63
@@ -477,7 +477,29 @@ ISEXEC:FALSE
 PORT
 title:"External Mask"
 FIN_BOX
-CONNECTIONS:152
+BOX
+creaMaracasVisu:Mesh_tool_ApplyCut:Box74
+ISEXEC:FALSE
+245.605306:-5.522601:-900.000000
+268.230306:-8.022601:-900.000000
+PORT
+title:"Cut"
+FIN_BOX
+BOX
+std:GetVectorStringElement:Box75
+ISEXEC:FALSE
+139.207514:-46.961264:-900.000000
+162.162514:-49.461264:-900.000000
+PORT
+I:"2"
+FIN_BOX
+BOX
+creaMaracasVisu:InteractorStyleMaracas_Model:Box76
+ISEXEC:FALSE
+143.256695:-61.192764:-900.000000
+166.861695:-63.692764:-900.000000
+FIN_BOX
+CONNECTIONS:169
 CONNECTION
 Box08:MeshBase:Box15:polydata
 NumberOfControlPoints:0
@@ -934,4 +956,55 @@ NumberOfControlPoints:0
 CONNECTION
 Box73:widget:Box12:Widget9
 NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box74:wxvtkbaseview4
+NumberOfControlPoints:0
+CONNECTION
+Box68:Out:Box74:wxvtkbaseview3
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box74:wxvtkbaseview2
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box74:wxvtkbaseview1
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box74:point
+NumberOfControlPoints:0
+CONNECTION
+Box63:BoxChange:Box74:boxChange
+NumberOfControlPoints:0
+CONNECTION
+Box08:MeshTemp:Box74:mesh
+NumberOfControlPoints:0
+CONNECTION
+Box08:MeshManagerModel:Box74:meshmanagermodel
+NumberOfControlPoints:0
+CONNECTION
+Box07:Out:Box74:image
+NumberOfControlPoints:0
+CONNECTION
+Box74:widget:Box12:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box23:Out:Box75:In
+NumberOfControlPoints:0
+CONNECTION
+Box75:Out:Box76:Active
+NumberOfControlPoints:0
+CONNECTION
+Box74:interactorStyleMaracas:Box76:InteractorStyleMaracas
+NumberOfControlPoints:0
+CONNECTION
+Box74:interactorStyleMaracas2:Box76:InteractorStyleMaracas2
+NumberOfControlPoints:0
+CONNECTION
+Box74:interactorStyleMaracas3:Box76:InteractorStyleMaracas3
+NumberOfControlPoints:0
+CONNECTION
+Box74:interactorStyleMaracas4:Box76:InteractorStyleMaracas4
+NumberOfControlPoints:0
+CONNECTION
+Box12:BoxChange:Box76:BoxExecute
+NumberOfControlPoints:0
 APP_END
index 69727d80d3129b3f4996537a16272fe0beefe980..6d61ac4ccb85aaba139189704948eb10a54bda6b 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
-# - /home/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_Application.bbs
+# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_Application.bbs
 # ----------------------------------
 
 include std
@@ -53,9 +53,9 @@ new std:StringSelect Box23
   set Box23.In0 "false  false  false  false  false false"
   set Box23.In1 "false  true   false  false  false false"
   set Box23.In2 "false  false  true   false  false false"
-  set Box23.In3 "false  false  false   false  false false"
-  set Box23.In4 "false  false  false   false  true  false"
-  set Box23.In5 "false  false  false   false  false false"
+  set Box23.In3 "false  false  false   true  false false"
+  set Box23.In4 "false  false  false   false  false  false"
+  set Box23.In5 "false  false  false   false  true  false"
   set Box23.In6 "false  false  false   false  false false"
   set Box23.In7 "false  false  false   false  false false"
   set Box23.In8 "false  false  false   false  false false"
@@ -97,7 +97,7 @@ new creaMaracasVisu:Mesh_tool_ApplyPatch Box38
   set Box38.title "Patch"
 
 new std:GetVectorStringElement Box39
-  set Box39.I "2"
+  set Box39.I "3"
 
 new creaMaracasVisu:InteractorStyleMaracas_Model Box40
 
@@ -175,6 +175,14 @@ new creaMaracasVisu:InteractorStyleMaracas_Model Box72
 new creaMaracasVisu:Mesh_tool_ApplyExternalMask Box73
   set Box73.title "External Mask"
 
+new creaMaracasVisu:Mesh_tool_ApplyCut Box74
+  set Box74.title "Cut"
+
+new std:GetVectorStringElement Box75
+  set Box75.I "2"
+
+new creaMaracasVisu:InteractorStyleMaracas_Model Box76
+
 
 connect Box08.MeshBase Box15.polydata
 connect Box08.MeshTemp Box10.mesh
@@ -317,6 +325,23 @@ connect Box46.widget Box12.Widget6
 connect Box47.widget Box12.Widget7
 connect Box70.widget Box12.Widget8
 connect Box73.widget Box12.Widget9
+connect Box69.Out Box74.wxvtkbaseview4
+connect Box68.Out Box74.wxvtkbaseview3
+connect Box67.Out Box74.wxvtkbaseview2
+connect Box66.Out Box74.wxvtkbaseview1
+connect Box64.Out Box74.point
+connect Box63.BoxChange Box74.boxChange
+connect Box08.MeshTemp Box74.mesh
+connect Box08.MeshManagerModel Box74.meshmanagermodel
+connect Box07.Out Box74.image
+connect Box74.widget Box12.Widget4
+connect Box23.Out Box75.In
+connect Box75.Out Box76.Active
+connect Box74.interactorStyleMaracas Box76.InteractorStyleMaracas
+connect Box74.interactorStyleMaracas2 Box76.InteractorStyleMaracas2
+connect Box74.interactorStyleMaracas3 Box76.InteractorStyleMaracas3
+connect Box74.interactorStyleMaracas4 Box76.InteractorStyleMaracas4
+connect Box12.BoxChange Box76.BoxExecute
 
 # Complex input ports
 input MeshIn Box56.In " "
diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg b/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg
new file mode 100644 (file)
index 0000000..2f5adcb
--- /dev/null
@@ -0,0 +1,1226 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:demo
+DESCRIPTION:Show N Points
+AUTHOR:info-dev@creatis.insa-lyon.fr
+COMPLEXBOX:TRUE
+COMPLEXBOXNAME:Mesh_tool_ApplyCut
+PACKAGENAME:creaMaracasVisu
+COMPLEXOUTPUTS:5
+COMPLEX_PORT
+widget
+-180.910574:-184.919472:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+interactorStyleMaracas
+-307.873556:-187.172927:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+interactorStyleMaracas2
+-300.133711:-186.364707:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+interactorStyleMaracas3
+-293.131686:-185.645050:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+interactorStyleMaracas4
+-285.985042:-186.124821:-900.000000
+FIN_COMPLEX_PORT
+COMPLEXINPUTS:10
+COMPLEX_PORT
+boxChange
+-6.086529:137.355528:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+point
+8.392837:138.613226:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview1
+-268.019084:133.379456:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+mesh
+-59.814076:140.655693:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+image
+-96.062149:138.883434:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview2
+-231.668448:132.854505:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview3
+-216.690458:133.262996:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+wxvtkbaseview4
+-193.414893:132.224675:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+title
+-167.581636:131.715380:-900.000000
+FIN_COMPLEX_PORT
+COMPLEX_PORT
+meshmanagermodel
+-150.374274:130.740991:-900.000000
+FIN_COMPLEX_PORT
+BOXES:80
+BOX
+creaMaracasVisu:ShowNPoints:showNpoints
+ISEXEC:FALSE
+24.787568:83.025910:-900.000000
+61.627568:80.525910:-900.000000
+PORT
+Radio:"2"
+PORT
+Type:"4"
+PORT
+WinTitle:"1.1   Splines"
+FIN_BOX
+BOX
+creaVtk:CreateMeshFromPoints:Box04
+ISEXEC:FALSE
+29.752185:-0.390826:-900.000000
+52.607185:-2.890826:-900.000000
+PORT
+CloseSurface:"true"
+FIN_BOX
+BOX
+creaMaracasVisu:ManualContourModel_Box:Box06
+ISEXEC:FALSE
+29.075845:30.364799:-900.000000
+53.595845:27.864799:-900.000000
+PORT
+DoubleContour:"1"
+PORT
+NbPoints:"100"
+PORT
+OpenClose:"true"
+PORT
+OpenClose2:"false"
+FIN_BOX
+BOX
+wx:LayoutLine:Box08
+ISEXEC:FALSE
+-182.125107:-147.642582:-900.000000
+-148.805107:-150.142582:-900.000000
+FIN_BOX
+BOX
+vtk:UpdateRender:Box11
+ISEXEC:FALSE
+8.762877:-56.586914:-900.000000
+30.787877:-59.086914:-900.000000
+PORT
+Active:"true"
+FIN_BOX
+BOX
+creaMaracasVisu:DrawAxisTree3D:Box30
+ISEXEC:FALSE
+66.011927:-0.645212:-900.000000
+94.051927:-3.145212:-900.000000
+PORT
+Colour:"0 0 1"
+PORT
+LineWidth:"2"
+FIN_BOX
+BOX
+std:MultipleInputs:Box31
+ISEXEC:FALSE
+14.774837:-45.768661:-900.000000
+36.744837:-48.268661:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ManualContourModel_Box:Box29
+ISEXEC:FALSE
+76.240145:29.637449:-900.000000
+100.760145:27.137449:-900.000000
+PORT
+NbPoints:"40"
+PORT
+OpenClose:"true"
+PORT
+OpenClose2:"false"
+FIN_BOX
+BOX
+creaMaracasVisu:wxPopupMenu:Box57
+ISEXEC:FALSE
+-291.724262:77.620511:-900.000000
+-269.659262:75.120511:-900.000000
+PORT
+WithCtrlKey:"true"
+FIN_BOX
+BOX
+std:AddStringToVector:Box58
+ISEXEC:FALSE
+-304.297403:100.641432:-900.000000
+-279.777403:98.141432:-900.000000
+PORT
+In0:"+  Add point"
+PORT
+In1:"(+)  Insert point"
+PORT
+In2:"Track point"
+PORT
+In3:"Set Nearest point"
+PORT
+In4:"-  Erase point"
+PORT
+In5:"--  Delete all points"
+PORT
+In6:"----------------------"
+PORT
+In7:"+>  Insert group after"
+PORT
+In8:"- Delete group"
+PORT
+In9:"Tool - Inverse Normals"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box60
+ISEXEC:FALSE
+-268.618686:51.736786:-900.000000
+-246.183686:49.236786:-900.000000
+FIN_BOX
+BOX
+vtk:ImageVtkProperties:Box68
+ISEXEC:FALSE
+-111.766259:110.196821:-900.000000
+-89.231259:107.696821:-900.000000
+FIN_BOX
+BOX
+std:VectorFilterDouble:Box70
+ISEXEC:FALSE
+49.750242:60.953814:-900.000000
+76.030242:58.453814:-900.000000
+PORT
+Type:"11"
+FIN_BOX
+BOX
+creaVtk:BooleanOperationPolyDataFilter:Box77
+ISEXEC:FALSE
+-89.099426:-23.521803:-900.000000
+-65.369426:-26.021803:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+ReorientDifferenceCells:"false"
+FIN_BOX
+BOX
+wx:ComboBox:Box78
+ISEXEC:FALSE
+-153.877713:-5.775167:-900.000000
+-127.597713:-8.275167:-900.000000
+PORT
+In:"Union Intersection Difference"
+FIN_BOX
+BOX
+wx:LayoutLine:Box79
+ISEXEC:FALSE
+-144.841026:-82.628158:-900.000000
+-111.521026:-85.128158:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"New Surface ( Magenta  =  Red+Yellow )"
+FIN_BOX
+BOX
+wx:CommandButton:Box80
+ISEXEC:FALSE
+-107.184095:21.801731:-900.000000
+-84.909095:19.301731:-900.000000
+PORT
+Label:"Refresh"
+FIN_BOX
+BOX
+std:MagicBox:Box66
+ISEXEC:FALSE
+-148.055989:80.219744:-900.000000
+-126.455989:77.719744:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box67
+ISEXEC:FALSE
+-67.526006:124.007723:-900.000000
+-45.926006:121.507723:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:PolyDataToActor_Widget:Box48
+ISEXEC:FALSE
+2.746015:-16.179561:-900.000000
+25.766015:-18.679561:-900.000000
+FIN_BOX
+BOX
+vtk:vtkImageDataPointerRelay:Box35
+ISEXEC:FALSE
+-107.091396:123.633118:-900.000000
+-83.881396:121.133118:-900.000000
+FIN_BOX
+BOX
+wx:Slider:Box34
+ISEXEC:FALSE
+-198.941120:-3.426364:-900.000000
+-169.141120:-5.926364:-900.000000
+PORT
+In:"50"
+PORT
+Label:"true"
+PORT
+Max:"100"
+PORT
+Min:"0"
+PORT
+ReactiveOnTrack:"true"
+PORT
+Title:"Splines Opacity"
+FIN_BOX
+BOX
+std:Div:Box36
+ISEXEC:FALSE
+-190.788172:-9.261990:-900.000000
+-169.863172:-11.761990:-900.000000
+PORT
+In2:"100"
+FIN_BOX
+BOX
+creaMaracasVisu:PolyDataToActor_Widget:Box37
+ISEXEC:FALSE
+-67.388857:-39.476785:-900.000000
+-44.368857:-41.976785:-900.000000
+PORT
+color:"0 1 1"
+PORT
+meshOpacity:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box38
+ISEXEC:FALSE
+-190.854929:-82.522396:-900.000000
+-157.534929:-85.022396:-900.000000
+PORT
+Orientation:"H"
+PORT
+WinTitle:"Interpolated Surface (Yellow)"
+FIN_BOX
+BOX
+wx:LayoutTab:Box39
+ISEXEC:FALSE
+-195.888488:-89.508403:-900.000000
+-162.568488:-92.008403:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:Box40
+ISEXEC:FALSE
+-148.825313:-89.038628:-900.000000
+-115.505313:-91.538628:-900.000000
+FIN_BOX
+BOX
+wx:CommandButton:Box42
+ISEXEC:FALSE
+-91.903796:13.441695:-900.000000
+-69.628796:10.941695:-900.000000
+PORT
+Label:"Apply  (Magenta->To Red)"
+FIN_BOX
+BOX
+wx:CommandButton:Box43
+ISEXEC:FALSE
+-85.356515:8.083838:-900.000000
+-63.081515:5.583838:-900.000000
+PORT
+Label:"Reset Tool"
+FIN_BOX
+BOX
+wx:LayoutLine:Box44
+ISEXEC:FALSE
+-154.036190:-43.432527:-900.000000
+-120.716190:-45.932527:-900.000000
+PORT
+Orientation:"V"
+PORT
+WinTitle:"1.2   Mesh Action"
+FIN_BOX
+BOX
+creaVtk:MeshManager_tool:Box45
+ISEXEC:FALSE
+-90.848443:-133.408000:-900.000000
+-68.348443:-135.908000:-900.000000
+PORT
+Tool:"30"
+FIN_BOX
+BOX
+std:MagicBox:Box46
+ISEXEC:FALSE
+-137.131256:113.921532:-900.000000
+-115.531256:111.421532:-900.000000
+FIN_BOX
+BOX
+wx:ComboBox:Box49
+ISEXEC:FALSE
+-182.639251:-13.479145:-900.000000
+-156.359251:-15.979145:-900.000000
+PORT
+In:"25 50 100 150"
+PORT
+Selection:"1"
+PORT
+Title:"Number of Points"
+FIN_BOX
+BOX
+wx:LayoutLine:Box50
+ISEXEC:FALSE
+-56.311249:-56.553631:-900.000000
+-22.991249:-59.053631:-900.000000
+PORT
+Orientation:"V"
+PORT
+WinTitle:"Config"
+FIN_BOX
+BOX
+std:MultipleInputs:Box51
+ISEXEC:FALSE
+-92.949669:-148.627142:-900.000000
+-70.979669:-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
+PORT
+Type:"120"
+FIN_BOX
+BOX
+std:MultipleInputs:Box53
+ISEXEC:FALSE
+-96.292390:-13.293248:-900.000000
+-74.322390:-15.793248:-900.000000
+FIN_BOX
+BOX
+std:MultipleInputs:Box55
+ISEXEC:FALSE
+-54.535637:-149.462814:-900.000000
+-32.565637:-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
+PORT
+colorMesh:"1 1 0"
+FIN_BOX
+BOX
+std:MagicBox:Box63
+ISEXEC:FALSE
+-8.402303:123.950335:-900.000000
+13.197697:121.450335:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box64
+ISEXEC:FALSE
+-243.113826:124.330340:-900.000000
+-221.513826:121.830340:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box65
+ISEXEC:FALSE
+-220.296210:124.504415:-900.000000
+-198.696210:122.004415:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box69
+ISEXEC:FALSE
+-197.793508:124.678490:-900.000000
+-176.193508:122.178490:-900.000000
+FIN_BOX
+BOX
+std:MagicBox:Box71
+ISEXEC:FALSE
+-273.359367:124.504415:-900.000000
+-251.759367:122.004415:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:MeshContours_Widget:Box72
+ISEXEC:FALSE
+-180.819147:-56.018495:-900.000000
+-158.024147:-58.518495:-900.000000
+PORT
+colorMesh:"0 1 1"
+FIN_BOX
+BOX
+wx:LayoutLine:Box81
+ISEXEC:FALSE
+-184.734921:-96.564525:-900.000000
+-151.414921:-99.064525:-900.000000
+PORT
+WinTitle:"Step 1.   Surface"
+FIN_BOX
+BOX
+wx:LayoutTab:Box82
+ISEXEC:FALSE
+-142.286608:-51.350487:-900.000000
+-108.966608:-53.850487:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box84
+ISEXEC:FALSE
+-127.611417:-38.148449:-900.000000
+-105.941417:-40.648449:-900.000000
+FIN_BOX
+BOX
+wx:LayoutTab:Box86
+ISEXEC:FALSE
+-57.013911:-62.286670:-900.000000
+-23.693911:-64.786670:-900.000000
+FIN_BOX
+BOX
+creaVtk:MeshManager:Box92
+ISEXEC:FALSE
+-56.608588:-81.789032:-900.000000
+-34.578588:-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
+PORT
+Tool:"35"
+FIN_BOX
+BOX
+std:MagicBox:Box94
+ISEXEC:FALSE
+-70.989776:-33.864327:-900.000000
+-49.389776:-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
+FIN_BOX
+BOX
+creaVtk:PolyDataNormals:Box97
+ISEXEC:FALSE
+-88.026860:-72.332654:-900.000000
+-65.731860:-74.832654:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box98
+ISEXEC:FALSE
+-143.911108:-17.437953:-900.000000
+-110.591108:-19.937953:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:AddStringToVector:Box99
+ISEXEC:FALSE
+-309.024176:108.151656:-900.000000
+-284.504176:105.651656:-900.000000
+PORT
+In0:"Auto Add Points (Start/Stop)"
+FIN_BOX
+BOX
+std:VectorFilterString:Box100
+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    11    12"
+PORT
+In1:"1  5 10 20 30 40 50 0  100   110   210    300   310"
+PORT
+Type:"2"
+FIN_BOX
+BOX
+std:ConcatStrings:Box101
+ISEXEC:FALSE
+-265.899318:61.380437:-900.000000
+-243.139318:58.880437:-900.000000
+FIN_BOX
+BOX
+wx:CheckBox:Box103
+ISEXEC:FALSE
+-7.317202:68.352288:-900.000000
+14.422798:65.852288:-900.000000
+PORT
+In:"false"
+PORT
+ReactiveOnKeystroke:"true"
+PORT
+Title:"Show Normals"
+FIN_BOX
+BOX
+creaVtk:GlyphPolyDataNormals:Box104
+ISEXEC:FALSE
+38.820748:-34.725366:-900.000000
+61.810748:-37.225366:-900.000000
+PORT
+MaskRatio:"2"
+PORT
+Opacity:"1"
+PORT
+Size:"5"
+FIN_BOX
+BOX
+creaVtk:PolyDataNormals:Box105
+ISEXEC:FALSE
+45.173908:-8.891825:-900.000000
+67.578908:-11.391825:-900.000000
+FIN_BOX
+BOX
+std:AddStringToVector:Box113
+ISEXEC:FALSE
+-307.524662:92.578395:-900.000000
+-283.004662:90.078395:-900.000000
+PORT
+In0:"Create expanded surface"
+PORT
+In1:"Create adjustable thickness surface"
+FIN_BOX
+BOX
+std:ConcatStrings:Box114
+ISEXEC:FALSE
+-394.516096:29.248600:-900.000000
+-371.756096:26.748600:-900.000000
+PORT
+In2:" -1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box115
+ISEXEC:FALSE
+-362.131869:29.576639:-900.000000
+-339.371869:27.076639:-900.000000
+PORT
+In2:" 1"
+FIN_BOX
+BOX
+wx:CommandButton:Box116
+ISEXEC:FALSE
+-402.563131:9.856815:-900.000000
+-380.178131:7.356815:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box117
+ISEXEC:FALSE
+-362.697963:9.548441:-900.000000
+-340.312963:7.048441:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box118
+ISEXEC:FALSE
+-401.088249:-8.216654:-900.000000
+-378.543249:-10.716654:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"320"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box119
+ISEXEC:FALSE
+-363.988157:-10.065434:-900.000000
+-341.443157:-12.565434:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"320"
+FIN_BOX
+BOX
+wx:LayoutLine:Box120
+ISEXEC:FALSE
+-382.198143:-41.181829:-900.000000
+-348.878143:-43.681829:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:GetVectorDoubleSubVector:Box121
+ISEXEC:FALSE
+-336.669415:39.830082:-900.000000
+-313.209415:37.330082:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"0"
+PORT
+Size:"3"
+FIN_BOX
+BOX
+std:ConcatStrings:Box123
+ISEXEC:FALSE
+-305.792387:20.683809:-900.000000
+-283.032387:18.183809:-900.000000
+PORT
+In2:" -1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box124
+ISEXEC:FALSE
+-268.999559:20.416092:-900.000000
+-246.239559:17.916092:-900.000000
+PORT
+In2:" 1"
+FIN_BOX
+BOX
+wx:CommandButton:Box125
+ISEXEC:FALSE
+-313.839422:1.292024:-900.000000
+-291.454422:-1.207976:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box126
+ISEXEC:FALSE
+-273.974254:0.983651:-900.000000
+-251.589254:-1.516349:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box127
+ISEXEC:FALSE
+-313.198600:-23.573073:-900.000000
+-290.653600:-26.073073:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"330"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box128
+ISEXEC:FALSE
+-275.264449:-23.992037:-900.000000
+-252.719449:-26.492037:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"330"
+FIN_BOX
+BOX
+std:GetVectorDoubleSubVector:Box130
+ISEXEC:FALSE
+-266.934210:39.860547:-900.000000
+-243.474210:37.360547:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"3"
+PORT
+Size:"3"
+FIN_BOX
+BOX
+wx:LayoutLine:Box131
+ISEXEC:FALSE
+-324.196226:-36.073803:-900.000000
+-290.876226:-38.573803:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+wx:OutputText:Box132
+ISEXEC:FALSE
+-27.642518:-49.394137:-900.000000
+-5.862518:-51.894137:-900.000000
+PORT
+In:"Expand area"
+FIN_BOX
+BOX
+wx:OutputText:Box133
+ISEXEC:FALSE
+-33.056732:-41.461183:-900.000000
+-11.276732:-43.961183:-900.000000
+PORT
+In:"Widen"
+FIN_BOX
+CONNECTIONS:158
+CONNECTION
+Box06:LstContourPointsX:Box04:LstX
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box06:LstIndexsIn
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsY:Box04:LstY
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstContourPointsZ:Box04:LstZ
+NumberOfControlPoints:0
+CONNECTION
+Box06:LstIndexsOut:Box04:LstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box30:BoxChange:Box31:In4
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box29:LstIndexsIn
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsX:Box30:lstPointX
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsY:Box30:lstPointY
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstContourPointsZ:Box30:lstPointZ
+NumberOfControlPoints:0
+CONNECTION
+Box29:LstIndexsOut:Box30:lstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box31:BoxChange:Box11:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box60:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box60:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box60:Spacing
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsX:Box70:In0
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsY:Box70:In1
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsZ:Box70:In2
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box06:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box06:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box06:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box29:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box29:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box29:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box78:Out:Box77:Operation
+NumberOfControlPoints:0
+CONNECTION
+Box08:Widget:widget:widget
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box11:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box30:Renderer
+NumberOfControlPoints:0
+CONNECTION
+point:point:showNpoints:In
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:showNpoints:Renderer
+NumberOfControlPoints:0
+CONNECTION
+mesh:mesh:Box67:In
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box77:In1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box48:polydata
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box48:render
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:BoxChange:Box31:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box48:boxchange:Box31:In1
+NumberOfControlPoints:0
+CONNECTION
+image:image:Box35:In
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:Box68:In
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box70:k1
+NumberOfControlPoints:0
+CONNECTION
+Box35:Out:showNpoints:Image
+NumberOfControlPoints:0
+CONNECTION
+Box34:Out:Box36:In1
+NumberOfControlPoints:0
+CONNECTION
+Box36:Out:Box30:Opacity
+NumberOfControlPoints:0
+CONNECTION
+Box34:BoxChange:Box31:In2
+NumberOfControlPoints:0
+CONNECTION
+title:title:Box08:WinTitle
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box37:render
+NumberOfControlPoints:0
+CONNECTION
+Box38:Widget:Box39:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box79:Widget:Box40:Widget2
+NumberOfControlPoints:0
+CONNECTION
+meshmanagermodel:meshmanagermodel:Box46:In
+NumberOfControlPoints:0
+CONNECTION
+Box46:Out:Box45:MeshManagerModel
+NumberOfControlPoints:0
+CONNECTION
+Box49:OutString:Box06:NbPoints
+NumberOfControlPoints:0
+CONNECTION
+Box42:BoxChange:Box51:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box45:BoxChange:Box51:In2
+NumberOfControlPoints:0
+CONNECTION
+Box52:BoxChange:Box51:In4
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box52:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box80:BoxChange:Box53:In2
+NumberOfControlPoints:0
+CONNECTION
+Box53:BoxChange:Box77:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box42:BoxChange:Box53:In3
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box55:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box52:BoxChange:Box55:In2
+NumberOfControlPoints:0
+CONNECTION
+Box43:BoxChange:Box53:In6
+NumberOfControlPoints:0
+CONNECTION
+boxChange:boxChange:Box63:In
+NumberOfControlPoints:0
+CONNECTION
+Box63:BoxChange:showNpoints:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box63:BoxChange:Box62:_execute
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview2:wxvtkbaseview2:Box64:In
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box57:wxVtkBaseView2
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box62:_wxvtkbaseview2D1
+NumberOfControlPoints:0
+CONNECTION
+Box65:Out:Box57:wxVtkBaseView3
+NumberOfControlPoints:0
+CONNECTION
+Box65:Out:Box62:_wxvtkbaseview2D2
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview3:wxvtkbaseview3:Box65:In
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview4:wxvtkbaseview4:Box69:In
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box57:wxVtkBaseView4
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box62:_wxvtkbaseview2D3
+NumberOfControlPoints:0
+CONNECTION
+wxvtkbaseview1:wxvtkbaseview1:Box71:In
+NumberOfControlPoints:0
+CONNECTION
+Box71:Out:Box57:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box71:Out:Box62:_wxvtkbaseview3D1
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box62:_polydata
+NumberOfControlPoints:0
+CONNECTION
+Box71:Out:Box72:_wxvtkbaseview3D1
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box72:_wxvtkbaseview2D1
+NumberOfControlPoints:0
+CONNECTION
+Box65:Out:Box72:_wxvtkbaseview2D2
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box72:_wxvtkbaseview2D3
+NumberOfControlPoints:0
+CONNECTION
+Box72:_widget:Box79:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box62:_widget:Box38:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box39:Widget:Box81:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box40:Widget:Box81:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box44:Widget:Box82:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box82:Widget:Box79:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box84:Widget:Box44:Widget9
+NumberOfControlPoints:0
+CONNECTION
+Box86:Widget:Box38:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box50:Widget:Box86:Widget4
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:Widget:Box86:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box49:Widget:Box50:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box34:Widget:Box50:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box57:BoxChange:Box08:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box57:InteractorStyleMaracas:interactorStyleMaracas:interactorStyleMaracas
+NumberOfControlPoints:0
+CONNECTION
+Box57:InteractorStyleMaracas3:interactorStyleMaracas3:interactorStyleMaracas3
+NumberOfControlPoints:0
+CONNECTION
+Box57:InteractorStyleMaracas4:interactorStyleMaracas4:interactorStyleMaracas4
+NumberOfControlPoints:0
+CONNECTION
+Box92:MeshManagerModel:Box93:MeshManagerModel
+NumberOfControlPoints:0
+CONNECTION
+Box77:BoxChange:Box93:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box92:MeshBase:Box72:_polydata
+NumberOfControlPoints:0
+CONNECTION
+Box92:MeshBase:Box37:polydata
+NumberOfControlPoints:0
+CONNECTION
+Box37:boxchange:Box72:_execute
+NumberOfControlPoints:0
+CONNECTION
+Box81:Widget:Box08:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box42:Widget:Box44:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box94:BoxChange:Box37:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box77:BoxChange:Box94:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box71:Out:Box96:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box96:vtkRenderer:Box66:In
+NumberOfControlPoints:0
+CONNECTION
+Box37:widget:Box79:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box48:widget:Box38:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box77:Out:Box97:In
+NumberOfControlPoints:0
+CONNECTION
+Box97:Out:Box45:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box97:Out:Box93:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box43:Widget:Box44:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box78:Widget:Box98:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box80:Widget:Box98:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box98:Widget:Box44:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box99:Out:Box58:StringVector
+NumberOfControlPoints:0
+CONNECTION
+Box100:Out1:Box101:In1
+NumberOfControlPoints:0
+CONNECTION
+Box101:Out:Box60:Type
+NumberOfControlPoints:0
+CONNECTION
+Box57:Out:Box100:sk1
+NumberOfControlPoints:0
+CONNECTION
+Box103:Out:Box104:Active
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box104:Renderer
+NumberOfControlPoints:0
+CONNECTION
+Box103:BoxChange:Box104:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box104:BoxChange:Box31:In6
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box105:In
+NumberOfControlPoints:0
+CONNECTION
+Box105:Out:Box104:In
+NumberOfControlPoints:0
+CONNECTION
+Box58:Out:Box113:StringVector
+NumberOfControlPoints:0
+CONNECTION
+Box113:Out:Box57:In
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box60:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box117:BoxChange:Box119:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box116:BoxChange:Box118:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box114:Out:Box118:Params
+NumberOfControlPoints:0
+CONNECTION
+Box115:Out:Box119:Params
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box119:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box118:WidgetShowNPoints
+NumberOfControlPoints:1
+-257.104431:30.998024:-900.000000
+CONNECTION
+Box116:Widget:Box120:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box117:Widget:Box120:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box120:Widget:Box50:Widget9
+NumberOfControlPoints:0
+CONNECTION
+Box121:Out:Box114:In1
+NumberOfControlPoints:0
+CONNECTION
+Box121:Out:Box115:In1
+NumberOfControlPoints:0
+CONNECTION
+Box126:BoxChange:Box128:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box125:BoxChange:Box127:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box123:Out:Box127:Params
+NumberOfControlPoints:0
+CONNECTION
+Box124:Out:Box128:Params
+NumberOfControlPoints:0
+CONNECTION
+Box130:Out:Box123:In1
+NumberOfControlPoints:0
+CONNECTION
+Box130:Out:Box124:In1
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box128:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box127:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box57:InteractorStyleMaracas2:interactorStyleMaracas2:interactorStyleMaracas2
+NumberOfControlPoints:0
+CONNECTION
+Box125:Widget:Box131:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box126:Widget:Box131:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box103:Widget:Box50:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box131:Widget:Box50:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box132:Widget:Box50:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box133:Widget:Box50:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box105:Out:Box77:In2
+NumberOfControlPoints:0
+CONNECTION
+Box60:Out:Box130:In
+NumberOfControlPoints:0
+CONNECTION
+Box60:Out:Box121:In
+NumberOfControlPoints:0
+APP_END
diff --git a/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs b/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs
new file mode 100644 (file)
index 0000000..40d3384
--- /dev/null
@@ -0,0 +1,443 @@
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
+# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs
+# ----------------------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include creaVtk
+include wx
+include vtk
+include std
+
+define Mesh_tool_ApplyCut creaMaracasVisu
+
+author "info-dev@creatis.insa-lyon.fr"
+description "Show N Points"
+
+category "demo"
+
+new creaMaracasVisu:ShowNPoints showNpoints
+  set showNpoints.Radio "2"
+  set showNpoints.Type "4"
+  set showNpoints.WinTitle "1.1   Splines"
+
+new creaVtk:CreateMeshFromPoints Box04
+  set Box04.CloseSurface "true"
+
+new creaMaracasVisu:ManualContourModel_Box Box06
+  set Box06.DoubleContour "1"
+  set Box06.NbPoints "100"
+  set Box06.OpenClose "true"
+  set Box06.OpenClose2 "false"
+
+new wx:LayoutLine Box08
+
+new vtk:UpdateRender Box11
+  set Box11.Active "true"
+
+new creaMaracasVisu:DrawAxisTree3D Box30
+  set Box30.Colour "0 0 1"
+  set Box30.LineWidth "2"
+
+new std:MultipleInputs Box31
+
+new creaMaracasVisu:ManualContourModel_Box Box29
+  set Box29.NbPoints "40"
+  set Box29.OpenClose "true"
+  set Box29.OpenClose2 "false"
+
+new creaMaracasVisu:wxPopupMenu Box57
+  set Box57.WithCtrlKey "true"
+
+new std:AddStringToVector Box58
+  set Box58.In0 "+  Add point"
+  set Box58.In1 "(+)  Insert point"
+  set Box58.In2 "Track point"
+  set Box58.In3 "Set Nearest point"
+  set Box58.In4 "-  Erase point"
+  set Box58.In5 "--  Delete all points"
+  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
+
+new vtk:ImageVtkProperties Box68
+
+new std:VectorFilterDouble Box70
+  set Box70.Type "11"
+
+new creaVtk:BooleanOperationPolyDataFilter Box77
+  set Box77.BoxProcessMode "Manual"
+  set Box77.ReorientDifferenceCells "false"
+
+new wx:ComboBox Box78
+  set Box78.In "Union Intersection Difference"
+
+new wx:LayoutLine Box79
+  set Box79.Orientation "H"
+  set Box79.WinTitle "New Surface ( Magenta  =  Red+Yellow )"
+
+new wx:CommandButton Box80
+  set Box80.Label "Refresh"
+
+new std:MagicBox Box66
+
+new std:MagicBox Box67
+
+new creaMaracasVisu:PolyDataToActor_Widget Box48
+
+new vtk:vtkImageDataPointerRelay Box35
+
+new wx:Slider Box34
+  set Box34.In "50"
+  set Box34.Label "true"
+  set Box34.Max "100"
+  set Box34.Min "0"
+  set Box34.ReactiveOnTrack "true"
+  set Box34.Title "Splines Opacity"
+
+new std:Div Box36
+  set Box36.In2 "100"
+
+new creaMaracasVisu:PolyDataToActor_Widget Box37
+  set Box37.color "0 1 1"
+  set Box37.meshOpacity "100"
+
+new wx:LayoutLine Box38
+  set Box38.Orientation "H"
+  set Box38.WinTitle "Interpolated Surface (Yellow)"
+
+new wx:LayoutTab Box39
+
+new wx:LayoutTab Box40
+
+new wx:CommandButton Box42
+  set Box42.Label "Apply  (Magenta->To Red)"
+
+new wx:CommandButton Box43
+  set Box43.Label "Reset Tool"
+
+new wx:LayoutLine Box44
+  set Box44.Orientation "V"
+  set Box44.WinTitle "1.2   Mesh Action"
+
+new creaVtk:MeshManager_tool Box45
+  set Box45.Tool "30"
+
+new std:MagicBox Box46
+
+new wx:ComboBox Box49
+  set Box49.In "25 50 100 150"
+  set Box49.Selection "1"
+  set Box49.Title "Number of Points"
+
+new wx:LayoutLine Box50
+  set Box50.Orientation "V"
+  set Box50.WinTitle "Config"
+
+new std:MultipleInputs Box51
+
+new creaMaracasVisu:ShowNPoints_Tools Box52
+  set Box52.Type "120"
+
+new std:MultipleInputs Box53
+
+new std:MultipleInputs Box55
+
+new creaMaracasVisu:MeshContours_Widget Box62
+  set Box62.colorMesh "1 1 0"
+
+new std:MagicBox Box63
+
+new std:MagicBox Box64
+
+new std:MagicBox Box65
+
+new std:MagicBox Box69
+
+new std:MagicBox Box71
+
+new creaMaracasVisu:MeshContours_Widget Box72
+  set Box72.colorMesh "0 1 1"
+
+new wx:LayoutLine Box81
+  set Box81.WinTitle "Step 1.   Surface"
+
+new wx:LayoutTab Box82
+
+new wx:OutputText Box84
+
+new wx:LayoutTab Box86
+
+new creaVtk:MeshManager Box92
+
+new creaVtk:MeshManager_tool Box93
+  set Box93.Tool "35"
+
+new std:MagicBox Box94
+
+new creaMaracasVisu:wxVtkBaseView_Info Box96
+
+new creaVtk:PolyDataNormals Box97
+
+new wx:LayoutLine Box98
+  set Box98.Orientation "H"
+
+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    11    12"
+  set Box100.In1 "1  5 10 20 30 40 50 0  100   110   210    300   310"
+  set Box100.Type "2"
+
+new std:ConcatStrings Box101
+
+new wx:CheckBox Box103
+  set Box103.In "false"
+  set Box103.ReactiveOnKeystroke "true"
+  set Box103.Title "Show Normals"
+
+new creaVtk:GlyphPolyDataNormals Box104
+  set Box104.MaskRatio "2"
+  set Box104.Opacity "1"
+  set Box104.Size "5"
+
+new creaVtk:PolyDataNormals Box105
+
+new std:AddStringToVector Box113
+  set Box113.In0 "Create expanded surface"
+  set Box113.In1 "Create adjustable thickness surface"
+
+new std:ConcatStrings Box114
+  set Box114.In2 " -1"
+
+new std:ConcatStrings Box115
+  set Box115.In2 " 1"
+
+new wx:CommandButton Box116
+  set Box116.Label "-"
+
+new wx:CommandButton Box117
+  set Box117.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box118
+  set Box118.BoxProcessMode "Manual"
+  set Box118.Type "320"
+
+new creaMaracasVisu:ShowNPoints_Tools Box119
+  set Box119.BoxProcessMode "Manual"
+  set Box119.Type "320"
+
+new wx:LayoutLine Box120
+  set Box120.Orientation "H"
+
+new std:GetVectorDoubleSubVector Box121
+  set Box121.ErrorValue "0"
+  set Box121.I "0"
+  set Box121.Size "3"
+
+new std:ConcatStrings Box123
+  set Box123.In2 " -1"
+
+new std:ConcatStrings Box124
+  set Box124.In2 " 1"
+
+new wx:CommandButton Box125
+  set Box125.Label "-"
+
+new wx:CommandButton Box126
+  set Box126.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box127
+  set Box127.BoxProcessMode "Manual"
+  set Box127.Type "330"
+
+new creaMaracasVisu:ShowNPoints_Tools Box128
+  set Box128.BoxProcessMode "Manual"
+  set Box128.Type "330"
+
+new std:GetVectorDoubleSubVector Box130
+  set Box130.ErrorValue "0"
+  set Box130.I "3"
+  set Box130.Size "3"
+
+new wx:LayoutLine Box131
+  set Box131.Orientation "H"
+
+new wx:OutputText Box132
+  set Box132.In "Expand area"
+
+new wx:OutputText Box133
+  set Box133.In "Widen"
+
+
+connect Box06.LstContourPointsX Box04.LstX
+connect showNpoints.lstIndexs Box06.LstIndexsIn
+connect Box06.LstContourPointsY Box04.LstY
+connect Box06.LstContourPointsZ Box04.LstZ
+connect Box06.LstIndexsOut Box04.LstIndexs
+connect Box30.BoxChange Box31.In4
+connect showNpoints.lstIndexs Box29.LstIndexsIn
+connect Box29.LstContourPointsX Box30.lstPointX
+connect Box29.LstContourPointsY Box30.lstPointY
+connect Box29.LstContourPointsZ Box30.lstPointZ
+connect Box29.LstIndexsOut Box30.lstIndexs
+connect Box31.BoxChange Box11.BoxExecute
+connect showNpoints.WidgetShowNPoints Box60.WidgetShowNPoints
+connect Box57.BoxChange Box60.BoxExecute
+connect Box68.Spacing Box60.Spacing
+connect showNpoints.lstPointsX Box70.In0
+connect showNpoints.lstPointsY Box70.In1
+connect showNpoints.lstPointsZ Box70.In2
+connect Box70.Out0 Box06.LstControlPointsX
+connect Box70.Out1 Box06.LstControlPointsY
+connect Box70.Out2 Box06.LstControlPointsZ
+connect Box70.Out0 Box29.LstControlPointsX
+connect Box70.Out1 Box29.LstControlPointsY
+connect Box70.Out2 Box29.LstControlPointsZ
+connect Box78.Out Box77.Operation
+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
+connect Box35.Out Box68.In
+connect Box68.Spacing Box70.k1
+connect Box35.Out showNpoints.Image
+connect Box34.Out Box36.In1
+connect Box36.Out Box30.Opacity
+connect Box34.BoxChange Box31.In2
+connect Box66.Out Box37.render
+connect Box38.Widget Box39.Widget2
+connect Box79.Widget Box40.Widget2
+connect Box46.Out Box45.MeshManagerModel
+connect Box49.OutString Box06.NbPoints
+connect Box42.BoxChange Box51.BoxExecute
+connect Box45.BoxChange Box51.In2
+connect Box52.BoxChange Box51.In4
+connect showNpoints.WidgetShowNPoints Box52.WidgetShowNPoints
+connect Box80.BoxChange Box53.In2
+connect Box53.BoxChange Box77.BoxExecute
+connect Box42.BoxChange Box53.In3
+connect Box43.BoxChange Box55.BoxExecute
+connect Box52.BoxChange Box55.In2
+connect Box43.BoxChange Box53.In6
+connect Box63.BoxChange showNpoints.BoxExecute
+connect Box63.BoxChange Box62._execute
+connect Box64.Out Box57.wxVtkBaseView2
+connect Box64.Out Box62._wxvtkbaseview2D1
+connect Box65.Out Box57.wxVtkBaseView3
+connect Box65.Out Box62._wxvtkbaseview2D2
+connect Box69.Out Box57.wxVtkBaseView4
+connect Box69.Out Box62._wxvtkbaseview2D3
+connect Box71.Out Box57.wxVtkBaseView
+connect Box71.Out Box62._wxvtkbaseview3D1
+connect Box04.Out Box62._polydata
+connect Box71.Out Box72._wxvtkbaseview3D1
+connect Box64.Out Box72._wxvtkbaseview2D1
+connect Box65.Out Box72._wxvtkbaseview2D2
+connect Box69.Out Box72._wxvtkbaseview2D3
+connect Box72._widget Box79.Widget6
+connect Box62._widget Box38.Widget7
+connect Box39.Widget Box81.Widget2
+connect Box40.Widget Box81.Widget4
+connect Box44.Widget Box82.Widget2
+connect Box82.Widget Box79.Widget2
+connect Box84.Widget Box44.Widget9
+connect Box86.Widget Box38.Widget2
+connect Box50.Widget Box86.Widget4
+connect showNpoints.Widget Box86.Widget2
+connect Box49.Widget Box50.Widget2
+connect Box34.Widget Box50.Widget4
+connect Box57.BoxChange Box08.BoxExecute
+connect Box92.MeshManagerModel Box93.MeshManagerModel
+connect Box77.BoxChange Box93.BoxExecute
+connect Box92.MeshBase Box72._polydata
+connect Box92.MeshBase Box37.polydata
+connect Box37.boxchange Box72._execute
+connect Box81.Widget Box08.Widget2
+connect Box42.Widget Box44.Widget6
+connect Box94.BoxChange Box37.boxexecute
+connect Box77.BoxChange Box94.BoxExecute
+connect Box71.Out Box96.wxVtkBaseView
+connect Box96.vtkRenderer Box66.In
+connect Box37.widget Box79.Widget7
+connect Box48.widget Box38.Widget8
+connect Box77.Out Box97.In
+connect Box97.Out Box45.Mesh
+connect Box97.Out Box93.Mesh
+connect Box43.Widget Box44.Widget1
+connect Box78.Widget Box98.Widget2
+connect Box80.Widget Box98.Widget4
+connect Box98.Widget Box44.Widget3
+connect Box99.Out Box58.StringVector
+connect Box100.Out1 Box101.In1
+connect Box101.Out Box60.Type
+connect Box57.Out Box100.sk1
+connect Box103.Out Box104.Active
+connect Box66.Out Box104.Renderer
+connect Box103.BoxChange Box104.BoxExecute
+connect Box104.BoxChange Box31.In6
+connect Box04.Out Box105.In
+connect Box105.Out Box104.In
+connect Box58.Out Box113.StringVector
+connect Box113.Out Box57.In
+connect Box67.Out Box60.Mesh
+connect Box117.BoxChange Box119.BoxExecute
+connect Box116.BoxChange Box118.BoxExecute
+connect Box114.Out Box118.Params
+connect Box115.Out Box119.Params
+connect showNpoints.WidgetShowNPoints Box119.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box118.WidgetShowNPoints
+connect Box116.Widget Box120.Widget1
+connect Box117.Widget Box120.Widget3
+connect Box120.Widget Box50.Widget9
+connect Box121.Out Box114.In1
+connect Box121.Out Box115.In1
+connect Box126.BoxChange Box128.BoxExecute
+connect Box125.BoxChange Box127.BoxExecute
+connect Box123.Out Box127.Params
+connect Box124.Out Box128.Params
+connect Box130.Out Box123.In1
+connect Box130.Out Box124.In1
+connect showNpoints.WidgetShowNPoints Box128.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box127.WidgetShowNPoints
+connect Box125.Widget Box131.Widget1
+connect Box126.Widget Box131.Widget3
+connect Box103.Widget Box50.Widget5
+connect Box131.Widget Box50.Widget7
+connect Box132.Widget Box50.Widget8
+connect Box133.Widget Box50.Widget6
+connect Box105.Out Box77.In2
+connect Box60.Out Box130.In
+connect Box60.Out Box121.In
+
+# Complex input ports
+input point showNpoints.In " "
+input mesh Box67.In " "
+input image Box35.In " "
+input title Box08.WinTitle " "
+input meshmanagermodel Box46.In " "
+input boxChange Box63.In " "
+input wxvtkbaseview2 Box64.In " "
+input wxvtkbaseview3 Box65.In " "
+input wxvtkbaseview4 Box69.In " "
+input wxvtkbaseview1 Box71.In " "
+
+# Complex output ports
+output widget Box08.Widget " "
+output interactorStyleMaracas Box57.InteractorStyleMaracas " "
+output interactorStyleMaracas3 Box57.InteractorStyleMaracas3 " "
+output interactorStyleMaracas4 Box57.InteractorStyleMaracas4 " "
+output interactorStyleMaracas2 Box57.InteractorStyleMaracas2 " "
+
+
+endefine
index 2fea63d03f6632f3c2f4b1c7b1123bcaaaecfc58..4a631401c6001f16867d4472e7ddee60df52035c 100644 (file)
@@ -361,6 +361,246 @@ void ShowNPoints_Tools::MovePatchCenter()
        }
 }
 
+/**
+*      Creates a cutting surface with 1 group of points. This surface can have its area adjusted 
+*      (increase or decrease the distance from the points to the center)
+*      The centroid is set as the output, to be used by the expanding tool.
+*/
+void ShowNPoints_Tools::CreateExpandedSurface()
+{
+       //
+       //Set Input to 0 as this function is only used by the popup menu
+       bbSetInputType(0);
+       //
+       //
+       WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
+       wsp->StopAutoAddPoints();
+    wsp->StopTrackPoint();
+       if((wsp->GetLstModelShowNPointsSize()==1) && (bbGetInputMesh()!=NULL ) && (wsp->GetModelShowNPoints()->GetLstPointsSize()>0))
+       {       
+               std::vector<double> lstX = wsp->GetModelShowNPoints()->GetLstPointsX();
+               std::vector<double> lstY = wsp->GetModelShowNPoints()->GetLstPointsY();
+               std::vector<double> lstZ = wsp->GetModelShowNPoints()->GetLstPointsZ();
+               
+               wsp->DeleteAllPoints_();
+               double centroid[3];
+               
+               for(int i = 0; i < (int)lstX.size(); i++){
+                       centroid[0] += lstX[i];
+                       centroid[1] += lstY[i];
+                       centroid[2] += lstZ[i];
+               }
+               centroid[0] /= lstX.size();
+               centroid[1] /= lstX.size();
+               centroid[2] /= lstX.size();
+               
+               double p[3];
+               double dV[3];
+               
+               for(int i = 0; i < (int)lstX.size(); i++){
+                       dV[0] = lstX[i] - centroid[0];
+                       dV[1] = lstY[i] - centroid[1];
+                       dV[2] = lstZ[i] - centroid[2];
+                       vtkMath::Normalize(dV);
+                       
+                       p[0] = lstX[i] + 4*dV[0];
+                       p[1] = lstY[i] + 4*dV[1];
+                       p[2] = lstZ[i] + 4*dV[2];
+                       wsp->AddPoint(p[0] ,p[1], p[2],"");
+               }
+               
+               std::vector<double> outData = {centroid[0], centroid[1], centroid[2]};
+               bbSetOutputOut(outData);
+       }
+       else{
+               printf("PG ShowNPoints_Tools::CreateExpandedSurface  Warning surface not apply. groups, mesh or points invalid. need 1 group of points\n");
+       }
+       // --- Finish ---
+        wsp->SetOutputBox();
+        wsp->UndoRedo_SaveCollection();
+}
+
+/**
+*      Creates a cutting surface with 3 groups of points. This surface can have its area adjusted
+*      (Increase or decrease distance from points to centroid of spline or distance between splines)
+*      The centroid and normal is set as the Output, to be used by the expanding tools.
+*/
+void ShowNPoints_Tools::CreateWideExpandedSurface()
+{
+       //
+       //Set Input to 0 as this function is only used by the popup menu
+       bbSetInputType(0);
+       //
+       //
+       WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
+       wsp->StopAutoAddPoints();
+    wsp->StopTrackPoint();
+    
+       if((wsp->GetLstModelShowNPointsSize()==1) && (bbGetInputMesh()!=NULL ) && (wsp->GetModelShowNPoints()->GetLstPointsSize()>0))
+       {       
+               std::vector<double> lstX = wsp->GetModelShowNPoints()->GetLstPointsX();
+               std::vector<double> lstY = wsp->GetModelShowNPoints()->GetLstPointsY();
+               std::vector<double> lstZ = wsp->GetModelShowNPoints()->GetLstPointsZ();
+               
+               wsp->DeleteAllPoints_();
+               
+               double normal[3];
+               double centroid[3];
+                       
+               for(int i = 0; i < (int)lstX.size(); i++){
+                       centroid[0] += lstX[i];
+                       centroid[1] += lstY[i];
+                       centroid[2] += lstZ[i];
+               }
+               centroid[0] /= lstX.size();
+               centroid[1] /= lstX.size();
+               centroid[2] /= lstX.size();
+               
+               double v1[3], v2[3];
+               double currNormal[3];
+               
+               for(int i = 0; i < ((int)lstX.size())-1; i++){
+                       v1[0] = lstX[i] - centroid[0];
+                       v1[1] = lstY[i] - centroid[1];
+                       v1[2] = lstZ[i] - centroid[2];          
+                       v2[0] = lstX[i+1] - centroid[0];
+                       v2[1] = lstY[i+1] - centroid[1];
+                       v2[2] = lstZ[i+1] - centroid[2];
+                       vtkMath::Cross(v1, v2, currNormal);
+                       normal[0] += currNormal[0];
+                       normal[1] += currNormal[1];
+                       normal[2] += currNormal[2];
+               }
+               
+               normal[0] /= (lstX.size()-1);
+               normal[1] /= (lstX.size()-1);
+               normal[2] /= (lstX.size()-1);
+               
+               vtkMath::Normalize(normal);
+               
+               double np[3], dV[3];
+               int     addNormal = 1;
+               //Add new groups on both sides from the main group
+               for(int group = 0; group < 3; group++){
+                       for(int i = 0; i < (int) lstX.size(); i++){
+                               dV[0] = lstX[i] - centroid[0];
+                               dV[1] = lstY[i] - centroid[1];
+                               dV[2] = lstZ[i] - centroid[2];
+                               vtkMath::Normalize(dV);
+                               
+                               np[0] = lstX[i] + dV[0]*4 + ((normal[0]*2)*addNormal);
+                               np[1] = lstY[i] + dV[1]*4 + ((normal[1]*2)*addNormal);
+                               np[2] = lstZ[i] + dV[2]*4 + ((normal[2]*2)*addNormal);
+                               wsp->AddPoint(np[0] ,np[1], np[2],"");
+                       }
+                       addNormal--;
+                       if(group < 2)wsp->InsertCollectionAfter_();
+               }
+               
+               std::vector<double> outData = {centroid[0], centroid[1], centroid[2], normal[0], normal[1], normal[2]};
+               bbSetOutputOut(outData);
+               
+               // --- Finish ---
+        wsp->SetOutputBox();
+        wsp->UndoRedo_SaveCollection();
+       }
+       else{
+               printf("PG ShowNPoints_Tools::CreateWideExpandedSurface  Warning surface not apply. groups, mesh or points invalid. need 1 group of points\n");
+       }
+}
+
+/**
+*      Given a cutting surface, expand its area by moving the points outwards of the main centroid.
+*/
+void ShowNPoints_Tools::ExpandSurfaceArea()
+{
+       WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
+       wsp->StopAutoAddPoints();
+    wsp->StopTrackPoint();
+
+       if((wsp->GetLstModelShowNPointsSize()==1 || wsp->GetLstModelShowNPointsSize() == 3)  
+               && (wsp->GetModelShowNPoints()->GetLstPointsSize()>0)
+               && (bbGetInputParams().size() == 4))
+       {
+               std::vector<double> params = bbGetInputParams();
+               double direction = params[3];
+               double centroid[3] = {params[0], params[1], params[2]};
+               int numCollection = wsp->GetLstModelShowNPointsSize()==1?0:1;
+               
+               double dV[3], currPoint[3], mdfdPoint[3];
+               
+               std::vector<double> modPoint;
+               int pointsPerSpline = wsp->GetModelShowNPoints()->GetLstPointsSize();
+               for(int i = 0; i < pointsPerSpline; i++){
+                       wsp->GetCollectionPoint(numCollection, i, currPoint);
+                       dV[0] = currPoint[0] - centroid[0];
+                       dV[1] = currPoint[1] - centroid[1];
+                       dV[2] = currPoint[2] - centroid[2];
+                       vtkMath::Normalize(dV);
+                       
+                       vtkMath::MultiplyScalar(dV, direction);
+                       vtkMath::Add(currPoint, dV, mdfdPoint);
+                       modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
+                       wsp->SetCollectionPoint(numCollection, i, modPoint);
+                       
+                       if(wsp->GetLstModelShowNPointsSize() == 3){
+                               wsp->GetCollectionPoint(0, i, currPoint);
+                               vtkMath::Add(currPoint, dV, mdfdPoint);
+                               modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
+                               wsp->SetCollectionPoint(0, i, modPoint);
+                               
+                               wsp->GetCollectionPoint(2, i, currPoint);
+                               vtkMath::Add(currPoint, dV, mdfdPoint);
+                               modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
+                               wsp->SetCollectionPoint(2, i, modPoint);
+                       }
+               }
+       }
+       else{
+               printf("PG ShowNPoints_Tools::ExpandSurface  Warning surface not apply. groups, points or params invalid. need 1 group of points, need 4 params(centroid and direction)\n");
+       }
+       // --- Finish ---
+        wsp->SetOutputBox();
+        wsp->UndoRedo_SaveCollection();
+}
+/**
+*      Given a cutting surface, expand the distance between the edge splines and the middle spline. making it "wider".
+*/
+void ShowNPoints_Tools::WidenSurface()
+{
+       WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
+       wsp->StopAutoAddPoints();
+    wsp->StopTrackPoint();
+
+       if((wsp->GetLstModelShowNPointsSize()==3)  
+               && (wsp->GetModelShowNPoints()->GetLstPointsSize()>0)
+               && (bbGetInputParams().size() == 4))
+       {
+               double direction = bbGetInputParams()[3];
+               double normal[3] = {bbGetInputParams()[0], bbGetInputParams()[1], bbGetInputParams()[2]};
+               vtkMath::MultiplyScalar(normal, direction);
+               
+               int pointsPerSpline = wsp->GetModelShowNPoints()->GetLstPointsSize();
+               double pointSp1[3], pointSp2[3];
+               std::vector<double> modifiedPoint;
+               for(int i = 0; i < pointsPerSpline; i++){
+                       wsp->GetCollectionPoint(0, i, pointSp1);
+                       wsp->GetCollectionPoint(2, i, pointSp2);
+                       vtkMath::Add(pointSp1, normal, pointSp1);
+                       vtkMath::Subtract(pointSp2, normal, pointSp2);
+                       modifiedPoint.insert(modifiedPoint.begin(), std::begin(pointSp1), std::end(pointSp1));
+                       wsp->SetCollectionPoint(0, i, modifiedPoint);
+                       modifiedPoint.insert(modifiedPoint.begin(), std::begin(pointSp2), std::end(pointSp2));
+                       wsp->SetCollectionPoint(2, i, modifiedPoint);
+               }
+       
+       }else{
+               printf("PG ShowNPoints_Tools::WidenSurface  Warning surface not apply. groups, points or params invalid. need 3 group of points, need 4 params(normal and direction)\n");
+       }
+       // --- Finish ---
+        wsp->SetOutputBox();
+        wsp->UndoRedo_SaveCollection();
+}
 //=====
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
@@ -437,6 +677,22 @@ void ShowNPoints_Tools::Process()
         {
                MovePatchCenter();
         } // if Type
+        if(bbGetInputType()==300)
+        {
+               CreateExpandedSurface();
+        } // if Type
+        if(bbGetInputType()==310)
+        {
+               CreateWideExpandedSurface();
+        } // if Type
+        if(bbGetInputType()==320)
+        {
+               ExpandSurfaceArea();
+        } // if Type
+        if(bbGetInputType()==330)
+        {
+               WidenSurface();
+        } // if Type
     } // if bbGetInputWidgetShowNPoints
 }
 //===== 
index 2f510b4e73cf57ff73878bc8ae78241b60b2b789..640045f24577f43fc131c2a14d231a3b8c4cf63c 100644 (file)
@@ -41,6 +41,10 @@ class bbcreaMaracasVisu_EXPORT ShowNPoints_Tools
     void CreatePatch_Points(std::vector<double> lstX, std::vector<double> lstY, std::vector<double> lstZ);
     void NearestPointToMesh( vtkPoints *points, vtkStaticPointLocator   *pointLocator, double *spc , double *p , double *pM   );
     void MovePatchCenter();
+    void CreateExpandedSurface();
+    void CreateWideExpandedSurface();
+    void ExpandSurfaceArea();
+    void WidenSurface();
 
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
@@ -55,8 +59,8 @@ BBTK_CATEGORY("empty");
   BBTK_INPUT(ShowNPoints_Tools,WidgetShowNPoints,"WidgetShowNPoints",WidgetShowNPoints*,"");
   BBTK_INPUT(ShowNPoints_Tools,Spacing,"(default [1,1,1] )Spacing",std::vector<double>,"");
   BBTK_INPUT(ShowNPoints_Tools,Mesh,"Mesh en format vtkPolyData ",vtkPolyData*,"");
-  BBTK_INPUT(ShowNPoints_Tools,Type,"(default 0) 0:Nothing 1:Auto add poits   5:Add Point  10:Insert Point  20:TrackPoint  30:Set nearest point  40:Erase point  50:Deleta all points  100:Insert  group after   110:Delete group  120:Reset colletion  200:Tool 3 or 4 points to surface - Create Mesh (based on one group and 3 or 4 points)  210: Invert points      220: Move patch center",int,"");
-  BBTK_INPUT(ShowNPoints_Tools, Params,"Optional params for the tools, required 200: Normal and direction", std::vector<double>,"");
+  BBTK_INPUT(ShowNPoints_Tools,Type,"(default 0) 0:Nothing 1:Auto add poits   5:Add Point  10:Insert Point  20:TrackPoint  30:Set nearest point  40:Erase point  50:Deleta all points  100:Insert  group after   110:Delete group  120:Reset colletion  200:Tool 3 or 4 points to surface - Create Mesh (based on one group and 3 or 4 points)  210: Invert points      220: Move patch center   300: Create expanded surface   310: Create wide expanded surface      320: Expand Surface,   330: Widen surface",int,"");
+  BBTK_INPUT(ShowNPoints_Tools, Params,"Optional params for the tools, required 200: Normal and direction, required 320: centroid and direction", std::vector<double>,"");
   
   BBTK_OUTPUT(ShowNPoints_Tools, Out, "Output", std::vector<double>, "");
 //  BBTK_OUTPUT(ShowNPoints_Tools,Out,"First output",double,"");
index 1ae46a5f5126fa414c434fd2df7674e10dd22c88..56e924f238771611ad10d141c7c60f4f51edaddd 100644 (file)
@@ -1490,7 +1490,6 @@ std::vector<int> WidgetShowNPoints::GetLstIndexs()
     }
     return lstIndexs;
 }
-
 //------------------------------------------------------------------------
 int WidgetShowNPoints::GetLstModelShowNPointsSize()
 {