+
+std::list<std::shared_ptr<SketchAPI_SketchEntity> >
+SketchAPI_IntersectionPoint::intersectionPoints() const
+{
+ std::list<std::shared_ptr<SketchAPI_SketchEntity> > anEntities;
+
+ std::list<ObjectPtr> anIntersections =
+ feature()->reflist(SketchPlugin_IntersectionPoint::INTERSECTION_POINTS_ID())->list();
+ for (std::list<ObjectPtr>::iterator anIt = anIntersections.begin();
+ anIt != anIntersections.end(); ++anIt) {
+ FeaturePtr aFeature = ModelAPI_Feature::feature(*anIt);
+ if (aFeature && aFeature->getKind() == SketchPlugin_Point::ID())
+ {
+ std::shared_ptr<SketchAPI_SketchEntity> anEnt(new SketchAPI_Point(aFeature));
+ anEntities.push_back(anEnt);
+ }
+ }
+
+ return anEntities;
+}
+
+//--------------------------------------------------------------------------------------
+
+void SketchAPI_IntersectionPoint::dump(ModelHighAPI_Dumper& theDumper) const
+{
+ FeaturePtr aBase = feature();
+ const std::string& aSketchName = theDumper.parentName(aBase);
+
+ AttributeSelectionPtr anExternal = externalFeature();
+ AttributeBooleanPtr isIncludeToRes = includeToResult();
+ theDumper << aBase << " = " << aSketchName << ".addIntersectionPoint("
+ << anExternal << ", " << isIncludeToRes << ")" << std::endl;
+ // dump "auxiliary" flag if necessary
+ SketchAPI_SketchEntity::dump(theDumper);
+
+ // Dump variables for a list of intersected points
+ theDumper << "[";
+ std::list<std::shared_ptr<SketchAPI_SketchEntity> > aList = intersectionPoints();
+ std::list<std::shared_ptr<SketchAPI_SketchEntity> >::const_iterator anIt = aList.begin();
+ for (; anIt != aList.end(); ++anIt) {
+ if (anIt != aList.begin())
+ theDumper << ", ";
+ theDumper << (*anIt)->feature();
+ }
+ theDumper << "] = " << theDumper.name(aBase) << ".intersectionPoints()" << std::endl;
+}