# ----------------------------------
# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
# ----------------------------------
APP_START
meshmanagermodel
-150.374274:130.740991:-900.000000
FIN_COMPLEX_PORT
-BOXES:86
+BOXES:90
BOX
creaMaracasVisu:ShowNPoints:showNpoints
ISEXEC:FALSE
PORT
WinTitle:"1.3 Apply Changes"
FIN_BOX
-CONNECTIONS:175
+BOX
+creaVtk:CleanMeshWithPatch:Box135
+ISEXEC:FALSE
+10.527341:-109.019479:-900.000000
+33.327341:-111.519479:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:PolyDataToActor_Widget:Box136
+ISEXEC:FALSE
+2.128805:-136.236464:-900.000000
+25.258805:-138.736464:-900.000000
+PORT
+active:"true"
+PORT
+color:"1 1 1"
+PORT
+meshOpacity:"100"
+FIN_BOX
+BOX
+wx:LayoutLine:Box137
+ISEXEC:FALSE
+1.468734:-145.464302:-900.000000
+34.788734:-147.964302:-900.000000
+PORT
+WinTitle:"Beta"
+FIN_BOX
+BOX
+wx:CommandButton:Box138
+ISEXEC:FALSE
+52.385246:-124.247932:-900.000000
+74.770246:-126.747932:-900.000000
+PORT
+Label:"Run"
+FIN_BOX
+CONNECTIONS:188
CONNECTION
Box06:LstContourPointsX:Box04:LstX
NumberOfControlPoints:0
CONNECTION
Box42:Widget:Box134:Widget3
NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box135:Mesh
+NumberOfControlPoints:0
+CONNECTION
+Box04:Out:Box135:Patch
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsX:Box135:LstX
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsY:Box135:LstY
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstPointsZ:Box135:LstZ
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box135:LstIndexs
+NumberOfControlPoints:0
+CONNECTION
+Box135:Out:Box136:polydata
+NumberOfControlPoints:0
+CONNECTION
+Box66:Out:Box136:render
+NumberOfControlPoints:0
+CONNECTION
+Box136:widget:Box137:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box137:Widget:Box106:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box138:Widget:Box137:Widget4
+NumberOfControlPoints:0
+CONNECTION
+Box138:BoxChange:Box136:boxexecute
+NumberOfControlPoints:0
+CONNECTION
+Box68:Spacing:Box135:Spacing
+NumberOfControlPoints:0
APP_END
# ----------------------------------
# - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
# ----------------------------------
include std
set Box134.Orientation "V"
set Box134.WinTitle "1.3 Apply Changes"
+new creaVtk:CleanMeshWithPatch Box135
+
+new creaMaracasVisu:PolyDataToActor_Widget Box136
+ set Box136.active "true"
+ set Box136.color "1 1 1"
+ set Box136.meshOpacity "100"
+
+new wx:LayoutLine Box137
+ set Box137.WinTitle "Beta"
+
+new wx:CommandButton Box138
+ set Box138.Label "Run"
+
connect Box06.LstContourPointsX Box04.LstX
connect showNpoints.lstIndexs Box06.LstIndexsIn
connect Box133.Out Box115.In
connect Box134.Widget Box82.Widget4
connect Box42.Widget Box134.Widget3
+connect Box67.Out Box135.Mesh
+connect Box04.Out Box135.Patch
+connect showNpoints.lstPointsX Box135.LstX
+connect showNpoints.lstPointsY Box135.LstY
+connect showNpoints.lstPointsZ Box135.LstZ
+connect showNpoints.lstIndexs Box135.LstIndexs
+connect Box135.Out Box136.polydata
+connect Box66.Out Box136.render
+connect Box136.widget Box137.Widget2
+connect Box137.Widget Box106.Widget4
+connect Box138.Widget Box137.Widget4
+connect Box138.BoxChange Box136.boxexecute
+connect Box68.Spacing Box135.Spacing
# Complex input ports
input point showNpoints.In " "
//------------------------------------------------------------------------
void WidgetShowNPoints::MovePoint_(double step)
{
- step=step*2;
+ step=step;
StopAutoAddPoints();
StopTrackPoint();
} // for
delete m;
// ----------------- Add new Points --------------------
-
vtkPoints *points;
vtkStaticPointLocator *pointLocator;
if (aux_mesh!=NULL)
pointLocator = vtkStaticPointLocator::New();
pointLocator->SetDataSet( aux_mesh );
pointLocator->BuildLocator();
- vtkPoints *points = aux_mesh->GetPoints();
- vtkStaticPointLocator *pointLocator = vtkStaticPointLocator::New();
- pointLocator->SetDataSet( aux_mesh );
- pointLocator->BuildLocator();
} // if aux_mesh
double p[3], pM[3];
x = (c1LstXX[i]+c2LstXX[i])/2;
y = (c1LstYY[i]+c2LstYY[i])/2;
z = (c1LstZZ[i]+c2LstZZ[i])/2;
-
if (aux_mesh!=NULL)
{
p[0] = x * aux_mesh_spc[0];
p[1] = y * aux_mesh_spc[1];
p[2] = z * aux_mesh_spc[2];
points->GetPoint( pointLocator->FindClosestPoint(p) , pM );
-// x = pM[0] / aux_mesh_spc[0];
-// y = pM[1] / aux_mesh_spc[1];
-// z = pM[2] / aux_mesh_spc[2];
+ x = pM[0] / aux_mesh_spc[0];
+ y = pM[1] / aux_mesh_spc[1];
+ z = pM[2] / aux_mesh_spc[2];
} // aux_mesh
-
AddPoint(x,y,z,"");
}
pointLocator->Delete();