]> Creatis software - creaMaracasVisu.git/commitdiff
#3506 New Tool Cut Surface
authorPablo Garzon <gapablo2001@gmail.com>
Tue, 2 May 2023 08:34:18 +0000 (10:34 +0200)
committerPablo Garzon <gapablo2001@gmail.com>
Tue, 2 May 2023 08:34:18 +0000 (10:34 +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/src/bbcreaMaracasVisuShowNPoints_Tools.cxx
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.h

index 43e0ad14c5ed7095bd8398ef7f5d00b850aa13c4..a1b83795cf862d7e92afc52897cdf2a459fb7070 100644 (file)
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:80
+BOXES:137
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -198,8 +198,8 @@ FIN_BOX
 BOX
 std:VectorFilterDouble:Box70
 ISEXEC:FALSE
-49.750242:60.953814:-900.000000
-76.030242:58.453814:-900.000000
+49.425284:47.197247:-900.000000
+75.705284:44.697247:-900.000000
 PORT
 Type:"11"
 FIN_BOX
@@ -535,9 +535,9 @@ ISEXEC:FALSE
 -265.790737:67.872984:-900.000000
 -237.750737:65.372984:-900.000000
 PORT
-In0:"0  1  2   3   4   5   6   7   8      9       10    11    12"
+In0:"0  1  2   3   4   5   6   7   8      9       10"
 PORT
-In1:"1  5 10 20 30 40 50 0  100   110   210    300   310"
+In1:"1  5 10 20 30 40 50 0  100   110   210"
 PORT
 Type:"2"
 FIN_BOX
@@ -582,10 +582,6 @@ 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
@@ -734,20 +730,518 @@ FIN_BOX
 BOX
 wx:OutputText:Box132
 ISEXEC:FALSE
--27.642518:-49.394137:-900.000000
--5.862518:-51.894137:-900.000000
+-422.764180:-37.645206:-900.000000
+-400.984180:-40.145206:-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
+-382.459727:-36.352952:-900.000000
+-360.679727:-38.852952:-900.000000
 PORT
 In:"Widen"
 FIN_BOX
-CONNECTIONS:158
+BOX
+wx:LayoutLine:Box135
+ISEXEC:FALSE
+97.947391:-26.661606:-900.000000
+131.267391:-29.161606:-900.000000
+PORT
+WinTitle:"Flat surface"
+FIN_BOX
+BOX
+wx:CommandButton:Box136
+ISEXEC:FALSE
+125.439910:64.509184:-900.000000
+147.824910:62.009184:-900.000000
+PORT
+Label:"Execute"
+FIN_BOX
+BOX
+wx:OutputText:Box138
+ISEXEC:FALSE
+99.767505:-16.086826:-900.000000
+121.547505:-18.586826:-900.000000
+PORT
+In:"Expand"
+FIN_BOX
+BOX
+std:ConcatStrings:Box139
+ISEXEC:FALSE
+104.836384:20.027246:-900.000000
+127.596384:17.527246:-900.000000
+PORT
+In2:" -1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box140
+ISEXEC:FALSE
+142.295507:22.734142:-900.000000
+165.055507:20.234142:-900.000000
+PORT
+In2:" 1"
+FIN_BOX
+BOX
+wx:CommandButton:Box141
+ISEXEC:FALSE
+105.546070:11.020550:-900.000000
+127.931070:8.520550:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box142
+ISEXEC:FALSE
+138.437616:10.971784:-900.000000
+160.822616:8.471784:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box143
+ISEXEC:FALSE
+106.539771:-3.727140:-900.000000
+129.084771:-6.227140:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"320"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box144
+ISEXEC:FALSE
+140.280628:-2.951969:-900.000000
+162.825628:-5.451969:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"320"
+FIN_BOX
+BOX
+wx:LayoutLine:Box145
+ISEXEC:FALSE
+123.020932:-16.234652:-900.000000
+156.340932:-18.734652:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:GetVectorDoubleSubVector:Box146
+ISEXEC:FALSE
+125.789893:34.575618:-900.000000
+149.249893:32.075618:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"0"
+PORT
+Size:"3"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box147
+ISEXEC:FALSE
+128.654697:47.880613:-900.000000
+151.199697:45.380613:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box148
+ISEXEC:FALSE
+156.874712:-31.926957:-900.000000
+190.194712:-34.426957:-900.000000
+PORT
+WinTitle:"Volume"
+FIN_BOX
+BOX
+wx:CommandButton:Box149
+ISEXEC:FALSE
+196.114607:71.260785:-900.000000
+218.499607:68.760785:-900.000000
+PORT
+Label:"Execute"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box159
+ISEXEC:FALSE
+195.277889:53.705584:-900.000000
+217.822889:51.205584:-900.000000
+PORT
+Type:"310"
+FIN_BOX
+BOX
+wx:OutputText:Box161
+ISEXEC:FALSE
+161.199702:-16.101273:-900.000000
+182.979702:-18.601273:-900.000000
+PORT
+In:"Increase width"
+FIN_BOX
+BOX
+std:ConcatStrings:Box162
+ISEXEC:FALSE
+170.601359:19.037925:-900.000000
+193.361359:16.537925:-900.000000
+PORT
+In2:" -1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box163
+ISEXEC:FALSE
+208.060481:21.744821:-900.000000
+230.820481:19.244821:-900.000000
+PORT
+In2:" 1"
+FIN_BOX
+BOX
+wx:CommandButton:Box164
+ISEXEC:FALSE
+171.311045:10.031229:-900.000000
+193.696045:7.531229:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box165
+ISEXEC:FALSE
+205.187312:9.687047:-900.000000
+227.572312:7.187047:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box166
+ISEXEC:FALSE
+172.304745:-4.716461:-900.000000
+194.849745:-7.216461:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"330"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box167
+ISEXEC:FALSE
+206.045603:-3.941290:-900.000000
+228.590603:-6.441290:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"330"
+FIN_BOX
+BOX
+wx:LayoutLine:Box168
+ISEXEC:FALSE
+186.402880:-15.599182:-900.000000
+219.722880:-18.099182:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:GetVectorDoubleSubVector:Box169
+ISEXEC:FALSE
+187.907034:40.459197:-900.000000
+211.367034:37.959197:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"3"
+PORT
+Size:"3"
+FIN_BOX
+BOX
+wx:LayoutTab:Box184
+ISEXEC:FALSE
+82.779947:-45.267631:-900.000000
+116.099947:-47.767631:-900.000000
+PORT
+WinTitle:"Tool"
+FIN_BOX
+BOX
+std:StringSelect:Box185
+ISEXEC:FALSE
+62.490511:-53.070613:-900.000000
+87.010511:-55.570613:-900.000000
+PORT
+In0:"true"
+PORT
+In1:"true"
+PORT
+In2:"false"
+FIN_BOX
+BOX
+wx:LayoutLine:Box187
+ISEXEC:FALSE
+278.482885:-29.312772:-900.000000
+311.802885:-31.812772:-900.000000
+PORT
+WinTitle:"Patch"
+FIN_BOX
+BOX
+wx:OutputText:Box188
+ISEXEC:FALSE
+288.909937:-6.529554:-900.000000
+310.689937:-9.029554:-900.000000
+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
+315.639354:16.578682:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box192
+ISEXEC:FALSE
+327.130621:18.734500:-900.000000
+349.515621:16.234500:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box193
+ISEXEC:FALSE
+294.248054:4.330992:-900.000000
+316.793054:1.830992:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"220"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box194
+ISEXEC:FALSE
+327.988912:5.106163:-900.000000
+350.533912:2.606163:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"220"
+FIN_BOX
+BOX
+wx:LayoutLine:Box195
+ISEXEC:FALSE
+312.802450:-6.420662:-900.000000
+346.122450:-8.920662:-900.000000
+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
+373.186905:-10.181984:-900.000000
+PORT
+In:"Expand"
+FIN_BOX
+BOX
+std:ConcatStrings:Box199
+ISEXEC:FALSE
+357.794032:32.699874:-900.000000
+380.554032:30.199874:-900.000000
+PORT
+In2:" -1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box200
+ISEXEC:FALSE
+385.947432:33.047573:-900.000000
+408.707432:30.547573:-900.000000
+PORT
+In2:" 1"
+FIN_BOX
+BOX
+wx:CommandButton:Box201
+ISEXEC:FALSE
+355.751321:17.926252:-900.000000
+378.136321:15.426252:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box202
+ISEXEC:FALSE
+389.627588:17.582070:-900.000000
+412.012588:15.082070:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box203
+ISEXEC:FALSE
+356.745021:3.178562:-900.000000
+379.290021:0.678562:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"340"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box204
+ISEXEC:FALSE
+390.485879:3.953733:-900.000000
+413.030879:1.453733:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"340"
+FIN_BOX
+BOX
+wx:LayoutLine:Box205
+ISEXEC:FALSE
+375.299418:-7.573093:-900.000000
+408.619418:-10.073093:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:GetVectorDoubleSubVector:Box206
+ISEXEC:FALSE
+366.187185:42.849427:-900.000000
+389.647185:40.349427:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"0"
+PORT
+Size:"3"
+FIN_BOX
+BOX
+wx:CommandButton:Box207
+ISEXEC:FALSE
+286.657986:68.731795:-900.000000
+309.042986:66.231795:-900.000000
+PORT
+Label:"Execute"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box208
+ISEXEC:FALSE
+297.580748:57.296436:-900.000000
+320.125748:54.796436:-900.000000
+PORT
+Type:"200"
+FIN_BOX
+BOX
+wx:OutputText:Box210
+ISEXEC:FALSE
+228.188567:-13.232422:-900.000000
+249.968567:-15.732422:-900.000000
+PORT
+In:"Expand"
+FIN_BOX
+BOX
+std:ConcatStrings:Box211
+ISEXEC:FALSE
+233.257446:22.881650:-900.000000
+256.017446:20.381650:-900.000000
+PORT
+In2:" -1"
+FIN_BOX
+BOX
+std:ConcatStrings:Box212
+ISEXEC:FALSE
+270.716569:25.588546:-900.000000
+293.476569:23.088546:-900.000000
+PORT
+In2:" 1"
+FIN_BOX
+BOX
+wx:CommandButton:Box213
+ISEXEC:FALSE
+233.967132:13.874954:-900.000000
+256.352132:11.374954:-900.000000
+PORT
+Label:"-"
+FIN_BOX
+BOX
+wx:CommandButton:Box214
+ISEXEC:FALSE
+267.843400:13.530772:-900.000000
+290.228400:11.030772:-900.000000
+PORT
+Label:"+"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box215
+ISEXEC:FALSE
+234.960833:-0.872736:-900.000000
+257.505833:-3.372736:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"320"
+FIN_BOX
+BOX
+creaMaracasVisu:ShowNPoints_Tools:Box216
+ISEXEC:FALSE
+268.701690:-0.097565:-900.000000
+291.246690:-2.597565:-900.000000
+PORT
+BoxProcessMode:"Manual"
+PORT
+Type:"320"
+FIN_BOX
+BOX
+wx:LayoutLine:Box217
+ISEXEC:FALSE
+251.441994:-13.380248:-900.000000
+284.761994:-15.880248:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+BOX
+std:GetVectorDoubleSubVector:Box218
+ISEXEC:FALSE
+242.526243:40.877534:-900.000000
+265.986243:38.377534:-900.000000
+PORT
+ErrorValue:"0"
+PORT
+I:"0"
+PORT
+Size:"3"
+FIN_BOX
+BOX
+std:ConcatStrings:Box227
+ISEXEC:FALSE
+145.371679:57.840527:-900.000000
+168.131679:55.340527:-900.000000
+PORT
+In1:"300"
+FIN_BOX
+CONNECTIONS:243
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
 NumberOfControlPoints:0
@@ -1152,9 +1646,6 @@ CONNECTION
 Box117:Widget:Box120:Widget3
 NumberOfControlPoints:0
 CONNECTION
-Box120:Widget:Box50:Widget9
-NumberOfControlPoints:0
-CONNECTION
 Box121:Out:Box114:In1
 NumberOfControlPoints:0
 CONNECTION
@@ -1197,15 +1688,6 @@ 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
 Box60:Out:Box130:In
 NumberOfControlPoints:0
 CONNECTION
@@ -1223,4 +1705,271 @@ NumberOfControlPoints:0
 CONNECTION
 Box77:Out:Box45:Mesh
 NumberOfControlPoints:0
+CONNECTION
+Box138:Widget:Box135:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box142:BoxChange:Box144:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box141:BoxChange:Box143:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box139:Out:Box143:Params
+NumberOfControlPoints:0
+CONNECTION
+Box140:Out:Box144:Params
+NumberOfControlPoints:0
+CONNECTION
+Box146:Out:Box139:In1
+NumberOfControlPoints:0
+CONNECTION
+Box146:Out:Box140:In1
+NumberOfControlPoints:0
+CONNECTION
+Box145:Widget:Box135:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box136:BoxChange:Box147:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box147:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box147:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box147:Mesh
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box144:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box143:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box149:BoxChange:Box159:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box159:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box165:BoxChange:Box167:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box164:BoxChange:Box166:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box162:Out:Box166:Params
+NumberOfControlPoints:0
+CONNECTION
+Box163:Out:Box167:Params
+NumberOfControlPoints:0
+CONNECTION
+Box169:Out:Box162:In1
+NumberOfControlPoints:0
+CONNECTION
+Box169:Out:Box163:In1
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box159:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box166:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box167:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box168:Widget:Box148:Widget8
+NumberOfControlPoints:0
+CONNECTION
+Box161:Widget:Box148:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box141:Widget:Box145:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box142:Widget:Box145:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box164:Widget:Box168:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box165:Widget:Box168:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box136:Widget:Box135:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box135:Widget:Box184:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box148:Widget:Box184:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box184:Widget:Box86:Widget6
+NumberOfControlPoints:0
+CONNECTION
+Box184:Selection:Box185:In
+NumberOfControlPoints:0
+CONNECTION
+Box185:Out:Box04:CloseSurface
+NumberOfControlPoints:0
+CONNECTION
+Box185:Out:Box06:OpenClose
+NumberOfControlPoints:0
+CONNECTION
+Box147:Out:Box146:In
+NumberOfControlPoints:0
+CONNECTION
+Box192:BoxChange:Box194:BoxExecute
+NumberOfControlPoints:0
+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
+Box188:Widget:Box187:Widget7
+NumberOfControlPoints:0
+CONNECTION
+Box191:Widget:Box195:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box192:Widget:Box195:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box187:Widget:Box184:Widget6
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box194:WidgetShowNPoints
+NumberOfControlPoints:0
+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
+Box201:BoxChange:Box203:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box199:Out:Box203:Params
+NumberOfControlPoints:0
+CONNECTION
+Box200:Out:Box204:Params
+NumberOfControlPoints:0
+CONNECTION
+Box201:Widget:Box205:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box202:Widget:Box205:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box206:Out:Box199:In1
+NumberOfControlPoints:0
+CONNECTION
+Box206:Out:Box200:In1
+NumberOfControlPoints:0
+CONNECTION
+Box205:Widget:Box187:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box198:Widget:Box187:Widget4
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box204:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box203:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box149:Widget:Box148:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box159:Out:Box169:In
+NumberOfControlPoints:0
+CONNECTION
+Box207:BoxChange:Box208:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box208:Out:Box197:In
+NumberOfControlPoints:0
+CONNECTION
+Box208:Out:Box206:In
+NumberOfControlPoints:0
+CONNECTION
+Box214:BoxChange:Box216:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box213:BoxChange:Box215:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box211:Out:Box215:Params
+NumberOfControlPoints:0
+CONNECTION
+Box212:Out:Box216:Params
+NumberOfControlPoints:0
+CONNECTION
+Box218:Out:Box211:In1
+NumberOfControlPoints:0
+CONNECTION
+Box218:Out:Box212:In1
+NumberOfControlPoints:0
+CONNECTION
+Box213:Widget:Box217:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box214:Widget:Box217:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box159:Out:Box218:In
+NumberOfControlPoints:0
+CONNECTION
+Box217:Widget:Box148:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box210:Widget:Box148:Widget4
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box215:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box216:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:WidgetShowNPoints:Box208:WidgetShowNPoints
+NumberOfControlPoints:0
+CONNECTION
+Box207:Widget:Box187:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box208:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box208:Spacing
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box159:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box227:Out:Box147:Type
+NumberOfControlPoints:0
+CONNECTION
+Box136:BoxChange:Box227:BoxExecute
+NumberOfControlPoints:0
 APP_END
index f3ea3d335abb88de4626172a076dd2e295902e41..47ac4269a6c5104a08df20c00c9e92676ee634f9 100644 (file)
@@ -191,8 +191,8 @@ new std:AddStringToVector Box99
   set Box99.In0 "Auto Add Points (Start/Stop)"
 
 new std:VectorFilterString Box100
-  set Box100.In0 "0  1  2   3   4   5   6   7   8      9       10    11    12"
-  set Box100.In1 "1  5 10 20 30 40 50 0  100   110   210    300   310"
+  set Box100.In0 "0  1  2   3   4   5   6   7   8      9       10"
+  set Box100.In1 "1  5 10 20 30 40 50 0  100   110   210"
   set Box100.Type "2"
 
 new std:ConcatStrings Box101
@@ -210,8 +210,6 @@ new creaVtk:GlyphPolyDataNormals Box104
 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"
@@ -275,6 +273,198 @@ new wx:OutputText Box132
 new wx:OutputText Box133
   set Box133.In "Widen"
 
+new wx:LayoutLine Box135
+  set Box135.WinTitle "Flat surface"
+
+new wx:CommandButton Box136
+  set Box136.Label "Execute"
+
+new wx:OutputText Box138
+  set Box138.In "Expand"
+
+new std:ConcatStrings Box139
+  set Box139.In2 " -1"
+
+new std:ConcatStrings Box140
+  set Box140.In2 " 1"
+
+new wx:CommandButton Box141
+  set Box141.Label "-"
+
+new wx:CommandButton Box142
+  set Box142.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box143
+  set Box143.BoxProcessMode "Manual"
+  set Box143.Type "320"
+
+new creaMaracasVisu:ShowNPoints_Tools Box144
+  set Box144.BoxProcessMode "Manual"
+  set Box144.Type "320"
+
+new wx:LayoutLine Box145
+  set Box145.Orientation "H"
+
+new std:GetVectorDoubleSubVector Box146
+  set Box146.ErrorValue "0"
+  set Box146.I "0"
+  set Box146.Size "3"
+
+new creaMaracasVisu:ShowNPoints_Tools Box147
+
+new wx:LayoutLine Box148
+  set Box148.WinTitle "Volume"
+
+new wx:CommandButton Box149
+  set Box149.Label "Execute"
+
+new creaMaracasVisu:ShowNPoints_Tools Box159
+  set Box159.Type "310"
+
+new wx:OutputText Box161
+  set Box161.In "Increase width"
+
+new std:ConcatStrings Box162
+  set Box162.In2 " -1"
+
+new std:ConcatStrings Box163
+  set Box163.In2 " 1"
+
+new wx:CommandButton Box164
+  set Box164.Label "-"
+
+new wx:CommandButton Box165
+  set Box165.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box166
+  set Box166.BoxProcessMode "Manual"
+  set Box166.Type "330"
+
+new creaMaracasVisu:ShowNPoints_Tools Box167
+  set Box167.BoxProcessMode "Manual"
+  set Box167.Type "330"
+
+new wx:LayoutLine Box168
+  set Box168.Orientation "H"
+
+new std:GetVectorDoubleSubVector Box169
+  set Box169.ErrorValue "0"
+  set Box169.I "3"
+  set Box169.Size "3"
+
+new wx:LayoutTab Box184
+  set Box184.WinTitle "Tool"
+
+new std:StringSelect Box185
+  set Box185.In0 "true"
+  set Box185.In1 "true"
+  set Box185.In2 "false"
+
+new wx:LayoutLine Box187
+  set Box187.WinTitle "Patch"
+
+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 "-"
+
+new wx:CommandButton Box192
+  set Box192.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box193
+  set Box193.BoxProcessMode "Manual"
+  set Box193.Type "220"
+
+new creaMaracasVisu:ShowNPoints_Tools Box194
+  set Box194.BoxProcessMode "Manual"
+  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"
+
+new std:ConcatStrings Box199
+  set Box199.In2 " -1"
+
+new std:ConcatStrings Box200
+  set Box200.In2 " 1"
+
+new wx:CommandButton Box201
+  set Box201.Label "-"
+
+new wx:CommandButton Box202
+  set Box202.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box203
+  set Box203.BoxProcessMode "Manual"
+  set Box203.Type "340"
+
+new creaMaracasVisu:ShowNPoints_Tools Box204
+  set Box204.BoxProcessMode "Manual"
+  set Box204.Type "340"
+
+new wx:LayoutLine Box205
+  set Box205.Orientation "H"
+
+new std:GetVectorDoubleSubVector Box206
+  set Box206.ErrorValue "0"
+  set Box206.I "0"
+  set Box206.Size "3"
+
+new wx:CommandButton Box207
+  set Box207.Label "Execute"
+
+new creaMaracasVisu:ShowNPoints_Tools Box208
+  set Box208.Type "200"
+
+new wx:OutputText Box210
+  set Box210.In "Expand"
+
+new std:ConcatStrings Box211
+  set Box211.In2 " -1"
+
+new std:ConcatStrings Box212
+  set Box212.In2 " 1"
+
+new wx:CommandButton Box213
+  set Box213.Label "-"
+
+new wx:CommandButton Box214
+  set Box214.Label "+"
+
+new creaMaracasVisu:ShowNPoints_Tools Box215
+  set Box215.BoxProcessMode "Manual"
+  set Box215.Type "320"
+
+new creaMaracasVisu:ShowNPoints_Tools Box216
+  set Box216.BoxProcessMode "Manual"
+  set Box216.Type "320"
+
+new wx:LayoutLine Box217
+  set Box217.Orientation "H"
+
+new std:GetVectorDoubleSubVector Box218
+  set Box218.ErrorValue "0"
+  set Box218.I "0"
+  set Box218.Size "3"
+
+new std:ConcatStrings Box227
+  set Box227.In1 "300"
+
 
 connect Box06.LstContourPointsX Box04.LstX
 connect showNpoints.lstIndexs Box06.LstIndexsIn
@@ -396,7 +586,6 @@ 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
@@ -410,15 +599,101 @@ 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 Box60.Out Box130.In
 connect Box60.Out Box121.In
 connect Box77.Out Box93.Mesh
 connect Box77.BoxChange Box93.BoxExecute
 connect Box105.Out Box77.In2
 connect Box77.Out Box45.Mesh
+connect Box138.Widget Box135.Widget4
+connect Box142.BoxChange Box144.BoxExecute
+connect Box141.BoxChange Box143.BoxExecute
+connect Box139.Out Box143.Params
+connect Box140.Out Box144.Params
+connect Box146.Out Box139.In1
+connect Box146.Out Box140.In1
+connect Box145.Widget Box135.Widget6
+connect Box136.BoxChange Box147.BoxExecute
+connect showNpoints.WidgetShowNPoints Box147.WidgetShowNPoints
+connect Box68.Spacing Box147.Spacing
+connect Box67.Out Box147.Mesh
+connect showNpoints.WidgetShowNPoints Box144.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box143.WidgetShowNPoints
+connect Box149.BoxChange Box159.BoxExecute
+connect Box68.Spacing Box159.Spacing
+connect Box165.BoxChange Box167.BoxExecute
+connect Box164.BoxChange Box166.BoxExecute
+connect Box162.Out Box166.Params
+connect Box163.Out Box167.Params
+connect Box169.Out Box162.In1
+connect Box169.Out Box163.In1
+connect showNpoints.WidgetShowNPoints Box159.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box166.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box167.WidgetShowNPoints
+connect Box168.Widget Box148.Widget8
+connect Box161.Widget Box148.Widget7
+connect Box141.Widget Box145.Widget3
+connect Box142.Widget Box145.Widget4
+connect Box164.Widget Box168.Widget3
+connect Box165.Widget Box168.Widget4
+connect Box136.Widget Box135.Widget2
+connect Box135.Widget Box184.Widget2
+connect Box148.Widget Box184.Widget4
+connect Box184.Widget Box86.Widget6
+connect Box184.Selection Box185.In
+connect Box185.Out Box04.CloseSurface
+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
+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
+connect Box200.Out Box204.Params
+connect Box201.Widget Box205.Widget3
+connect Box202.Widget Box205.Widget4
+connect Box206.Out Box199.In1
+connect Box206.Out Box200.In1
+connect Box205.Widget Box187.Widget5
+connect Box198.Widget Box187.Widget4
+connect showNpoints.WidgetShowNPoints Box204.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box203.WidgetShowNPoints
+connect Box149.Widget Box148.Widget1
+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
+connect Box211.Out Box215.Params
+connect Box212.Out Box216.Params
+connect Box218.Out Box211.In1
+connect Box218.Out Box212.In1
+connect Box213.Widget Box217.Widget3
+connect Box214.Widget Box217.Widget4
+connect Box159.Out Box218.In
+connect Box217.Widget Box148.Widget5
+connect Box210.Widget Box148.Widget4
+connect showNpoints.WidgetShowNPoints Box215.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box216.WidgetShowNPoints
+connect showNpoints.WidgetShowNPoints Box208.WidgetShowNPoints
+connect Box207.Widget Box187.Widget1
+connect Box67.Out Box208.Mesh
+connect Box68.Spacing Box208.Spacing
+connect Box67.Out Box159.Mesh
+connect Box227.Out Box147.Type
+connect Box136.BoxChange Box227.BoxExecute
 
 # Complex input ports
 input point showNpoints.In " "
index b75e4201b5745950269a33a392ab04db71a1bcd4..f0646c17e84ed3444d01b1e1c7d9ca0850a8621e 100644 (file)
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:83
+BOXES:84
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -728,16 +728,16 @@ FIN_BOX
 BOX
 std:ConcatStrings:Box130
 ISEXEC:FALSE
--378.800018:37.000233:-900.000000
--356.040018:34.500233:-900.000000
+-377.646633:23.880476:-900.000000
+-354.886633:21.380476:-900.000000
 PORT
 In2:"  1"
 FIN_BOX
 BOX
 std:ConcatStrings:Box131
 ISEXEC:FALSE
--344.138161:36.747302:-900.000000
--321.378161:34.247302:-900.000000
+-336.496984:24.204237:-900.000000
+-313.736984:21.704237:-900.000000
 PORT
 In2:"  -1"
 FIN_BOX
@@ -755,7 +755,19 @@ ISEXEC:FALSE
 PORT
 Orientation:"H"
 FIN_BOX
-CONNECTIONS:172
+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
+CONNECTIONS:173
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
 NumberOfControlPoints:0
@@ -1228,12 +1240,6 @@ CONNECTION
 showNpoints:WidgetShowNPoints:Box128:WidgetShowNPoints
 NumberOfControlPoints:0
 CONNECTION
-Box60:Out:Box130:In1
-NumberOfControlPoints:0
-CONNECTION
-Box60:Out:Box131:In1
-NumberOfControlPoints:0
-CONNECTION
 Box130:Out:Box120:Params
 NumberOfControlPoints:0
 CONNECTION
@@ -1272,4 +1278,13 @@ NumberOfControlPoints:0
 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
 APP_END
index 1ca503f8942d030451f9f7ef61a1d004ad76e2e7..8fa0a4d3f5e66f86eccdeaf67f048c2daeb6db2e 100644 (file)
@@ -276,6 +276,11 @@ 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"
+
 
 connect Box06.LstContourPointsX Box04.LstX
 connect showNpoints.lstIndexs Box06.LstIndexsIn
@@ -419,8 +424,6 @@ connect Box121.BoxChange Box120.BoxExecute
 connect Box127.BoxChange Box128.BoxExecute
 connect Box68.Spacing Box128.Spacing
 connect showNpoints.WidgetShowNPoints Box128.WidgetShowNPoints
-connect Box60.Out Box130.In1
-connect Box60.Out Box131.In1
 connect Box130.Out Box120.Params
 connect Box131.Out Box128.Params
 connect Box120.BoxChange Box31.In3
@@ -434,6 +437,9 @@ 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
 
 # Complex input ports
 input point showNpoints.In " "
index ed139208ac6705952579c03568e991dfd11bea5e..8571c5f78f50cb90da7e101b4c1a6f12cfab2e76 100644 (file)
@@ -187,6 +187,8 @@ void ShowNPoints_Tools::CreatePatch_Points(std::vector<double> lstX, std::vector
     }
        
     // --- Group 1 ---
+    double centroid[3];
+    
     wsp->InsertCollectionAfter_();
       p[0] = (lstX[0]+lstX[3])/2;
       p[1] = (lstY[0]+lstY[3])/2;
@@ -200,7 +202,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],"");
-       
+         std::copy(std::begin(p), std::end(p), std::begin(centroid));
     // --- Group 2 ---
     
     wsp->InsertCollectionAfter_();
