+void BuildAPI_Edge::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ std::string aPartName = theDumper.name(aBase->document());
+
+ theDumper << aBase << " = model.addEdge(" << aPartName << ", ";
+
+ AttributeStringPtr aCreationMethod = aBase->string(BuildPlugin_Edge::CREATION_METHOD());
+ if (aCreationMethod && aCreationMethod->isInitialized() &&
+ aCreationMethod->value() == BuildPlugin_Edge::CREATION_BY_POINTS()) {
+ theDumper << aBase->selection(BuildPlugin_Edge::FIRST_POINT()) << ", "
+ << aBase->selection(BuildPlugin_Edge::SECOND_POINT());
+ }
+ else {
+ theDumper << aBase->selectionList(BuildPlugin_Edge::BASE_OBJECTS_ID());
+
+ AttributeBooleanPtr isIntersect = aBase->boolean(BuildPlugin_Edge::INTERSECT_ID());
+ if (isIntersect->isInitialized())
+ theDumper << ", " << isIntersect;
+ }
+ theDumper << ")" << std::endl;
+}
+
+//==================================================================================================
+EdgePtr addEdge(const std::shared_ptr<ModelAPI_Document>& thePart,
+ const std::list<ModelHighAPI_Selection>& theBaseObjects,
+ const bool theComputeIntersections)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature = thePart->addFeature(BuildAPI_Edge::ID());
+ return EdgePtr(new BuildAPI_Edge(aFeature, theBaseObjects, theComputeIntersections));
+}
+