COMPLEXOUTPUTS:4
COMPLEX_PORT
_widget
--63.491296:-134.823351:-900.000000
+-62.110902:-180.376367:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
_initExec
--0.123743:-139.211179:-900.000000
+1.256651:-184.764195:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
_iaxis
-44.663851:-138.928196:-900.000000
+46.044245:-184.481212:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
_step
--23.031012:-136.184078:-900.000000
+-21.650618:-181.737094:-900.000000
FIN_COMPLEX_PORT
COMPLEXINPUTS:11
COMPLEX_PORT
FIN_COMPLEX_PORT
COMPLEX_PORT
_boxExecViewer
-27.552540:157.149325:-900.000000
+26.506787:171.162420:-900.000000
FIN_COMPLEX_PORT
COMPLEX_PORT
_wxcontourmainframe
wx:LayoutLine:Box84
ISEXEC:FALSE
-40.823021:57.864276:-900.000000
--7.503021:55.364276:-900.000000
+-5.743021:55.364276:-900.000000
PORT
WinTitle:"Config"
FIN_BOX
wx:Slider:Box86
ISEXEC:FALSE
-18.014851:72.040426:-900.000000
-11.785149:69.540426:-900.000000
+13.545149:69.540426:-900.000000
PORT
In:"0"
PORT
wx:CommandButton:Box152
ISEXEC:FALSE
-0.916533:16.537159:-900.000000
-21.468467:14.037159:-900.000000
+21.843467:14.037159:-900.000000
PORT
Label:"+"
FIN_BOX
wx:CommandButton:Box153
ISEXEC:FALSE
-36.265034:45.821791:-900.000000
--13.880034:43.321791:-900.000000
+-13.505034:43.321791:-900.000000
PORT
Label:"-"
FIN_BOX
wx:LayoutLine:Box154
ISEXEC:FALSE
-41.709384:-47.420434:-900.000000
--8.389384:-49.920434:-900.000000
+-6.629384:-49.920434:-900.000000
PORT
Orientation:"H"
FIN_BOX
BOX
wx:LayoutLine:Box261
ISEXEC:FALSE
--136.143816:-91.615476:-900.000000
--102.823816:-94.115476:-900.000000
+-126.250989:-114.852115:-900.000000
+-91.170989:-117.352115:-900.000000
FIN_BOX
BOX
std:ReplaceCleanString:Box265
BOX
std:CreateArithmeticSuiteVector:Box284
ISEXEC:FALSE
-91.819752:56.128381:-900.000000
-115.349752:53.628381:-900.000000
+69.292324:57.989822:-900.000000
+92.822324:55.489822:-900.000000
PORT
Delta:"0"
PORT
BOX
std:GetDoubleVectorSize:Box285
ISEXEC:FALSE
-99.344123:65.073879:-900.000000
-122.169123:62.573879:-900.000000
+73.388525:64.343753:-900.000000
+96.213525:61.843753:-900.000000
FIN_BOX
BOX
std:VectorFilterDouble:Box286
wx:ComboBox:Box314
ISEXEC:FALSE
-74.787862:103.567444:-900.000000
--48.507862:101.067444:-900.000000
+-46.747862:101.067444:-900.000000
PORT
In:"void"
PORT
wx:ComboBox:Box330
ISEXEC:FALSE
-66.679469:48.992905:-900.000000
--40.399469:46.492905:-900.000000
+-38.639469:46.492905:-900.000000
PORT
In:"Direct Grid Contour Nothing"
PORT
BOX
wx:LayoutLine:Box331
ISEXEC:FALSE
--54.136649:-85.097407:-900.000000
--20.816649:-87.597407:-900.000000
+102.549117:-38.975498:-900.000000
+137.629117:-41.475498:-900.000000
PORT
Orientation:"H"
FIN_BOX
BOX
wx:LayoutLine:Box336
ISEXEC:FALSE
--76.236316:-101.790425:-900.000000
--42.916316:-104.290425:-900.000000
+-74.855922:-147.343441:-900.000000
+-39.775922:-149.843441:-900.000000
PORT
Orientation:"H"
PORT
-97.007170:-86.890545:-900.000000
FIN_BOX
BOX
-std:GetVectorIntElement:Box436
-ISEXEC:FALSE
-132.935911:69.244296:-900.000000
-155.705911:66.744296:-900.000000
-PORT
-I:"1"
-FIN_BOX
-BOX
vtk:ImageVtkProperties:Box437
ISEXEC:FALSE
172.415091:123.709779:-900.000000
BOX
wx:LayoutTab:Box456
ISEXEC:FALSE
--66.962918:-120.191983:-900.000000
--33.642918:-122.691983:-900.000000
+-65.582524:-165.744999:-900.000000
+-30.502524:-168.244999:-900.000000
FIN_BOX
BOX
std:MagicBox:Box457
BOX
std:Div:Box81
ISEXEC:FALSE
-89.749833:5.376465:-900.000000
-110.674833:2.876465:-900.000000
+89.540682:8.722876:-900.000000
+110.465682:6.222876:-900.000000
FIN_BOX
BOX
std:GetVectorDoubleElement:Box82
BOX
std:MathOperation:Box102
ISEXEC:FALSE
-86.082393:-4.348240:-900.000000
-108.292393:-6.848240:-900.000000
+86.082393:-0.165227:-900.000000
+108.292393:-2.665227:-900.000000
PORT
Type:"22"
FIN_BOX
+BOX
+std:GetVectorDoubleElement:Box93
+ISEXEC:FALSE
+141.018026:79.941838:-900.000000
+164.143026:77.441838:-900.000000
+PORT
+I:"1"
+FIN_BOX
CONNECTIONS:138
CONNECTION
Box86:Widget:Box84:Widget2
Box355:Widget:Box261:Widget6
NumberOfControlPoints:0
CONNECTION
-Box436:Out:Box287:In2
-NumberOfControlPoints:0
-CONNECTION
Box447:BoxChange:Box448:In1
NumberOfControlPoints:0
CONNECTION
Box450:Out:Box97:In0
NumberOfControlPoints:0
CONNECTION
-Box97:Out:Box436:In
-NumberOfControlPoints:0
-CONNECTION
Box317:Out:_step:_step
NumberOfControlPoints:0
CONNECTION
CONNECTION
Box102:Out:Box299:In
NumberOfControlPoints:0
+CONNECTION
+Box97:Out:Box93:In
+NumberOfControlPoints:0
+CONNECTION
+Box93:Out:Box287:In2
+NumberOfControlPoints:0
APP_END
new wx:OutputText Box355
-new std:GetVectorIntElement Box436
- set Box436.I "1"
-
new vtk:ImageVtkProperties Box437
new creaMaracasVisu:wxVtkBaseView_Info Box447
new std:MathOperation Box102
set Box102.Type "22"
+new std:GetVectorDoubleElement Box93
+ set Box93.I "1"
+
connect Box86.Widget Box84.Widget2
connect Box153.Widget Box154.Widget2
connect Box349.Out Box354.In0
connect Box354.Out0 Box352.In0
connect Box355.Widget Box261.Widget6
-connect Box436.Out Box287.In2
connect Box447.BoxChange Box448.In1
connect Box448.BoxChange Box83.BoxExecute
connect Box449.BoxChange Box448.In3
connect Box96.Out0 Box82.In
connect Box96.Out0 Box97.In1
connect Box450.Out Box97.In0
-connect Box97.Out Box436.In
connect Box75.Out Box83.Direction
connect Box81.Out Box102.In1
connect Box102.Out Box329.In3
connect Box102.Out Box299.In
+connect Box97.Out Box93.In
+connect Box93.Out Box287.In2
# Complex input ports
input _wxvtkbaseview2 Box452.In " "
//----------------------------------------------------------------------------------------------------------------
#include "wxContourMainFrame.h"
-
-
//----------------------------------------------------------------------------------------------------------------
// Includes
//----------------------------------------------------------------------------------------------------------------
-
#include "NameWrapper.h"
#include "wx/artprov.h"
#include "ConceptDataWrap.h"
_maxContoursByInstant = max;
}
+void wxContourMainFrame::MoveControlPoint( int idContour , int idControlPoint, int step )
+{
+ //std::vector<int> tempVector;
+ //getInstantVector( tempVector );
+ Instant *instant = kernelManager->getCurrentInstant ();
+ std::vector< ContourThing ** > lstContours = kernelManager->getOutlinesAtInstant (instant);
+ if (lstContours.size()>0)
+ {
+ manualBaseModel *mbm = (*(lstContours[0]))->getModel();
+// int idxxxx = mbm->GetIdPoint( px , pz , -1 , 50000 , 2);
+
+
+ int id1=idControlPoint - 1;
+ if ( id1<0 )
+ {
+ id1 = mbm->GetSizeLstPoints()-1;
+ } // if id1 < 0
+
+ int id2=idControlPoint + 1;
+ if ( id2==mbm->GetSizeLstPoints() )
+ {
+ id2 = 0;
+ } // if id2 = maxpoints list
+
+ manualPoint *mp1 = mbm->GetManualPoint(id1);
+ manualPoint *mp2 = mbm->GetManualPoint(id2);
+
+ double vx = mp2->GetX() - mp1->GetX();
+ double vy = mp2->GetY() - mp1->GetY();
+
+ // normalice
+ double hip = sqrt( vx*vx + vy*vy );
+ vx =vx / hip;
+ vy =vy / hip;
+
+ // 90 degree rotation
+ double vxB = -vy;
+ double vyB = vx;
+
+ mbm->MovePoint( idControlPoint ,vxB*step,vyB*step,0);
+ RefreshInterface();
+ } //
+
+}