-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include "ConstructionAPI_Point.h"
//==================================================================================================
ConstructionAPI_Point::ConstructionAPI_Point(const std::shared_ptr<ModelAPI_Feature>& theFeature,
const ModelHighAPI_Selection& theObject,
- const bool theIsCircularEdge)
+ const bool theIsCircularEdge,
+ const bool theIsXYZSelection)
: ModelHighAPI_Interface(theFeature)
{
if (initialize())
{
if (theIsCircularEdge) {
setByCenterOfCircle(theObject);
- } else if (theObject.shapeType() == "VERTEX") {
+ } else if (theObject.shapeType() == "VERTEX" && theIsXYZSelection) {
// This is tricky way to get vertex shape.
fillAttribute(theObject, mypointToProject);
GeomShapePtr aShape = mypointToProject->value();
const ModelHighAPI_Double& theY,
const ModelHighAPI_Double& theZ)
{
- //fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_XYZ(), mycreationMethod);
-
- // TODO: Fill point attribute
- //fillAttribute(theX, myx);
- //fillAttribute(theY, myy);
- //fillAttribute(theZ, myz);
-
fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_XYZ(), mycreationMethod);
fillAttribute(theX, theY, theZ, mypoint);
fillAttribute(ConstructionPlugin_Point::GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_GRAVITY(),
mygeometricalPropertyType);
fillAttribute(theObject, myobjectForCenterOfGravity);
+
+ execute();
}
//==================================================================================================
fillAttribute(ConstructionPlugin_Point::GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_CIRCLE(),
mygeometricalPropertyType);
fillAttribute(theObject, myobjectForCenterOfCircle);
+
+ execute();
}
//==================================================================================================
std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ConstructionAPI_Point::ID());
return PointPtr(new ConstructionAPI_Point(aFeature, theObject, theIsCircularEdge));
}
+
+//==================================================================================================
+PointPtr addPointXYZ(const std::shared_ptr<ModelAPI_Document> & thePart,
+ const ModelHighAPI_Selection& theObject)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(ConstructionAPI_Point::ID());
+ return PointPtr(new ConstructionAPI_Point(aFeature, theObject, false, true));
+}