meshmanagermodel
-150.374274:130.740991:-900.000000
FIN_COMPLEX_PORT
-BOXES:87
+BOXES:86
BOX
creaMaracasVisu:ShowNPoints:showNpoints
ISEXEC:FALSE
BOX
creaMaracasVisu:PolyDataToActor_Widget:Box37
ISEXEC:FALSE
--78.990878:-90.579841:-900.000000
--55.970878:-93.079841:-900.000000
+-78.826120:-92.227420:-900.000000
+-55.806120:-94.727420:-900.000000
PORT
color:"0 1 1"
PORT
BOX
creaVtk:MeshManager:Box92
ISEXEC:FALSE
--28.843589:-73.485234:-900.000000
--6.813589:-75.985234:-900.000000
+-28.349315:-72.331929:-900.000000
+-6.319315:-74.831929:-900.000000
FIN_BOX
BOX
creaVtk:MeshManager_tool:Box93
ISEXEC:FALSE
-37.734522:-140.066535:-900.000000
-60.234522:-142.566535:-900.000000
+49.926605:-150.446282:-900.000000
+72.426605:-152.946282:-900.000000
PORT
Tool:"35"
FIN_BOX
BOX
creaMaracasVisu:ShowNPoints_Tools:Box120
ISEXEC:FALSE
--380.000207:-26.721711:-900.000000
--357.455207:-29.221711:-900.000000
+-382.950306:-29.444879:-900.000000
+-360.405306:-31.944879:-900.000000
PORT
BoxProcessMode:"Manual"
PORT
+Params:"1"
+PORT
Type:"220"
FIN_BOX
BOX
PORT
BoxProcessMode:"Manual"
PORT
+Params:"-1"
+PORT
Type:"220"
FIN_BOX
BOX
std:ConcatStrings:Box130
ISEXEC:FALSE
--377.646633:23.880476:-900.000000
--354.886633:21.380476:-900.000000
+-389.900889:26.376713:-900.000000
+-367.140889:23.876713:-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
+-359.416982:25.792752:-900.000000
+-336.656982:23.292752:-900.000000
PORT
In2:" -1"
FIN_BOX
BOX
std:GetVectorDoubleSubVector:Box132
ISEXEC:FALSE
--346.082243:44.049611:-900.000000
--322.622243:41.549611:-900.000000
+-377.171745:33.383870:-900.000000
+-353.711745:30.883870:-900.000000
PORT
ErrorValue:"0"
PORT
63.214011:-94.383830:-900.000000
FIN_BOX
BOX
-vtk:MarchingCubes:Box141
-ISEXEC:FALSE
-85.086669:-114.162421:-900.000000
-107.371669:-116.662421:-900.000000
-FIN_BOX
-BOX
-vtk:ImageGaussianSmooth:Box142
-ISEXEC:FALSE
-78.317640:-101.123010:-900.000000
-101.322640:-103.623010:-900.000000
-PORT
-StdDevX:"1"
-PORT
-StdDevY:"1"
-PORT
-StdDevZ:"1"
-FIN_BOX
-BOX
creaVtk:MeshReduction_DecimatePro:Box143
ISEXEC:FALSE
40.721236:-119.806931:-900.000000
BOX
std:MultipleInputs:Box154
ISEXEC:FALSE
-44.500333:-130.635183:-900.000000
-66.580333:-133.135183:-900.000000
+65.754100:-130.140909:-900.000000
+87.834100:-132.640909:-900.000000
FIN_BOX
BOX
wx:LayoutLine:Box136
-62.727956:-100.753344:-900.000000
-40.947956:-103.253344:-900.000000
FIN_BOX
-CONNECTIONS:175
+BOX
+std:MagicBox:Box157
+ISEXEC:FALSE
+38.119377:-128.210032:-900.000000
+59.829377:-130.710032:-900.000000
+PORT
+BoxProcessMode:"Manual"
+FIN_BOX
+CONNECTIONS:173
CONNECTION
Box06:LstContourPointsX:Box04:LstX
NumberOfControlPoints:0
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
Box140:Out:Box139:InImage
NumberOfControlPoints:0
CONNECTION
-Box139:Out:Box142:In
-NumberOfControlPoints:0
-CONNECTION
Box129:Widget:Box146:Widget2
NumberOfControlPoints:0
CONNECTION
Box148:Widget:Box79:Widget4
NumberOfControlPoints:0
CONNECTION
-Box143:Out:Box45:Mesh
-NumberOfControlPoints:0
-CONNECTION
-Box143:Out:Box93:Mesh
-NumberOfControlPoints:0
-CONNECTION
Box53:BoxChange:Box143:BoxExecute
NumberOfControlPoints:0
CONNECTION
Box139:Out:Box151:In
NumberOfControlPoints:0
CONNECTION
-Box151:Out:Box141:In
-NumberOfControlPoints:0
-CONNECTION
Box151:Out:Box152:In
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box156:Widget:Box138:Widget9
NumberOfControlPoints:0
+CONNECTION
+Box157:Out:Box45:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box157:Out:Box93:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box135:Out:Box157:In
+NumberOfControlPoints:0
+CONNECTION
+Box135:BoxChange:Box157:BoxExecute
+NumberOfControlPoints:0
APP_END
new creaMaracasVisu:ShowNPoints_Tools Box120
set Box120.BoxProcessMode "Manual"
+ set Box120.Params "1"
set Box120.Type "220"
new wx:CommandButton Box121
new creaMaracasVisu:ShowNPoints_Tools Box128
set Box128.BoxProcessMode "Manual"
+ set Box128.Params "-1"
set Box128.Type "220"
new std:ConcatStrings Box130
new vtk:CreateImage Box140
-new vtk:MarchingCubes Box141
-
-new vtk:ImageGaussianSmooth Box142
- set Box142.StdDevX "1"
- set Box142.StdDevY "1"
- set Box142.StdDevZ "1"
-
new creaVtk:MeshReduction_DecimatePro Box143
set Box143.BoxProcessMode "Manual"
set Box143.TargetReduction "0.8"
new wx:OutputText Box156
+new std:MagicBox Box157
+ set Box157.BoxProcessMode "Manual"
+
connect Box06.LstContourPointsX Box04.LstX
connect showNpoints.lstIndexs Box06.LstIndexsIn
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
connect Box68.Size Box140.Dimensions
connect Box68.TypeName Box140.OutputFormat
connect Box140.Out Box139.InImage
-connect Box139.Out Box142.In
connect Box129.Widget Box146.Widget2
connect Box146.Widget Box38.Widget4
connect Box42.BoxChange Box51.BoxExecute
connect Box134.Widget Box148.Widget3
connect Box148.Widget Box79.Widget4
-connect Box143.Out Box45.Mesh
-connect Box143.Out Box93.Mesh
connect Box53.BoxChange Box143.BoxExecute
connect Box53.BoxChange Box150.BoxExecute
connect Box139.Out Box151.In
-connect Box151.Out Box141.In
connect Box151.Out Box152.In
connect Box152.Out Box143.In
connect Box42.BoxChange Box53.In3
connect Box153.Widget Box136.Widget9
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
# Complex input ports
input point showNpoints.In " "
}
// --- Group 1 ---
- double centroid[3];
+//EED double centroid[3];
wsp->InsertCollectionAfter_();
p[0] = (lstX[0]+lstX[3])/2;
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));
+//EED std::copy(std::begin(p), std::end(p), std::begin(centroid));
// --- Group 2 ---
wsp->InsertCollectionAfter_();
dx = lstX[2]-lstX[3];
vtkMath::MultiplyScalar(n2, -1);
wsp->InvertLstPoints_();
} // if angle
- 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;
+
+//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;
- std::vector<double> outputData;
- outputData.insert(outputData.end(), ¢roid[0], ¢roid[3]);
- outputData.insert(outputData.end(), &normalOut[0], &normalOut[3]);
+ //EED std::vector<double> outputData;
+ //EED outputData.insert(outputData.end(), ¢roid[0], ¢roid[3]);
+ //EED outputData.insert(outputData.end(), &normalOut[0], &normalOut[3]);
- bbSetOutputOut(outputData);
+//EED bbSetOutputOut(outputData);
//bbSetOutputOut(normalOut);
// --- Finish ---
}
void ShowNPoints_Tools::MovePatchCenter()
-{
+{
+
+/* EED 2023 07 12
std::vector<double> params = bbGetInputParams();
if(params.size() == 4)
{
double centerPoint[3];
std::vector<double> normal, modPoint;
-
normal.push_back(params[0]);
normal.push_back(params[1]);
normal.push_back(params[2]);
-
int direction = -1 * params[3];
-
WidgetShowNPoints* wsp = bbGetInputWidgetShowNPoints();
wsp->GetCollectionPoint(1,1, centerPoint);
modPoint.push_back(centerPoint[0] + direction * normal[0]);
modPoint.push_back(centerPoint[1] + direction * normal[1]);
modPoint.push_back(centerPoint[2] + direction * normal[2]);
-
wsp->SetCollectionPoint(1, 1, modPoint);
-
+
+
// --- Finish ---
wsp->SetOutputBox();
wsp->UndoRedo_SaveCollection();
}else{
printf("PG ShowNPoints_Tools::MovePatchCenter() Warning params are wrong. Need 4: normal x y z and direction of movement (1 or -1)\n");
}
+
+ */
+
+ double step = bbGetInputParams()[0];
+ WidgetShowNPoints *wsp = bbGetInputWidgetShowNPoints();
+ wsp->SetActualCollection( wsp->GetLstModelShowNPointsSize()/2 );
+ ModelShowNPoints *modelSNP = wsp->GetModelShowNPoints( );
+ modelSNP->SetIdCurrentPoint( modelSNP->GetLstPointsSize()/2 );
+ wsp->MovePoint_( step );
}
/**