//==================================================================================================
-OperaAPI_AddNode::OperaAPI_AddNode(const std::shared_ptr<ModelAPI_Feature>& theFeature,
- const ModelHighAPI_Selection& theMainObject,
- const ModelHighAPI_Selection& theTool)
- : ModelHighAPI_Interface(theFeature)
+OperaAPI_AddNode::OperaAPI_AddNode(const std::shared_ptr<ModelAPI_Feature> &theFeature,
+ const ModelHighAPI_Selection &theMainObject,
+ const ModelHighAPI_Selection &theTool,
+ const ModelHighAPI_Double &theDx,
+ const ModelHighAPI_Double &theDy,
+ const ModelHighAPI_Double &theDz)
+: ModelHighAPI_Interface(theFeature)
{
if(initialize()) {
fillAttribute(theMainObject, mainObject());
setToolObject(theTool);
+ fillAttribute(theDx, dx());
+ fillAttribute(theDy, dy());
+ fillAttribute(theDz, dz());
}
}
AttributeSelectionPtr anAttrTool =
aBase->selection(OperaPlugin_AddNode::TOOL_OBJECT_ID());
- theDumper << anAttrTool << ")" << std::endl;
+ theDumper << anAttrTool;
+
+ AttributeDoublePtr anAttrDx = aBase->real(OperaPlugin_AddNode::DX_ID());
+ AttributeDoublePtr anAttrDy = aBase->real(OperaPlugin_AddNode::DY_ID());
+ AttributeDoublePtr anAttrDz = aBase->real(OperaPlugin_AddNode::DZ_ID());
+ theDumper << ", " << anAttrDx << ", " << anAttrDy << ", " << anAttrDz << ")" << std::endl;
}
//==================================================================================================
-AddNodePtr addAddNode(const std::shared_ptr<ModelAPI_Document>& thePart,
- const ModelHighAPI_Selection& theMainObject,
- const ModelHighAPI_Selection& theTool)
+AddNodePtr addAddNode(const std::shared_ptr<ModelAPI_Document> &thePart,
+ const ModelHighAPI_Selection &theMainObject,
+ const ModelHighAPI_Selection &theTool,
+ const ModelHighAPI_Double &theDx,
+ const ModelHighAPI_Double &theDy,
+ const ModelHighAPI_Double &theDz)
{
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(OperaAPI_AddNode::ID());
- return AddNodePtr(new OperaAPI_AddNode(aFeature, theMainObject, theTool));
+ return AddNodePtr(new OperaAPI_AddNode(aFeature, theMainObject, theTool, theDx, theDy, theDz));
}
#include <ModelHighAPI_Interface.h>
#include <ModelHighAPI_Macro.h>
+class ModelHighAPI_Double;
class ModelHighAPI_Selection;
/// \class OperaAPI_AddNode
/// Constructor with values.
OPERAAPI_EXPORT
- explicit OperaAPI_AddNode(const std::shared_ptr<ModelAPI_Feature>& theFeature,
- const ModelHighAPI_Selection& theMainObject,
- const ModelHighAPI_Selection& theTool);
+ explicit OperaAPI_AddNode(const std::shared_ptr<ModelAPI_Feature> &theFeature,
+ const ModelHighAPI_Selection &theMainObject,
+ const ModelHighAPI_Selection &theTool,
+ const ModelHighAPI_Double &theDx,
+ const ModelHighAPI_Double &theDy,
+ const ModelHighAPI_Double &theDz);
/// Destructor.
OPERAAPI_EXPORT
/// \ingroup CPPHighAPI
/// \brief Create Volume feature.
OPERAAPI_EXPORT
-AddNodePtr addAddNode(const std::shared_ptr<ModelAPI_Document>& thePart,
- const ModelHighAPI_Selection& theMainObject,
- const ModelHighAPI_Selection& theTool);
+AddNodePtr addAddNode(const std::shared_ptr<ModelAPI_Document> &thePart,
+ const ModelHighAPI_Selection &theMainObject,
+ const ModelHighAPI_Selection &theTool,
+ const ModelHighAPI_Double &theDx,
+ const ModelHighAPI_Double &theDy,
+ const ModelHighAPI_Double &theDz);
#endif // OPERAAPI_ADDNODE_H_