+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+
// File: SketchPlugin_Circle.cpp
// Created: 26 May 2014
// Author: Artem ZHIDKOV
#include <GeomAlgoAPI_CompoundBuilder.h>
SketchPlugin_Circle::SketchPlugin_Circle()
- : SketchPlugin_Feature()
+ : SketchPlugin_SketchEntity()
{
}
void SketchPlugin_Circle::initAttributes()
{
- data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::type());
- data()->addAttribute(RADIUS_ID(), ModelAPI_AttributeDouble::type());
- data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::type());
+ SketchPlugin_SketchEntity::initAttributes();
+
+ data()->addAttribute(CENTER_ID(), GeomDataAPI_Point2D::typeId());
+ data()->addAttribute(RADIUS_ID(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(EXTERNAL_ID(), ModelAPI_AttributeSelection::typeId());
ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), EXTERNAL_ID());
}
}
bool SketchPlugin_Circle::isFixed() {
- return data()->selection(EXTERNAL_ID())->context();
+ return data()->selection(EXTERNAL_ID())->context().get() != NULL;
}
void SketchPlugin_Circle::attributeChanged(const std::string& theID) {