# ----------------------------------
# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
# ----------------------------------
APP_START
meshmanagermodel
-150.374274:130.740991:-900.000000
FIN_COMPLEX_PORT
-BOXES:75
+BOXES:76
BOX
creaMaracasVisu:ShowNPoints:showNpoints
ISEXEC:FALSE
Radio:"2"
PORT
Type:"4"
-PORT
-WinTitle:"1.1 Splines"
FIN_BOX
BOX
creaVtk:CreateMeshFromPoints:Box04
BOX
wx:LayoutLine:Box50
ISEXEC:FALSE
--57.295971:-56.374591:-900.000000
--23.975971:-58.874591:-900.000000
+-42.742907:-58.168804:-900.000000
+-9.422907:-60.668804:-900.000000
PORT
Orientation:"V"
PORT
BOX
wx:LayoutTab:Box86
ISEXEC:FALSE
--57.013911:-62.286670:-900.000000
--23.693911:-64.786670:-900.000000
+-55.020341:-67.071239:-900.000000
+-21.700341:-69.571239:-900.000000
FIN_BOX
BOX
creaVtk:MeshManager:Box92
BOX
wx:LayoutLine:Box118
ISEXEC:FALSE
-105.323248:-27.231844:-900.000000
-138.643248:-29.731844:-900.000000
+101.734821:-52.151474:-900.000000
+135.054821:-54.651474:-900.000000
PORT
Orientation:"H"
FIN_BOX
PORT
Type:"230"
FIN_BOX
-CONNECTIONS:158
+BOX
+wx:LayoutLine:Box121
+ISEXEC:FALSE
+76.461485:-66.685249:-900.000000
+109.781485:-69.185249:-900.000000
+PORT
+Orientation:"V"
+PORT
+WinTitle:"1.1 Splines"
+FIN_BOX
+CONNECTIONS:159
CONNECTION
Box06:LstContourPointsX:Box04:LstX
NumberOfControlPoints:0
Box50:Widget:Box86:Widget4
NumberOfControlPoints:0
CONNECTION
-showNpoints:Widget:Box86:Widget2
-NumberOfControlPoints:0
-CONNECTION
Box49:Widget:Box50:Widget2
NumberOfControlPoints:0
CONNECTION
Box117:Widget:Box118:Widget2
NumberOfControlPoints:0
CONNECTION
-Box118:Widget:Box50:Widget9
-NumberOfControlPoints:0
-CONNECTION
Box119:Widget:Box118:Widget3
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box105:Out:Box120:Mesh
NumberOfControlPoints:0
+CONNECTION
+showNpoints:Widget:Box121:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box118:Widget:Box121:Widget2
+NumberOfControlPoints:0
+CONNECTION
+Box121:Widget:Box86:Widget2
+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_ApplySurface.bbs
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
# ----------------------------------
include std
new creaMaracasVisu:ShowNPoints showNpoints
set showNpoints.Radio "2"
set showNpoints.Type "4"
- set showNpoints.WinTitle "1.1 Splines"
new creaVtk:CreateMeshFromPoints Box04
set Box120.Params " 1"
set Box120.Type "230"
+new wx:LayoutLine Box121
+ set Box121.Orientation "V"
+ set Box121.WinTitle "1.1 Splines"
+
connect Box06.LstContourPointsX Box04.LstX
connect showNpoints.lstIndexs Box06.LstIndexsIn
connect Box84.Widget Box44.Widget9
connect Box86.Widget Box38.Widget2
connect Box50.Widget Box86.Widget4
-connect showNpoints.Widget Box86.Widget2
connect Box49.Widget Box50.Widget2
connect Box34.Widget Box50.Widget4
connect Box57.BoxChange Box08.BoxExecute
connect Box68.Spacing Box116.Spacing
connect Box117.BoxChange Box116.BoxExecute
connect Box117.Widget Box118.Widget2
-connect Box118.Widget Box50.Widget9
connect Box119.Widget Box118.Widget3
connect Box119.BoxChange Box120.BoxExecute
connect showNpoints.WidgetShowNPoints Box120.WidgetShowNPoints
connect Box68.Spacing Box120.Spacing
connect Box105.Out Box116.Mesh
connect Box105.Out Box120.Mesh
+connect showNpoints.Widget Box121.Widget1
+connect Box118.Widget Box121.Widget2
+connect Box121.Widget Box86.Widget2
# Complex input ports
input point showNpoints.In " "
virtual bool OnMouseMove();
virtual bool OnRightButtonDown();
virtual bool OnRightButtonUp();
+ virtual bool OnMiddleButtonDown();
+ virtual bool OnMiddleButtonUp();
virtual bool OnLeftDClick();
virtual bool OnRightDClick();
private:
return true;
}
+
+bool InteractorwxVtkBaseView::OnMiddleButtonDown()
+{
+ if (_box!=NULL)
+ {
+ if ( _box->bbGetInputInteractionType()==12 ) // MiddleDrag
+ {
+ flagDrag=true;
+ }
+ if ( (_box->bbGetInputInteractionType()==10 ) && (_wxvtkbaseview!=NULL) ) // MiddleButton Down
+ {
+ _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
+ _box->bbSignalOutputModification();
+ return false;
+ } // if _vtkbaseview
+ } // if _box
+ return true;
+}
+
+bool InteractorwxVtkBaseView::OnMiddleButtonUp()
+{
+ if (_box!=NULL)
+ {
+ if ( _box->bbGetInputInteractionType()==12 ) // MiddleDrag
+ {
+ flagDrag=false;
+ }
+ if ( (_box->bbGetInputInteractionType()==11 ) && (_wxvtkbaseview!=NULL) ) // MiddleButton Up
+ {
+ _box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
+ _box->bbSignalOutputModification();
+ return false;
+ } // if _vtkbaseview
+ } // if _box
+ return true;
+}
+
+
+
bool InteractorwxVtkBaseView::OnMouseMove()
{
if (_box!=NULL)
{
ok=true;
} // if InteractionType 9
+ if (( _box->bbGetInputInteractionType()==12 ) && (flagDrag==true) )
+ {
+ ok=true;
+ } // if InteractionType 9
+
if (ok==true)
{
_box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView,"wxVtkBaseView Used for the principal output. Used in case of InteractionType!=0",wxVtkBaseView*,"");
BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView2,"Used in case of InteractionType!=0",wxVtkBaseView*,"");
BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView3,"Used in case of InteractionType!=0",wxVtkBaseView*,"");
- BBTK_INPUT(wxVtkBaseView_Info,InteractionType,"(default 0) 0:Nothing 1:LeftButtonDown 2:LeftButtonUp 3:MouseMove 4:RightButtonDown 5:RightButtonUp 6:LeftDClick 7:RightDClick 8:DragLeft 9:DragRight",int,"");
+ BBTK_INPUT(wxVtkBaseView_Info,InteractionType,"(default 0) 0:Nothing 1:LeftButtonDown 2:LeftButtonUp 3:MouseMove 4:RightButtonDown 5:RightButtonUp 6:LeftDClick 7:RightDClick 8:DragLeft 9:DragRight 10:MiddleButtonDown 11:MiddleButtonUp 12:DragMiddle ",int,"");
BBTK_OUTPUT(wxVtkBaseView_Info,Direction,"Direction -1=3D 0=YZ 1=XZ 2=XY(default)",int,"");
BBTK_OUTPUT(wxVtkBaseView_Info,vtkRenderer,"vtkRenderer default=NULL",vtkRenderer*,"");