X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketcherPrs%2FSketcherPrs_Parallel.cpp;h=770df4e2a7f54d8422dee9c893594995c2ac2625;hb=b5893b0a30fac08134c24de4565cb513a43affa6;hp=430d8818abc7512385441eed813be9049d4e12d1;hpb=5b6031b015602aa07f5a6fc668c13ac3faf7a8a9;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_Parallel.cpp b/src/SketcherPrs/SketcherPrs_Parallel.cpp index 430d8818a..770df4e2a 100644 --- a/src/SketcherPrs/SketcherPrs_Parallel.cpp +++ b/src/SketcherPrs/SketcherPrs_Parallel.cpp @@ -23,10 +23,6 @@ SketcherPrs_Parallel::SketcherPrs_Parallel(ModelAPI_Feature* theConstraint, const std::shared_ptr& thePlane) : SketcherPrs_SymbolPrs(theConstraint, thePlane) { - // Create default array - myPntArray = new Graphic3d_ArrayOfPoints(2); - myPntArray->AddVertex(0., 0., 0.); - myPntArray->AddVertex(0., 0., 0.); } bool SketcherPrs_Parallel::IsReadyToDisplay(ModelAPI_Feature* theConstraint, @@ -44,7 +40,7 @@ bool SketcherPrs_Parallel::IsReadyToDisplay(ModelAPI_Feature* theConstraint, return aReadyToDisplay; } -bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const +bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep, bool withColor) const { if (!IsReadyToDisplay(myConstraint, myPlane)) return false; @@ -58,8 +54,9 @@ bool SketcherPrs_Parallel::updateIfReadyToDisplay(double theStep) const SketcherPrs_PositionMgr* aMgr = SketcherPrs_PositionMgr::get(); gp_Pnt aP1 = aMgr->getPosition(aObj1, this, theStep); gp_Pnt aP2 = aMgr->getPosition(aObj2, this, theStep); - myPntArray->SetVertice(1, aP1); - myPntArray->SetVertice(2, aP2); + myPntArray = new Graphic3d_ArrayOfPoints(2, withColor); + myPntArray->AddVertex(aP1); + myPntArray->AddVertex(aP2); return true; }