#include "ConstructionPlugin.h"
#include <ModelAPI_Feature.h>
+#include <ModelAPI_Result.h>
#include <GeomAPI_ICustomPrs.h>
-
/**\class ConstructionPlugin_Axis
* \ingroup Plugins
* \brief Feature for creation of the new axis in PartSet.
static const std::string CONSTRUCTION_AXIS_KIND("Axis");
return CONSTRUCTION_AXIS_KIND;
}
+
+ /// attribute name for first point
+ inline static const std::string& METHOD()
+ {
+ static const std::string METHOD_ATTR("CreationMethod");
+ return METHOD_ATTR;
+ }
/// attribute name for first point
inline static const std::string& POINT_FIRST()
{
- static const std::string POINT_ATTR_FIRST("firstPoint");
+ static const std::string POINT_ATTR_FIRST("FirstPoint");
return POINT_ATTR_FIRST;
}
/// attribute name for second point
inline static const std::string& POINT_SECOND()
{
- static const std::string POINT_ATTR_SECOND("secondPoint");
+ static const std::string POINT_ATTR_SECOND("SecondPoint");
return POINT_ATTR_SECOND;
}
+ /// attribute name for second point
+ inline static const std::string& CYLINDRICAL_FACE()
+ {
+ static const std::string CYLINDRICAL_FACE_ATTR("CylindricalFace");
+ return CYLINDRICAL_FACE_ATTR;
+ }
inline static const double MINIMAL_LENGTH() { return 1.e-5; }
ConstructionPlugin_Axis();
/// Customize presentation of the feature
- virtual void customisePresentation(AISObjectPtr thePrs);
+ virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs,
+ std::shared_ptr<GeomAPI_ICustomPrs> theDefaultPrs);
+
+ protected:
+ void createAxisByTwoPoints();
+ void createAxisByCylindricalFace();
};