+void SketchAPI_Line::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ if (isCopy())
+ return; // no need to dump copied feature
+
+ FeaturePtr aBase = feature();
+ const std::string& aSketchName = theDumper.parentName(aBase);
+
+ AttributeSelectionPtr anExternal = aBase->selection(SketchPlugin_SketchEntity::EXTERNAL_ID());
+ if (anExternal->context()) {
+ // line is external
+ theDumper << aBase << " = " << aSketchName << ".addLine(" << anExternal << ")" << std::endl;
+ } else {
+ // segment given by its points
+ theDumper << aBase << " = " << aSketchName << ".addLine("
+ << startPoint() << ", " << endPoint() << ")" << std::endl;
+ }
+ // dump "auxiliary" flag if necessary
+ SketchAPI_SketchEntity::dump(theDumper);
+}