manualViewContour::manualViewContour()
{
_id_viewPoint_for_text = 0;
- _mesureScale = 1;
+ _mesureScale = 1;
_initialConoturModel = new manualContourModel();
}
// ----------------------------------------------------------------------------
{
}
-
-
// ----------------------------------------------------------------------------
void manualViewContour::RefreshContour() // virtual
{
-
int i,np,nps;
//JSTG 25-02-08 --------------------
//--------------------------------------------------------------
// EED 27 sep 2006
// _pts->SetPoint(i, x,y,z );
- _pts->SetPoint(i , x*_spc[0] , y*_spc[1] , z*_spc[2] );
-
+ _pts->SetPoint(i, x*_spc[0], y*_spc[1], z*_spc[2] );
}// for
}
int size = GetNumberOfPoints();
char text[50];
char resultText[50];
- strcpy(resultText," ");
+ strcpy(resultText, "000");
+
+//CMRU 19-08-09 ----------------------------------
+ std::string label;
+ label = _manContModel->GetLabel();
+// ------------------------------------
+
if (size==2)
{
strcpy(resultText,"L= ");
- gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text );
+ gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
strcat(resultText,text);
+
+//CMRU 19-08-09 ----------------------------------
+ strcat(resultText," ");
+ strcat(resultText,label.c_str());
+//------------------------------------------------
}
if (size>2)
{
if (_manContModel->IfCloseContour()==true)
{
strcpy(resultText,"P= ");
- gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text );
+ gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
strcat(resultText,text);
- gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea() , 5, text );
+ gcvt ( _mesureScale * _mesureScale * this->_manContModel->GetPathArea(), 5, text );
strcat(resultText," A= ");
strcat(resultText,text);
+ strcat(resultText," ");
} else {
strcpy(resultText,"L= ");
- gcvt ( _mesureScale * this->_manContModel->GetPathSize() , 5, text );
+ gcvt ( _mesureScale * this->_manContModel->GetPathSize(), 5, text );
strcat(resultText,text);
}
+//CMRU 19-08-09 ----------------------------------
+ strcat(resultText,label.c_str());
+//------------------------------------------------
}
_textActor->SetInput(resultText);
}
}
- int id = _id_viewPoint_for_text;
- double px = _manContModel->GetManualPoint(id)->GetX();
- double py = _manContModel->GetManualPoint(id)->GetY();
+ if (_id_viewPoint_for_text>=size)
+ {
+ _id_viewPoint_for_text=0;
+ }
+
+ double px = _manContModel->GetManualPoint(_id_viewPoint_for_text)->GetX();
+ double py = _manContModel->GetManualPoint(_id_viewPoint_for_text)->GetY();
//EED 27 sep 2006
px=px*_spc[0];
_textActor->SetPosition(px+GetRange()+1,py);
}
-
}
}
nps_t = nps-1;
}
-
for( i = 0; i < nps_t; i++ )
{
_pts->GetPoint(i%nps, ppA);
i=nps;
}
}
-
return result;
}