#include "SketchPlugin_Sketch.h"
#include <ModelAPI_Data.h>
#include <ModelAPI_AttributeRefList.h>
+#include <GeomAPI_AISObject.h>
#include <GeomAPI_XYZ.h>
#include <GeomDataAPI_Dir.h>
#include <GeomDataAPI_Point.h>
#include <GeomAlgoAPI_CompoundBuilder.h>
#include <GeomAlgoAPI_SketchBuilder.h>
-#include <AIS_InteractiveObject.hxx>
-#include <AIS_Shape.hxx>
-#include <Quantity_NameOfColor.hxx>
-
-const Quantity_NameOfColor SKETCH_PLANE_COLOR = Quantity_NOC_CHOCOLATE; /// the plane edge color
-const int SKETCH_WIDTH = 4; /// the plane edge width
+const int SKETCH_PLANE_COLOR = Colors::COLOR_BROWN; /// the plane edge color
+const double SKETCH_WIDTH = 4.0; /// the plane edge width
using namespace std;
data()->store(aCompound);
}
-Handle(AIS_InteractiveObject) SketchPlugin_Sketch::getAISShape(Handle(AIS_InteractiveObject) thePrevious)
+boost::shared_ptr<GeomAPI_AISObject> SketchPlugin_Sketch::getAISObject(
+ boost::shared_ptr<GeomAPI_AISObject> thePrevious)
{
- Handle(AIS_InteractiveObject) anAIS = SketchPlugin_Feature::getAISShape(thePrevious);
- Handle(AIS_Shape) aShapeAIS = Handle(AIS_Shape)::DownCast(anAIS);
- aShapeAIS->SetColor(Quantity_Color(SKETCH_PLANE_COLOR));
- aShapeAIS->SetWidth(SKETCH_WIDTH);
- aShapeAIS->Redisplay();
+ boost::shared_ptr<GeomAPI_AISObject> anAIS = prepareAISShape(thePrevious);
+ anAIS->setColor(SKETCH_PLANE_COLOR);
+ anAIS->setWidth(SKETCH_WIDTH);
+ //anAIS->Redisplay();
return anAIS;
}