@@ -83,7 +83,6 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||
{
|
||||
TopologyRecorder::Type::EleType typ;
|
||||
BasicElementInfo *foundEle=NULL;
|
||||
// bool foundCate=false;
|
||||
anotherTerminal=anotherTerminalVector.at(atI);
|
||||
if(this->reachedTerminal.contains(anotherTerminal))
|
||||
{
|
||||
@@ -109,10 +108,6 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||
}
|
||||
terminalA=AC->getTerminalA();
|
||||
terminalB=AC->getTerminalB();
|
||||
// std::cout<<"find"<<AC->getID().toStdString()<<std::endl;
|
||||
// std::cout<<AC->getNamingDescription().toStdString()<<std::endl;
|
||||
//把线路长度也输出来看一下
|
||||
// std::cout<<AC->getLength()<<std::endl;
|
||||
foundEle=AC;
|
||||
typ=TopologyRecorder::Type::AC;
|
||||
}
|
||||
@@ -244,6 +239,12 @@ bool TopologyRecorder::startWithNode(const QString& node)
|
||||
Branch *branch=NULL;
|
||||
switch(typ)
|
||||
{
|
||||
//有可能会访问到重复的元件,所以这里判断一下,如果是已经访问过的就不添加了。
|
||||
if(this->hasAdded.contains(foundEle->getID()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
this->hasAdded[foundEle->getID()]=0;
|
||||
case TopologyRecorder::Type::AC:
|
||||
branch=new Line(fromTo,static_cast<ACLineSegment *>(foundEle),this);
|
||||
this->cimExporter.add(fromTo,static_cast<Line *>(branch));
|
||||
|
||||
Reference in New Issue
Block a user