X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPartSet%2FPartSet_TestOCC.cpp;h=f0678d0799b6718408431c072298faf8e5fd685a;hb=a3cd8f27f76183cfc2d0728e6388696ab9dce1b8;hp=f67a1e06a4d0a71d3d345ea0a30c08f597560e8f;hpb=daeab27f92af64bc3d0fd5328ce61d1d525c4802;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_TestOCC.cpp b/src/PartSet/PartSet_TestOCC.cpp index f67a1e06a..f0678d079 100644 --- a/src/PartSet/PartSet_TestOCC.cpp +++ b/src/PartSet/PartSet_TestOCC.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: PartSet_TestOCC.h // Created: 28 Apr 2014 // Author: Natalia ERMOLAEVA @@ -37,7 +39,7 @@ void PartSet_TestOCC::testSelection(XGUI_Workshop* theWorkshop) theWorkshop->viewer()->activeView()); PartSet_TestOCC::changeTestLine(theWorkshop); } - boost::shared_ptr anIO = theWorkshop->displayer()->getAISObject(myTestObject); + std::shared_ptr anIO = theWorkshop->displayer()->getAISObject(myTestObject); if (!anIO->empty()) { theWorkshop->viewer()->AISContext()->MoveTo(0, 0, theWorkshop->viewer()->activeView()); theWorkshop->viewer()->AISContext()->Select(0, 0, 2500, 2500, @@ -132,26 +134,26 @@ void PartSet_TestOCC::createTestLine(XGUI_Workshop* theWorkshop) if (aPreviewOp) { // create a line - boost::shared_ptr aDoc = ModelAPI_Session::get()->rootDocument(); + std::shared_ptr aDoc = ModelAPI_Session::get()->moduleDocument(); FeaturePtr aFeature = aDoc->addFeature(SketchPlugin_Line::ID()); if (aFeature) // TODO: generate an error if feature was not created aFeature->execute(); - boost::shared_ptr aSketch = boost::dynamic_pointer_cast< + std::shared_ptr aSketch = std::dynamic_pointer_cast< SketchPlugin_Feature>(aPreviewOp->sketch()); aSketch->addSub(aFeature); PartSet_Tools::setFeaturePoint(aFeature, 100, 100, SketchPlugin_Line::START_ID()); PartSet_Tools::setFeaturePoint(aFeature, 150, 300, SketchPlugin_Line::END_ID()); - boost::shared_ptr aPreview = PartSet_OperationSketchBase::preview(aFeature); + std::shared_ptr aPreview = PartSet_OperationSketchBase::preview(aFeature); XGUI_Displayer* aDisplayer = theWorkshop->displayer(); - boost::shared_ptr aPrevAIS; - boost::shared_ptr aSPFeature = boost::dynamic_pointer_cast< + std::shared_ptr aPrevAIS; + std::shared_ptr aSPFeature = std::dynamic_pointer_cast< SketchPlugin_Feature>(aFeature); - //boost::shared_ptr anAIS = aSPFeature->getAISObject(aPrevAIS); + //std::shared_ptr anAIS = aSPFeature->getAISObject(aPrevAIS); //if (!anAIS->empty()) aDisplayer->display(aFeature, false); //aDisplayer->redisplay(aFeature->firstResult(), anAIS, false); @@ -168,7 +170,7 @@ void PartSet_TestOCC::createTestLine(XGUI_Workshop* theWorkshop) PartSet_Tools::setFeaturePoint(aFeature, 100+aDelta, 200+aDelta, SketchPlugin_Line::START_ID()); PartSet_Tools::setFeaturePoint(aFeature, 300+aDelta, 500+aDelta, SketchPlugin_Line::END_ID()); - boost::shared_ptr aPreview = PartSet_OperationSketchBase::preview(aFeature); + std::shared_ptr aPreview = PartSet_OperationSketchBase::preview(aFeature); Handle(AIS_InteractiveObject) anAIS = PartSet_Presentation::createPresentation( aFeature, aSketch, aPreview ? aPreview->impl() : TopoDS_Shape(), NULL); @@ -204,12 +206,12 @@ void PartSet_TestOCC::changeTestLine(XGUI_Workshop* theWorkshop) // TODO //PartSet_Tools::setFeaturePoint(aFeature, -100/*aDelta*/, -100/*aDelta*/, LINE_ATTR_START); //PartSet_Tools::setFeaturePoint(aFeature, 200/*aDelta*2*/, 200/*aDelta*2*/, LINE_ATTR_END); - //boost::shared_ptr aPreview = PartSet_OperationSketchBase::preview(aFeature); + //std::shared_ptr aPreview = PartSet_OperationSketchBase::preview(aFeature); - boost::shared_ptr aPrevAIS; - boost::shared_ptr aSPFeature = boost::dynamic_pointer_cast< + std::shared_ptr aPrevAIS; + std::shared_ptr aSPFeature = std::dynamic_pointer_cast< SketchPlugin_Feature>(aFeature); - //boost::shared_ptr anAIS = aSPFeature->getAISObject(aPrevAIS); + //std::shared_ptr anAIS = aSPFeature->getAISObject(aPrevAIS); //if (!anAIS->empty()) theWorkshop->displayer()->display(aFeature, true); // theWorkshop->displayer()->redisplay(aFeature, anAIS, true);