@@ -318,7 +320,13 @@ void ShowNPoints_Tools::CreatePatch_Points(std::vector<double> lstX, std::vector
     normalOut[0] = normalOut[0]/norm;
        normalOut[1] = normalOut[1]/norm;
        normalOut[2] = normalOut[2]/norm;
-    bbSetOutputOut(normalOut);
+       
+       std::vector<double> outputData;
+       outputData.insert(outputData.end(), &centroid[0], &centroid[3]);
+       outputData.insert(outputData.end(), &normalOut[0], &normalOut[3]);
+       
+       bbSetOutputOut(outputData);
+    //bbSetOutputOut(normalOut);
     
     // --- Finish ---
     wsp->SetOutputBox();
@@ -369,7 +377,7 @@ void ShowNPoints_Tools::MovePatchCenter()
 void ShowNPoints_Tools::CreateExpandedSurface()
 {
        //
-       //Set Input to 0 as this function is only used by the popup menu
+       //Set Input to 0 as this function should only be executed manually but still update its children.
        bbSetInputType(0);
        //
        //
@@ -378,6 +386,9 @@ void ShowNPoints_Tools::CreateExpandedSurface()
     wsp->StopTrackPoint();
        if((wsp->GetLstModelShowNPointsSize()==1) && (bbGetInputMesh()!=NULL ) && (wsp->GetModelShowNPoints()->GetLstPointsSize()>0))
        {       
+               //Set Input to 0 as this function should only be executed manually but still update its children.
+               //bbSetInputType(0);
+               //
                std::vector<double> lstX = wsp->GetModelShowNPoints()->GetLstPointsX();
                std::vector<double> lstY = wsp->GetModelShowNPoints()->GetLstPointsY();
                std::vector<double> lstZ = wsp->GetModelShowNPoints()->GetLstPointsZ();
@@ -428,7 +439,7 @@ void ShowNPoints_Tools::CreateWideExpandedSurface()
 {
        //
        //Set Input to 0 as this function is only used by the popup menu
-       bbSetInputType(0);
+       //bbSetInputType(0);
        //
        //
        WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
@@ -479,8 +490,8 @@ void ShowNPoints_Tools::CreateWideExpandedSurface()
                
                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++){
+               //Add new groups on both sides from the original spline
+               for(int group = 0; group < 2; group++){
                        for(int i = 0; i < (int) lstX.size(); i++){
                                dV[0] = lstX[i] - centroid[0];
                                dV[1] = lstY[i] - centroid[1];
@@ -492,8 +503,8 @@ void ShowNPoints_Tools::CreateWideExpandedSurface()
                                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_();
+                       addNormal = -1;
+                       if(group < 1)wsp->InsertCollectionAfter_();
                }
                
                std::vector<double> outData = {centroid[0], centroid[1], centroid[2], normal[0], normal[1], normal[2]};
@@ -516,22 +527,21 @@ void ShowNPoints_Tools::ExpandSurfaceArea()
        WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
        wsp->StopAutoAddPoints();
     wsp->StopTrackPoint();
-
-       if((wsp->GetLstModelShowNPointsSize()==1 || wsp->GetLstModelShowNPointsSize() == 3)  
+    
+       if((wsp->GetLstModelShowNPointsSize()==1 || wsp->GetLstModelShowNPointsSize() == 2)  
                && (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);
+                       wsp->GetCollectionPoint(0, i, currPoint);
                        dV[0] = currPoint[0] - centroid[0];
                        dV[1] = currPoint[1] - centroid[1];
                        dV[2] = currPoint[2] - centroid[2];
@@ -540,18 +550,13 @@ void ShowNPoints_Tools::ExpandSurfaceArea()
                        vtkMath::MultiplyScalar(dV, direction);
                        vtkMath::Add(currPoint, dV, mdfdPoint);
                        modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
-                       wsp->SetCollectionPoint(numCollection, i, modPoint);
+                       wsp->SetCollectionPoint(0, 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);
+                       if(wsp->GetLstModelShowNPointsSize() == 2){
+                               wsp->GetCollectionPoint(1, i, currPoint);
                                vtkMath::Add(currPoint, dV, mdfdPoint);
                                modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
-                               wsp->SetCollectionPoint(2, i, modPoint);
+                               wsp->SetCollectionPoint(1, i, modPoint);
                        }
                }
        }
@@ -562,8 +567,69 @@ void ShowNPoints_Tools::ExpandSurfaceArea()
         wsp->SetOutputBox();
         wsp->UndoRedo_SaveCollection();
 }
+
+void ShowNPoints_Tools::ExpandPatch()
+{
+       WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
+       wsp->StopAutoAddPoints();
+    wsp->StopTrackPoint();
+       if((wsp->GetLstModelShowNPointsSize() == 3)  
+               && (wsp->GetLstPointsX().size() == 13)
+               && (bbGetInputParams().size() == 4))
+       {
+               std::vector<double> params = bbGetInputParams();
+               double direction = params[3];
+               double centroid[3] = {params[0], params[1], params[2]};
+
+               std::vector<double> modPoint(3);
+               double currentPoint[3], dV[3], mdfdPoint[3];
+               for(int group = 0; group < 3; group++){
+                       if(group == 1){
+                               cout << "collection: " << group << " i: " << "0" << endl;
+                               wsp->GetCollectionPoint(group, 0, currentPoint);
+                               dV[0] = currentPoint[0] - centroid[0];
+                               dV[1] = currentPoint[1] - centroid[1];
+                               dV[2] = currentPoint[2] - centroid[2];
+                               vtkMath::Normalize(dV);
+                               vtkMath::MultiplyScalar(dV, direction);
+                               vtkMath::Add(currentPoint, dV, mdfdPoint);
+                               modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
+                               wsp->SetCollectionPoint(group, 0, modPoint);
+                               cout << "collection: " << group << " i: " << "2" << endl;
+                               wsp->GetCollectionPoint(group, 2, currentPoint);
+                               dV[0] = currentPoint[0] - centroid[0];
+                               dV[1] = currentPoint[1] - centroid[1];
+                               dV[2] = currentPoint[2] - centroid[2];
+                               vtkMath::Normalize(dV);
+                               vtkMath::MultiplyScalar(dV, direction);
+                               vtkMath::Add(currentPoint, dV, mdfdPoint);
+                               modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
+                               wsp->SetCollectionPoint(group, 2, modPoint);
+                       }else{
+                               for(int i = 0; i < 5; i++){
+                                       wsp->GetCollectionPoint(group,i, currentPoint);
+                                       dV[0] = currentPoint[0] - centroid[0];
+                                       dV[1] = currentPoint[1] - centroid[1];
+                                       dV[2] = currentPoint[2] - centroid[2];
+                                       vtkMath::Normalize(dV);
+                                       vtkMath::MultiplyScalar(dV, direction);
+                                       vtkMath::Add(currentPoint, dV, mdfdPoint);
+                                       modPoint.insert(modPoint.begin(), std::begin(mdfdPoint), std::end(mdfdPoint));
+                                       cout << "collection: " << group << " i: " << i << endl;
+                                       wsp->SetCollectionPoint(group, i, modPoint);
+                               }
+                       }
+               }
+       }else{
+               printf("PG ShowNPoints_Tools::ExpandPatch  Warning groups, points or params invalid. need 3 groups of points, need 4 params(centroid, and direction 1 or -1)\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".
+*      Given a cutting surface, expand the distance between the edge splines and the middle spline. making it "wider" or "thicker".
 */
 void ShowNPoints_Tools::WidenSurface()
 {
@@ -571,7 +637,7 @@ void ShowNPoints_Tools::WidenSurface()
        wsp->StopAutoAddPoints();
     wsp->StopTrackPoint();
 
-       if((wsp->GetLstModelShowNPointsSize()==3)  
+       if((wsp->GetLstModelShowNPointsSize()==2)  
                && (wsp->GetModelShowNPoints()->GetLstPointsSize()>0)
                && (bbGetInputParams().size() == 4))
        {
@@ -584,13 +650,13 @@ void ShowNPoints_Tools::WidenSurface()
                std::vector<double> modifiedPoint;
                for(int i = 0; i < pointsPerSpline; i++){
                        wsp->GetCollectionPoint(0, i, pointSp1);
-                       wsp->GetCollectionPoint(2, i, pointSp2);
+                       wsp->GetCollectionPoint(1, 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);
+                       wsp->SetCollectionPoint(1, i, modifiedPoint);
                }
        
        }else{
@@ -692,6 +758,10 @@ void ShowNPoints_Tools::Process()
         {
                WidenSurface();
         } // if Type
+        if(bbGetInputType()==340)
+        {
+               ExpandPatch();
+        } // if Type
     } // if bbGetInputWidgetShowNPoints
 }
 //===== 
index 640045f24577f43fc131c2a14d231a3b8c4cf63c..ce3627c131a5da88087deef5cc6af71e9e483b84 100644 (file)
@@ -45,6 +45,7 @@ class bbcreaMaracasVisu_EXPORT ShowNPoints_Tools
     void CreateWideExpandedSurface();
     void ExpandSurfaceArea();
     void WidenSurface();
+    void ExpandPatch();
 
 //===== 
 // 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)
@@ -59,8 +60,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   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_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,   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>, "");
 //  BBTK_OUTPUT(ShowNPoints_Tools,Out,"First output",double,"");