X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROCurveCreator%2FCurveCreator_Operation.cxx;h=083e3323084fd1612fbea969b0042bf9f8b6f2d8;hb=a8213a40ae36460055057f09e3e0828a01e27123;hp=fa9cdb071f753de652069a14ed1307fd8bb4c980;hpb=b39007a5784e9dcbbae250bea4bca432f12244b9;p=modules%2Fhydro.git diff --git a/src/HYDROCurveCreator/CurveCreator_Operation.cxx b/src/HYDROCurveCreator/CurveCreator_Operation.cxx index fa9cdb07..083e3323 100644 --- a/src/HYDROCurveCreator/CurveCreator_Operation.cxx +++ b/src/HYDROCurveCreator/CurveCreator_Operation.cxx @@ -173,41 +173,6 @@ bool CurveCreator_Operation::init(const CurveCreator_Operation::Type theType, return isOK; } -//======================================================================= -// function: Constructor -// purpose: -//======================================================================= -bool CurveCreator_Operation::init(const CurveCreator_Operation::Type theType, - const CurveCreator::Coordinates &theCoords, - const int theIntParam1, - const int theIntParam2) -{ - bool isOK = false; - - if (theType == CurveCreator_Operation::AddSection) { - const int aNbCoords = theCoords.size(); - const size_t aSize = - 3*sizeof(theIntParam1) + aNbCoords*sizeof(CurveCreator::TypeCoord); - int *pIntData = (int *)allocate(aSize); - - *pIntData++ = theIntParam1; - *pIntData++ = theIntParam2; - *pIntData++ = aNbCoords; - - CurveCreator::TypeCoord *pRealData = (CurveCreator::TypeCoord *)pIntData; - int i = 0; - - for (; i < aNbCoords; i++) { - *pRealData++ = theCoords[i]; - } - - myType = theType; - isOK = true; - } - - return isOK; -} - //======================================================================= // function: Constructor // purpose: @@ -239,7 +204,7 @@ bool CurveCreator_Operation::init(const CurveCreator_Operation::Type theType, pIntData = (int*)aStrPtr; *pIntData++ = aNbCoords; - CurveCreator::TypeCoord *pRealData = (CurveCreator::TypeCoord *)aStrPtr; + CurveCreator::TypeCoord *pRealData = (CurveCreator::TypeCoord *)pIntData; int i = 0; for (; i < aNbCoords; i++) { @@ -419,7 +384,7 @@ void CurveCreator_Operation::apply(CurveCreator_Curve *theCurve) theCurve->clearInternal(); break; case CurveCreator_Operation::SetClosed: - theCurve->setClosedInternal((pInt[0] != 0), pInt[1]); + theCurve->setClosedInternal(pInt[1], (pInt[0] != 0)); break; case CurveCreator_Operation::MoveSection: theCurve->moveSectionInternal(pInt[0], pInt[1]);