]> Creatis software - creaMaracasVisu.git/commitdiff
#3517 ShowNPoints actual Point
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 12 Jul 2023 15:17:34 +0000 (17:17 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 12 Jul 2023 15:17:34 +0000 (17:17 +0200)
bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbg
bbtk/bbs/boxes/Mesh_tool_ApplyCut.bbs
bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbg
bbtk/bbs/boxes/Mesh_tool_ApplyPatchSimple.bbs
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx

index 5fa1e45dc6477075a243412e95acfeebfd304041..bb6f6ee0ae9678e21c7473506c5b22c04fc03138 100644 (file)
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:149
+BOXES:147
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -140,13 +140,11 @@ FIN_BOX
 BOX
 creaMaracasVisu:ManualContourModel_Box:Box29
 ISEXEC:FALSE
-76.240145:29.637449:-900.000000
-100.760145:27.137449:-900.000000
+75.865053:27.949535:-900.000000
+100.385053:25.449535:-900.000000
 PORT
 NbPoints:"40"
 PORT
-OpenClose:"true"
-PORT
 OpenClose2:"false"
 FIN_BOX
 BOX
@@ -364,8 +362,8 @@ FIN_BOX
 BOX
 wx:ComboBox:Box49
 ISEXEC:FALSE
--182.639251:-13.479145:-900.000000
--156.359251:-15.979145:-900.000000
+-188.003067:-15.129550:-900.000000
+-161.723067:-17.629550:-900.000000
 PORT
 In:"25 50 100 150"
 PORT
@@ -944,8 +942,8 @@ FIN_BOX
 BOX
 std:StringSelect:Box185
 ISEXEC:FALSE
-55.412920:-71.682057:-900.000000
-79.932920:-74.182057:-900.000000
+51.782029:38.833179:-900.000000
+76.302029:36.333179:-900.000000
 PORT
 In0:"true"
 PORT
@@ -972,22 +970,6 @@ PORT
 In:"Move center point"
 FIN_BOX
 BOX
-std:ConcatStrings:Box189
-ISEXEC:FALSE
-295.297065:33.852305:-900.000000
-318.057065:31.352305:-900.000000
-PORT
-In2:" -1"
-FIN_BOX
-BOX
-std:ConcatStrings:Box190
-ISEXEC:FALSE
-323.450465:34.200004:-900.000000
-346.210465:31.700004:-900.000000
-PORT
-In2:" 1"
-FIN_BOX
-BOX
 wx:CommandButton:Box191
 ISEXEC:FALSE
 293.254354:19.078682:-900.000000
@@ -1011,6 +993,8 @@ ISEXEC:FALSE
 PORT
 BoxProcessMode:"Manual"
 PORT
+Params:"-1"
+PORT
 Type:"220"
 FIN_BOX
 BOX
@@ -1021,6 +1005,8 @@ ISEXEC:FALSE
 PORT
 BoxProcessMode:"Manual"
 PORT
+Params:"1"
+PORT
 Type:"220"
 FIN_BOX
 BOX
@@ -1032,18 +1018,6 @@ PORT
 Orientation:"H"
 FIN_BOX
 BOX
-std:GetVectorDoubleSubVector:Box197
-ISEXEC:FALSE
-303.690218:44.001858:-900.000000
-327.150218:41.501858:-900.000000
-PORT
-ErrorValue:"0"
-PORT
-I:"3"
-PORT
-Size:"3"
-FIN_BOX
-BOX
 wx:OutputText:Box198
 ISEXEC:FALSE
 351.406905:-7.681984:-900.000000
@@ -1333,6 +1307,18 @@ ISEXEC:FALSE
 -214.516357:-72.312285:-900.000000
 -192.736357:-74.812285:-900.000000
 FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box238
+ISEXEC:FALSE
+137.369261:-67.733158:-900.000000
+159.914261:-70.233158:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Params:"0"
+PORT
+Type:"250"
+FIN_BOX
 CONNECTIONS:256
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
@@ -1882,12 +1868,6 @@ CONNECTION
 Box191:BoxChange:Box193:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
-Box189:Out:Box193:Params
-NumberOfControlPoints:0
-CONNECTION
-Box190:Out:Box194:Params
-NumberOfControlPoints:0
-CONNECTION
 Box195:Widget:Box187:Widget8
 NumberOfControlPoints:0
 CONNECTION
@@ -1909,12 +1889,6 @@ CONNECTION
 showNpoints:WidgetShowNPoints:Box193:WidgetShowNPoints
 NumberOfControlPoints:0
 CONNECTION
-Box197:Out:Box189:In1
-NumberOfControlPoints:0
-CONNECTION
-Box197:Out:Box190:In1
-NumberOfControlPoints:0
-CONNECTION
 Box202:BoxChange:Box204:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
@@ -1957,9 +1931,6 @@ CONNECTION
 Box207:BoxChange:Box208:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
-Box208:Out:Box197:In
-NumberOfControlPoints:0
-CONNECTION
 Box208:Out:Box206:In
 NumberOfControlPoints:0
 CONNECTION
@@ -2103,4 +2074,19 @@ NumberOfControlPoints:0
 CONNECTION
 Box37:widgetB:Box236:Widget4
 NumberOfControlPoints:0
+CONNECTION
+Box105:Out:Box238:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box238:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box238:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box238:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box185:Out:Box29:OpenClose
+NumberOfControlPoints:0
 APP_END
index 5c7d7ad07053c1fd261d92f9199e9094c0479d23..85c342fa4d48003cdbe001bef151757d24d7b02b 100644 (file)
@@ -45,7 +45,6 @@ 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
@@ -361,12 +360,6 @@ new wx:LayoutLine Box187
 new wx:OutputText Box188
   set Box188.In "Move center point"
 
-new std:ConcatStrings Box189
-  set Box189.In2 " -1"
-
-new std:ConcatStrings Box190
-  set Box190.In2 " 1"
-
 new wx:CommandButton Box191
   set Box191.Label "-"
 
@@ -375,20 +368,17 @@ new wx:CommandButton Box192
 
 new creaMaracasVisu:ShowNPoints_Tools Box193
   set Box193.BoxProcessMode "Manual"
+  set Box193.Params "-1"
   set Box193.Type "220"
 
 new creaMaracasVisu:ShowNPoints_Tools Box194
   set Box194.BoxProcessMode "Manual"
+  set Box194.Params "1"
   set Box194.Type "220"
 
 new wx:LayoutLine Box195
   set Box195.Orientation "H"
 
-new std:GetVectorDoubleSubVector Box197
-  set Box197.ErrorValue "0"
-  set Box197.I "3"
-  set Box197.Size "3"
-
 new wx:OutputText Box198
   set Box198.In "Expand"
 
@@ -499,6 +489,11 @@ new wx:LayoutLine Box236
 
 new wx:OutputText Box237
 
+new creaMaracasVisu:ShowNPoints_Tools Box238
+  set Box238.BoxProcessMode "Manual"
+  set Box238.Params "0"
+  set Box238.Type "250"
+
 
 connect Box06.LstContourPointsX Box04.LstX
 connect showNpoints.lstIndexs Box06.LstIndexsIn
@@ -667,8 +662,6 @@ connect Box185.Out Box06.OpenClose
 connect Box147.Out Box146.In
 connect Box192.BoxChange Box194.BoxExecute
 connect Box191.BoxChange Box193.BoxExecute
-connect Box189.Out Box193.Params
-connect Box190.Out Box194.Params
 connect Box195.Widget Box187.Widget8
 connect Box188.Widget Box187.Widget7
 connect Box191.Widget Box195.Widget3
@@ -676,8 +669,6 @@ connect Box192.Widget Box195.Widget4
 connect Box187.Widget Box184.Widget6
 connect showNpoints.WidgetShowNPoints Box194.WidgetShowNPoints
 connect showNpoints.WidgetShowNPoints Box193.WidgetShowNPoints
-connect Box197.Out Box189.In1
-connect Box197.Out Box190.In1
 connect Box202.BoxChange Box204.BoxExecute
 connect Box201.BoxChange Box203.BoxExecute
 connect Box199.Out Box203.Params
@@ -692,7 +683,6 @@ connect showNpoints.WidgetShowNPoints Box204.WidgetShowNPoints
 connect showNpoints.WidgetShowNPoints Box203.WidgetShowNPoints
 connect Box159.Out Box169.In
 connect Box207.BoxChange Box208.BoxExecute
-connect Box208.Out Box197.In
 connect Box208.Out Box206.In
 connect Box214.BoxChange Box216.BoxExecute
 connect Box213.BoxChange Box215.BoxExecute
@@ -741,6 +731,11 @@ connect Box72._widgetA Box222.Widget2
 connect Box37.widgetA Box222.Widget4
 connect Box72._widgetB Box236.Widget2
 connect Box37.widgetB Box236.Widget4
+connect Box105.Out Box238.Mesh
+connect Box04.BoxChange Box238.BoxExecute
+connect showNpoints.WidgetShowNPoints Box238.WidgetShowNPoints
+connect Box68.Spacing Box238.Spacing
+connect Box185.Out Box29.OpenClose
 
 # Complex input ports
 input point showNpoints.In " "
index 7fcb474df7d69af7010953eba408bfd463217dec..3d758f7d1c27500d2ea4d1662727c382525e5ec8 100644 (file)
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:94
+BOXES:92
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -673,6 +673,8 @@ ISEXEC:FALSE
 PORT
 BoxProcessMode:"Manual"
 PORT
+Params:"1"
+PORT
 Type:"220"
 FIN_BOX
 BOX
@@ -699,23 +701,9 @@ ISEXEC:FALSE
 PORT
 BoxProcessMode:"Manual"
 PORT
-Type:"220"
-FIN_BOX
-BOX
-std:ConcatStrings:Box130
-ISEXEC:FALSE
--377.646633:23.880476:-900.000000
--354.886633:21.380476:-900.000000
-PORT
-In2:"  1"
-FIN_BOX
-BOX
-std:ConcatStrings:Box131
-ISEXEC:FALSE
--336.496984:24.204237:-900.000000
--313.736984:21.704237:-900.000000
+Params:"-1"
 PORT
-In2:"  -1"
+Type:"220"
 FIN_BOX
 BOX
 std:MultipleInputs:Box126
@@ -732,18 +720,6 @@ PORT
 Orientation:"H"
 FIN_BOX
 BOX
-std:GetVectorDoubleSubVector:Box132
-ISEXEC:FALSE
--346.082243:44.049611:-900.000000
--322.622243:41.549611:-900.000000
-PORT
-ErrorValue:"0"
-PORT
-I:"3"
-PORT
-Size:"3"
-FIN_BOX
-BOX
 creaVtk:CleanPolyData:Box133
 ISEXEC:FALSE
 -99.940321:-63.576453:-900.000000
@@ -841,7 +817,17 @@ ISEXEC:FALSE
 139.158642:-65.682934:-900.000000
 160.938642:-68.182934:-900.000000
 FIN_BOX
-CONNECTIONS:178
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box149
+ISEXEC:FALSE
+149.256523:-26.382417:-900.000000
+171.801523:-28.882417:-900.000000
+PORT
+Params:"0"
+PORT
+Type:"250"
+FIN_BOX
+CONNECTIONS:177
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
 NumberOfControlPoints:0
@@ -1242,12 +1228,6 @@ CONNECTION
 showNpoints:WidgetShowNPoints:Box128:WidgetShowNPoints
 NumberOfControlPoints:0
 CONNECTION
-Box130:Out:Box120:Params
-NumberOfControlPoints:0
-CONNECTION
-Box131:Out:Box128:Params
-NumberOfControlPoints:0
-CONNECTION
 Box120:BoxChange:Box31:In3
 NumberOfControlPoints:0
 CONNECTION
@@ -1281,15 +1261,6 @@ CONNECTION
 Box129:Widget:Box101:Widget1
 NumberOfControlPoints:0
 CONNECTION
-Box60:Out:Box132:In
-NumberOfControlPoints:0
-CONNECTION
-Box132:Out:Box131:In1
-NumberOfControlPoints:0
-CONNECTION
-Box132:Out:Box130:In1
-NumberOfControlPoints:0
-CONNECTION
 Box77:Out:Box133:In
 NumberOfControlPoints:0
 CONNECTION
@@ -1376,4 +1347,16 @@ NumberOfControlPoints:0
 CONNECTION
 Box148:Widget:Box140:Widget9
 NumberOfControlPoints:0
+CONNECTION
+Box95:Out:Box149:Mesh
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box149:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box149:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box149:BoxExecute
+NumberOfControlPoints:0
 APP_END
index 76364467fe315a24d71ef9c33a92829d4e3125c3..530d9a1224407ce5b0591a715203d3176e19653c 100644 (file)
@@ -244,6 +244,7 @@ new std:AddStringToVector Box119
 
 new creaMaracasVisu:ShowNPoints_Tools Box120
   set Box120.BoxProcessMode "Manual"
+  set Box120.Params "1"
   set Box120.Type "220"
 
 new wx:CommandButton Box121
@@ -254,24 +255,14 @@ new wx:CommandButton Box127
 
 new creaMaracasVisu:ShowNPoints_Tools Box128
   set Box128.BoxProcessMode "Manual"
+  set Box128.Params "-1"
   set Box128.Type "220"
 
-new std:ConcatStrings Box130
-  set Box130.In2 "  1"
-
-new std:ConcatStrings Box131
-  set Box131.In2 "  -1"
-
 new std:MultipleInputs Box126
 
 new wx:LayoutLine Box129
   set Box129.Orientation "H"
 
-new std:GetVectorDoubleSubVector Box132
-  set Box132.ErrorValue "0"
-  set Box132.I "3"
-  set Box132.Size "3"
-
 new creaVtk:CleanPolyData Box133
 
 new wx:LayoutLine Box134
@@ -308,6 +299,10 @@ new wx:OutputText Box144
 
 new wx:OutputText Box148
 
+new creaMaracasVisu:ShowNPoints_Tools Box149
+  set Box149.Params "0"
+  set Box149.Type "250"
+
 
 connect Box06.LstContourPointsX Box04.LstX
 connect showNpoints.lstIndexs Box06.LstIndexsIn
@@ -427,8 +422,6 @@ connect Box121.BoxChange Box120.BoxExecute
 connect Box127.BoxChange Box128.BoxExecute
 connect Box68.Spacing Box128.Spacing
 connect showNpoints.WidgetShowNPoints Box128.WidgetShowNPoints
-connect Box130.Out Box120.Params
-connect Box131.Out Box128.Params
 connect Box120.BoxChange Box31.In3
 connect Box128.BoxChange Box31.In5
 connect showNpoints.BoxChange Box126.In4
@@ -440,9 +433,6 @@ connect Box121.Widget Box129.Widget6
 connect Box99.Widget Box101.Widget7
 connect Box118.Widget Box101.Widget4
 connect Box129.Widget Box101.Widget1
-connect Box60.Out Box132.In
-connect Box132.Out Box131.In1
-connect Box132.Out Box130.In1
 connect Box77.Out Box133.In
 connect Box133.Out Box115.In
 connect Box42.Widget Box134.Widget3
@@ -472,6 +462,10 @@ connect Box142.Widget Box79.Widget9
 connect Box143.Widget Box138.Widget9
 connect Box144.Widget Box145.Widget9
 connect Box148.Widget Box140.Widget9
+connect Box95.Out Box149.Mesh
+connect showNpoints.WidgetShowNPoints Box149.WidgetShowNPoints
+connect Box68.Spacing Box149.Spacing
+connect Box04.BoxChange Box149.BoxExecute
 
 # Complex input ports
 input point showNpoints.In " "
index 1806865cd447bef3ebf6770f13a3951d60fa0d80..dc940c619be83e6d6681def25ff11bfb6ee4f655 100644 (file)
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:86
+BOXES:85
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -88,8 +88,8 @@ FIN_BOX
 BOX
 creaVtk:CreateMeshFromPoints:Box04
 ISEXEC:FALSE
-36.572951:11.779111:-900.000000
-59.427951:9.279111:-900.000000
+38.615327:13.367626:-900.000000
+61.470327:10.867626:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:ManualContourModel_Box:Box06
@@ -562,22 +562,6 @@ PORT
 Type:"220"
 FIN_BOX
 BOX
-std:ConcatStrings:Box130
-ISEXEC:FALSE
--389.900889:26.376713:-900.000000
--367.140889:23.876713:-900.000000
-PORT
-In2:"  1"
-FIN_BOX
-BOX
-std:ConcatStrings:Box131
-ISEXEC:FALSE
--359.416982:25.792752:-900.000000
--336.656982:23.292752:-900.000000
-PORT
-In2:"  -1"
-FIN_BOX
-BOX
 std:MultipleInputs:Box126
 ISEXEC:FALSE
 -262.331700:-55.177234:-900.000000
@@ -594,18 +578,6 @@ PORT
 WinTitle:"1.2 Curvature"
 FIN_BOX
 BOX
-std:GetVectorDoubleSubVector:Box132
-ISEXEC:FALSE
--377.171745:33.383870:-900.000000
--353.711745:30.883870:-900.000000
-PORT
-ErrorValue:"0"
-PORT
-I:"3"
-PORT
-Size:"3"
-FIN_BOX
-BOX
 wx:LayoutLine:Box134
 ISEXEC:FALSE
 -114.127728:-42.965229:-900.000000
@@ -636,8 +608,8 @@ FIN_BOX
 BOX
 creaVtk:MeshReduction_DecimatePro:Box143
 ISEXEC:FALSE
-40.721236:-119.806931:-900.000000
-64.326236:-122.306931:-900.000000
+42.736193:-120.891908:-900.000000
+66.341193:-123.391908:-900.000000
 PORT
 BoxProcessMode:"Manual"
 PORT
@@ -766,12 +738,26 @@ FIN_BOX
 BOX
 std:MagicBox:Box157
 ISEXEC:FALSE
-38.119377:-128.210032:-900.000000
-59.829377:-130.710032:-900.000000
+40.444328:-128.210032:-900.000000
+62.154328:-130.710032:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box158
+ISEXEC:FALSE
+45.552020:-23.065434:-900.000000
+68.097020:-25.565434:-900.000000
 PORT
-BoxProcessMode:"Manual"
+Params:"0"
+PORT
+Type:"250"
 FIN_BOX
-CONNECTIONS:173
+BOX
+creaVtk:PolyDataNormals:Box159
+ISEXEC:FALSE
+64.038173:-10.778224:-900.000000
+86.443173:-13.278224:-900.000000
+FIN_BOX
+CONNECTIONS:174
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
 NumberOfControlPoints:0
@@ -1130,15 +1116,6 @@ CONNECTION
 Box121:Widget:Box129:Widget6
 NumberOfControlPoints:0
 CONNECTION
-Box60:Out:Box132:In
-NumberOfControlPoints:0
-CONNECTION
-Box132:Out:Box131:In1
-NumberOfControlPoints:0
-CONNECTION
-Box132:Out:Box130:In1
-NumberOfControlPoints:0
-CONNECTION
 Box42:Widget:Box134:Widget3
 NumberOfControlPoints:0
 CONNECTION
@@ -1286,9 +1263,21 @@ CONNECTION
 Box157:Out:Box93:Mesh
 NumberOfControlPoints:0
 CONNECTION
-Box135:Out:Box157:In
+showNpoints:WidgetShowNPoints:Box158:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box04:BoxChange:Box158:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box158:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box159:In
+NumberOfControlPoints:0
+CONNECTION
+Box159:Out:Box158:Mesh
 NumberOfControlPoints:0
 CONNECTION
-Box135:BoxChange:Box157:BoxExecute
+Box143:Out:Box157:In
 NumberOfControlPoints:0
 APP_END
index 1082d9177f4e5df851701d1a5015dc96a8bc91fc..62cf76675305318ccaa60055ac5d90e44f321ca5 100644 (file)
@@ -203,23 +203,12 @@ new creaMaracasVisu:ShowNPoints_Tools Box128
   set Box128.Params "-1"
   set Box128.Type "220"
 
-new std:ConcatStrings Box130
-  set Box130.In2 "  1"
-
-new std:ConcatStrings Box131
-  set Box131.In2 "  -1"
-
 new std:MultipleInputs Box126
 
 new wx:LayoutLine Box129
   set Box129.Orientation "H"
   set Box129.WinTitle "1.2 Curvature"
 
-new std:GetVectorDoubleSubVector Box132
-  set Box132.ErrorValue "0"
-  set Box132.I "3"
-  set Box132.Size "3"
-
 new wx:LayoutLine Box134
   set Box134.Orientation "V"
   set Box134.WinTitle "1.4   Apply Changes"
@@ -279,7 +268,12 @@ new wx:OutputText Box155
 new wx:OutputText Box156
 
 new std:MagicBox Box157
-  set Box157.BoxProcessMode "Manual"
+
+new creaMaracasVisu:ShowNPoints_Tools Box158
+  set Box158.Params "0"
+  set Box158.Type "250"
+
+new creaVtk:PolyDataNormals Box159
 
 
 connect Box06.LstContourPointsX Box04.LstX
@@ -386,9 +380,6 @@ connect Box120.BoxChange Box126.In1
 connect Box126.BoxChange Box31.BoxExecute
 connect Box127.Widget Box129.Widget4
 connect Box121.Widget Box129.Widget6
-connect Box60.Out Box132.In
-connect Box132.Out Box131.In1
-connect Box132.Out Box130.In1
 connect Box42.Widget Box134.Widget3
 connect Box67.Out Box135.Mesh
 connect Box04.Out Box135.Patch
@@ -438,8 +429,12 @@ connect Box155.Widget Box147.Widget9
 connect Box156.Widget Box138.Widget9
 connect Box157.Out Box45.Mesh
 connect Box157.Out Box93.Mesh
-connect Box135.Out Box157.In
-connect Box135.BoxChange Box157.BoxExecute
+connect showNpoints.WidgetShowNPoints Box158.WidgetShowNPoints
+connect Box04.BoxChange Box158.BoxExecute
+connect Box68.Spacing Box158.Spacing
+connect Box04.Out Box159.In
+connect Box159.Out Box158.Mesh
+connect Box143.Out Box157.In
 
 # Complex input ports
 input point showNpoints.In " "
index c7cf336197607b153ff64c7f49720f104b25657d..0d76ac3ddf54633515715ab69a6ca05dbf0129b3 100644 (file)
@@ -272,7 +272,7 @@ void ShowNPoints_Tools::CreatePatch_Points(std::vector<double> lstX, std::vector
     }
        
     // --- Group 1 ---
-//EED    double centroid[3];
+    double centroid[3];
     
     wsp->InsertCollectionAfter_();
       p[0] = (lstX[0]+lstX[3])/2;
@@ -287,7 +287,7 @@ void ShowNPoints_Tools::CreatePatch_Points(std::vector<double> lstX, std::vector
       wsp->InsertPoint(pM[0] ,pM[1], pM[2],"");
       p[0] = (lstX[0]+lstX[1]+lstX[2]+lstX[3])/4;          p[1] = (lstY[0]+lstY[1]+lstY[2]+lstY[3])/4;          p[2] = (lstZ[0]+lstZ[1]+lstZ[2]+lstZ[3])/4;
       wsp->InsertPoint(p[0] ,p[1], p[2],"");
-//EED    std::copy(std::begin(p), std::end(p), std::begin(centroid));
+         std::copy(std::begin(p), std::end(p), std::begin(centroid));
     // --- Group 2 ---
     wsp->InsertCollectionAfter_();
     dx = lstX[2]-lstX[3];
@@ -396,18 +396,17 @@ void ShowNPoints_Tools::CreatePatch_Points(std::vector<double> lstX, std::vector
         wsp->InvertLstPoints_();
     } // if angle
     
-//EED 2023 07 12
-    //EED    std::vector<double> normalOut(n2, n2 + 3);
-    //EED    double norm = vtkMath::Norm(n2);
-    //EED    normalOut[0] = normalOut[0]/norm;
-    //EED      normalOut[1] = normalOut[1]/norm;
-    //EED      normalOut[2] = normalOut[2]/norm;
+    // You need this for expand tool
+    std::vector<double> normalOut(n2, n2 + 3);
+    double norm = vtkMath::Norm(n2);
+    normalOut[0] = normalOut[0]/norm;
+    normalOut[1] = normalOut[1]/norm;
+    normalOut[2] = normalOut[2]/norm;
+    std::vector<double> outputData;
+    outputData.insert(outputData.end(), &centroid[0], &centroid[3]);
+    outputData.insert(outputData.end(), &normalOut[0], &normalOut[3]);
        
-    //EED      std::vector<double> outputData;
-    //EED      outputData.insert(outputData.end(), &centroid[0], &centroid[3]);
-    //EED      outputData.insert(outputData.end(), &normalOut[0], &normalOut[3]);
-       
-//EED  bbSetOutputOut(outputData);
+bbSetOutputOut(outputData);
     //bbSetOutputOut(normalOut);
     
     // --- Finish ---
@@ -450,13 +449,18 @@ void ShowNPoints_Tools::MovePatchCenter()
        }
  
  */
-
-    double              step                = bbGetInputParams()[0];
-    WidgetShowNPoints   *wsp                = bbGetInputWidgetShowNPoints();
-    wsp->SetActualCollection( wsp->GetLstModelShowNPointsSize()/2 );
-    ModelShowNPoints    *modelSNP           = wsp->GetModelShowNPoints( );
-    modelSNP->SetIdCurrentPoint( modelSNP->GetLstPointsSize()/2 );
-    wsp->MovePoint_( step );
+    std::vector<double> params = bbGetInputParams();
+    if(params.size() == 1)
+    {
+        double              step                = bbGetInputParams()[0];
+        WidgetShowNPoints   *wsp                = bbGetInputWidgetShowNPoints();
+        wsp->SetActualCollection( wsp->GetLstModelShowNPointsSize()/2 );
+        ModelShowNPoints    *modelSNP           = wsp->GetModelShowNPoints( );
+        modelSNP->SetIdCurrentPoint( modelSNP->GetLstPointsSize()/2 );
+        wsp->MovePoint_( step );
+    } else {
+        printf("Error! ShowNPoints_Tools::MovePatchCenter()  Warning params are wrong. Need 1 element (step ex -1  or  1)\n");
+    } // if param size
 }
 
 /**
index 86a7a3193a377894b8b40c1cb34e704dc8f03f14..932cc8ed90a5e568bf3c5bb93d9121f1526057f1 100644 (file)
@@ -65,7 +65,7 @@ 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 patch surface - Create Mesh (based on 1 group and 3 or 4 points)   205:Tool 3 or 4 points to volume surface - Create Mesh (based on 1 group and 3 or 4 points)   210: Invert points   220: Move patch center         230: Move point in normal of surface (Params [-1] or [1])       235: ChangeCurrentPoint (Params [-1] or [1])  240: Join all start-end points to the start-end points on selected spline  250: Set Mesh SPC (Params: [0]:Patch [1]:CloseSpline1 [2]:CloseSpline2)   300: Create expanded surface   310: Create wide expanded surface     320: Expand Surface,   330: Widen surface,   340: Expand patch",int,"");
+  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 patch surface - Create Mesh (based on 1 group and 3 or 4 points)   205:Tool 3 or 4 points to volume surface - Create Mesh (based on 1 group and 3 or 4 points)   210: Invert points   220: Move patch center (param is the step ex [-1] or [1])      230: Move point in normal of surface (Params [-1] or [1])       235: ChangeCurrentPoint (Params [-1] or [1])  240: Join all start-end points to the start-end points on selected spline  250: Set Mesh SPC (Params: [0]:Patch [1]:CloseSpline1 [2]:CloseSpline2)   300: Create expanded surface   310: Create wide expanded surface     320: Expand Surface,   330: Widen surface,   340: Expand patch",int,"");
   BBTK_INPUT(ShowNPoints_Tools, Params,"Optional params for the tools, required for 200: normal and direction, 320: centroid and direction, 330: normal and direction, 340: centroid and direction", std::vector<double>,"");
   
   BBTK_OUTPUT(ShowNPoints_Tools, Out, "Output", std::vector<double>, "");
index aaff102c03e55a5c7ad55d96da8d3f395a26adfa..d3df6e329be025848f714e71c88eca51490a0507 100644 (file)
@@ -850,10 +850,8 @@ void WidgetShowNPoints::OnSetPoint(wxCommandEvent& event)
 void WidgetShowNPoints::MovePoint_(double step)
 {
     step=step;
-    
     StopAutoAddPoints();
     StopTrackPoint();
-
     int id=GetModelShowNPoints()->GetIdCurrentPoint();
     if (aux_mesh!=NULL)
     {
@@ -864,15 +862,14 @@ void WidgetShowNPoints::MovePoint_(double step)
         {
             double              x,y,z;
             double              p[3];
-            double              normal[3];;        // point to modify and normal
-            std::vector<double> pN(3);    // new point
+            double              normal[3];      // point to modify and normal
+            std::vector<double> pN(3);          // new point
             vtkStaticPointLocator   *pointLocator   = vtkStaticPointLocator::New();
             pointLocator->SetDataSet( aux_mesh );
             pointLocator->BuildLocator();
             
     //        int idControlPoint = wsp->GetModelShowNPoints()->GetNearestPoint();
             int idControlPoint = GetModelShowNPoints()->GetIdCurrentPoint();
-            
             if(idControlPoint >= 0)
             {
                 GetModelShowNPoints()->GetIdPoint(idControlPoint, &x, &y, &z);
@@ -880,26 +877,30 @@ void WidgetShowNPoints::MovePoint_(double step)
                 p[1] = y * aux_mesh_spc[1];
                 p[2] = z * aux_mesh_spc[2];
                 long int idMeshPoint = pointLocator->FindClosestPoint(p);
-                aux_mesh->GetPointData()->GetNormals()->GetTuple(idMeshPoint, normal);
-                int direction = step;
-//                pN[0] = p[0] / spc[0] + direction*normal[0];
-//                pN[1] = p[1] / spc[1] + direction*normal[1];
-//                pN[2] = p[2] / spc[2] + direction*normal[2];
-                pN[0] = x + direction*normal[0];
-                pN[1] = y + direction*normal[1];
-                pN[2] = z + direction*normal[2];
-
-                GetModelShowNPoints()->SetPointById(idControlPoint, pN);
-    //          GetViewShowNPoints()->RefreshPoint(idControlPoint);
-//                RefreshCollectionText();
-//                RefreshColourCollection();
-//                SetOutputBox();
-                UndoRedo_SaveCollection();
+                vtkDataArray *dataArrayNormals = aux_mesh->GetPointData()->GetNormals();
+                if (dataArrayNormals!=NULL)
+                {
+                    dataArrayNormals->GetTuple(idMeshPoint, normal);
+                    
+                    int direction = step;
+    //                pN[0] = p[0] / spc[0] + direction*normal[0];
+    //                pN[1] = p[1] / spc[1] + direction*normal[1];
+    //                pN[2] = p[2] / spc[2] + direction*normal[2];
+                    pN[0] = x + (direction * normal[0]);
+                    pN[1] = y + (direction * normal[1]);
+                    pN[2] = z + (direction * normal[2]);
+                    GetModelShowNPoints()->SetPointById(idControlPoint, pN);
+        //          GetViewShowNPoints()->RefreshPoint(idControlPoint);
+    //                RefreshCollectionText();
+    //                RefreshColourCollection();
+    //                SetOutputBox();
+                    UndoRedo_SaveCollection();
+                } else {
+                    printf("Error!  WidgetShowNPoints::MovePoint_  Missing normals in aux_mesh  \n");
+                }
             } // if idControlPoint
         } // if wsp->GetLstModelShowNPointsSiz->size()>=2
-        
     } else {
-        printf("EED WidgetShowNPoints::MovePoint_   BB \n" );
         if (id>=0) {
             int i,j,sizeG,sizeP;
             double max=100000;
@@ -933,7 +934,6 @@ void WidgetShowNPoints::MovePoint_(double step)
             v[1] = p[1]-pc[1];
             v[2] = p[2]-pc[2];
             double mag=sqrt ( v[0]*v[0] + v[1]*v[1] + v[2]*v[2] );
-
             std::vector<double> point;
             if (mag!=0)
             {
@@ -950,11 +950,8 @@ void WidgetShowNPoints::MovePoint_(double step)
             point.push_back( p[2] + step*v[2] );
             GetModelShowNPoints()->SetPointById(id,point);
             UndoRedo_SaveCollection();
-
      } // if id
-
     } // if aux_mesh
-    
  RefreshCollectionText();
  RefreshColourCollection();
 }