}
+//--------------------------------------------------------------------------------------
void ConstructionAPI_Plane::setFaceAndDistance(
const ModelHighAPI_Selection & theFace,
const ModelHighAPI_Double & theDistance)
execute();
}
+
+//--------------------------------------------------------------------------------------
+// TODO(spo): make add* as static functions of the class
+
+PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Selection & theFace,
+ const ModelHighAPI_Double & theDistance)
+{
+ // TODO(spo): check that thePart is not empty
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ConstructionAPI_Plane::ID());
+ return PlanePtr(new ConstructionAPI_Plane(aFeature, theFace, theDistance));
+}
+
+PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Double & theA,
+ const ModelHighAPI_Double & theB,
+ const ModelHighAPI_Double & theC,
+ const ModelHighAPI_Double & theD)
+{
+ // TODO(spo): check that thePart is not empty
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ConstructionAPI_Plane::ID());
+ return PlanePtr(new ConstructionAPI_Plane(aFeature, theA, theB, theC, theD));
+}
//! Pointer on Plane object
typedef std::shared_ptr<ConstructionAPI_Plane> PlanePtr;
+/**\ingroup CPPHighAPI
+ * \brief Create Plane feature
+ */
+PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Selection & theFace,
+ const ModelHighAPI_Double & theDistance);
+
+/**\ingroup CPPHighAPI
+ * \brief Create Plane feature
+ */
+PlanePtr addPlane(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Double & theA,
+ const ModelHighAPI_Double & theB,
+ const ModelHighAPI_Double & theC,
+ const ModelHighAPI_Double & theD);
+
//--------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------
#endif /* SRC_CONSTRUCTIONAPI_CONSTRUCTIONAPI_PLANE_H_ */
const ModelHighAPI_Double& theZ)
{
// TODO(spo): check that thePart is not empty
- std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature("Point");
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ConstructionAPI_Point::ID());
return PointPtr(new ConstructionAPI_Point(aFeature, theX, theY, theZ));
}