+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::setByProjectionOnFace(const ModelHighAPI_Selection& theVertex,
+ const ModelHighAPI_Selection& theFace)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_PROJECTION(),
+ mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::PROJECTION_TYPE_ON_FACE(),
+ myprojectionType);
+ fillAttribute(theVertex, mypointToProject);
+ fillAttribute(theFace, myfaceForPointProjection);
+
+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::setByLinesIntersection(const ModelHighAPI_Selection& theEdge1,
+ const ModelHighAPI_Selection& theEdge2)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINES(),
+ myintersectionType);
+ fillAttribute(theEdge1, myintersectionLine1);
+ fillAttribute(theEdge2, myintersectionLine2);
+
+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::setByLineAndPlaneIntersection(const ModelHighAPI_Selection& theEdge,
+ const ModelHighAPI_Selection& theFace)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINE_AND_PLANE(),
+ myintersectionType);
+ fillAttribute(theEdge, myintersectionLine);
+ fillAttribute(theFace, myintersectionPlane);
+ fillAttribute("", useOffset()); // not used by default
+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::setByPlanesIntersection(const ModelHighAPI_Selection& theFace1,
+ const ModelHighAPI_Selection& theFace2,
+ const ModelHighAPI_Selection& theFace3)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION(), mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::INTERSECTION_TYPE_BY_PLANES(),
+ myintersectionType);
+ fillAttribute(theFace1, myintersectionPlane1);
+ fillAttribute(theFace2, myintersectionPlane2);
+ fillAttribute(theFace3, myintersectionPlane3);
+
+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::setByCenterOfGravity(const ModelHighAPI_Selection& theObject)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_GEOMETRICAL_PROPERTY(),
+ mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_GRAVITY(),
+ mygeometricalPropertyType);
+ fillAttribute(theObject, myobjectForCenterOfGravity);
+
+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::setByCenterOfCircle(const ModelHighAPI_Selection& theObject)
+{
+ fillAttribute(ConstructionPlugin_Point::CREATION_METHOD_BY_GEOMETRICAL_PROPERTY(),
+ mycreationMethod);
+ fillAttribute(ConstructionPlugin_Point::GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_CIRCLE(),
+ mygeometricalPropertyType);
+ fillAttribute(theObject, myobjectForCenterOfCircle);
+
+ execute();
+}
+
+//==================================================================================================
+void ConstructionAPI_Point::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aDocName = theDumper.name(aBase->document());
+ const std::string aMeth = creationMethod()->value();
+
+ // common part
+ theDumper << aBase << " = model.addPoint(" << aDocName << ", ";
+
+ if (aMeth == "" || // default is XYZ
+ aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_XYZ()) {
+ theDumper << point();
+ } else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_INTERSECTION()) {
+ const std::string anIntersectionType = intersectionType()->value();
+ if (anIntersectionType == ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINES())
+ {
+ theDumper << intersectionLine1() << ", " << intersectionLine2();
+ }
+ else if (anIntersectionType == ConstructionPlugin_Point::INTERSECTION_TYPE_BY_LINE_AND_PLANE())
+ {
+ theDumper << intersectionLine() << ", " << intersectionPlane();
+ if (!useOffset()->value().empty()) { // call method with defined offset
+ theDumper << ", " << offset() << ", " << reverseOffset();
+ }
+ }
+ else if (anIntersectionType == ConstructionPlugin_Point::INTERSECTION_TYPE_BY_PLANES())
+ {
+ theDumper << intersectionPlane1() << ", "
+ << intersectionPlane2() << ", "
+ << intersectionPlane3();
+ }
+ } else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_DISTANCE_ON_EDGE()) {
+ theDumper << edge() << ", ";
+ if (offsetType()->value() == ConstructionPlugin_Point::OFFSET_TYPE_BY_DISTANCE()) {
+ theDumper << distance() << ", " << false;
+ }
+ else {
+ theDumper << ratio() << ", " << true;
+ }
+ theDumper << ", " << reverse()->value();
+ } else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_PROJECTION()) {
+ theDumper << pointToProject() << ", ";
+ if (projectionType()->value() == ConstructionPlugin_Point::PROJECTION_TYPE_ON_EDGE()) {
+ theDumper << edgeForPointProjection();
+ } else {
+ theDumper << faceForPointProjection();
+ }
+ } else if (aMeth == ConstructionPlugin_Point::CREATION_METHOD_BY_GEOMETRICAL_PROPERTY()) {
+ if (geometricalPropertyType()->value() ==
+ ConstructionPlugin_Point::GEOMETRICAL_PROPERTY_TYPE_BY_CENTER_OF_GRAVITY())
+ {
+ theDumper << objectForCenterOfGravity();
+ }
+ else
+ {
+ theDumper << objectForCenterOfCircle() << ", " << true;
+ }