#include <GeomAlgoAPI_ShapeTools.h>
#include <GeomAPI_Circ.h>
+#include <GeomDataAPI_Point.h>
+
#include <GeomAPI_Edge.h>
#include <GeomAPI_Pnt.h>
#include <GeomAPI_Vertex.h>
//==================================================================================================
void ConstructionPlugin_Point::initAttributes()
{
- data()->addAttribute(X(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(Y(), ModelAPI_AttributeDouble::typeId());
- data()->addAttribute(Z(), ModelAPI_AttributeDouble::typeId());
+ data()->addAttribute(POINT3D(), GeomDataAPI_Point::typeId());
data()->addAttribute(CREATION_METHOD(), ModelAPI_AttributeString::typeId());
//==================================================================================================
std::shared_ptr<GeomAPI_Vertex> ConstructionPlugin_Point::createByXYZ()
{
- return GeomAlgoAPI_PointBuilder::vertex(real(X())->value(),
- real(Y())->value(),
- real(Z())->value());
+ AttributePointPtr aPoint =
+ std::dynamic_pointer_cast<GeomDataAPI_Point>(data()->attribute(POINT3D()));
+ return GeomAlgoAPI_PointBuilder::vertex(aPoint->x(), aPoint->y(), aPoint->z());
}
//==================================================================================================