]> Creatis software - creaMaracasVisu.git/commitdiff
#3520 CleanMeshWithPatch
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 27 Jun 2023 10:48:32 +0000 (12:48 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 27 Jun 2023 10:48:32 +0000 (12:48 +0200)
bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbg
bbtk/bbs/boxes/Mesh_tool_ApplyPatch.bbs
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx

index 4d1eea2e09db07868e3ba066e0e865d6ba8ae9ad..58d5a4b0a7b0cde8aa3e3d5d64c7ab74d619f118 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - 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
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:86
+BOXES:90
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -783,7 +783,41 @@ Orientation:"V"
 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
@@ -1309,4 +1343,43 @@ 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
index ad70a789839be697db6da6b1ec2cf58f27038bb0..376c093a22e5be5a192d63f00aec428c19d43f73 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - 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
@@ -287,6 +287,19 @@ new wx:LayoutLine Box134
   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
@@ -448,6 +461,19 @@ connect Box77.Out Box133.In
 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 " "
index 12d4589fc20fa6091ce90d09798d9da30b88bc84..10294178b3b3b7bbeab18a0de582f1b771f8eb9e 100644 (file)
@@ -849,7 +849,7 @@ void WidgetShowNPoints::OnSetPoint(wxCommandEvent& event)
 //------------------------------------------------------------------------
 void WidgetShowNPoints::MovePoint_(double step)
 {
-    step=step*2;
+    step=step;
     
     StopAutoAddPoints();
     StopTrackPoint();
@@ -1460,7 +1460,6 @@ void WidgetShowNPoints::CreatePointsIntoNewCollection()
             } // for
             delete m;
             // ----------------- Add new Points --------------------
-            
             vtkPoints               *points;
             vtkStaticPointLocator   *pointLocator;
             if (aux_mesh!=NULL)
@@ -1469,10 +1468,6 @@ void WidgetShowNPoints::CreatePointsIntoNewCollection()
                 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];
@@ -1483,18 +1478,16 @@ void WidgetShowNPoints::CreatePointsIntoNewCollection()
                 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();