#include <GeomAlgoAPI_EdgeBuilder.h>
#include <GeomAlgoAPI_PointBuilder.h>
+#ifdef _DEBUG
+#include <iostream>
+#endif
+
using namespace std;
ConstructionPlugin_Axis::ConstructionPlugin_Axis()
ModelAPI_AttributeSelection::type());
}
-void ConstructionPlugin_Axis::execute()
+void ConstructionPlugin_Axis::createAxisByTwoPoints()
{
AttributeSelectionPtr aRef1 = data()->selection(ConstructionPlugin_Axis::POINT_FIRST());
AttributeSelectionPtr aRef2 = data()->selection(ConstructionPlugin_Axis::POINT_SECOND());
}
}
+void ConstructionPlugin_Axis::execute()
+{
+ AttributePtr anAttr = data()->attribute(ConstructionPlugin_Axis::METHOD());
+ AttributeStringPtr aMethodTypeAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeString>(anAttr);
+ std::string aMethodType = aMethodTypeAttr->value();
+ if (aMethodType == "AxisByPointsCase") {
+ createAxisByTwoPoints();
+ } else if (aMethodType == "AxisByCylindricalFaceCase") {
+ #ifdef _DEBUG
+ std::cout << "ConstructionPlugin_Axis::execute: " << "AxisByCylindricalFaceCase is not supported yet." << std::endl;
+ #endif
+ }
+}
+
bool ConstructionPlugin_Axis::customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs)
{
/// Customize presentation of the feature
virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs);
+
+ protected:
+ void createAxisByTwoPoints();
};