修复了合并线路后没用重新计算阻抗的问题

Signed-off-by: dmy@lab <dmy@lab.lab>
This commit is contained in:
dmy@lab
2015-03-09 16:26:47 +08:00
parent 4df79fa6fb
commit 46f890b77b
6 changed files with 33 additions and 11 deletions

View File

@@ -8,12 +8,17 @@ Line::Line(const QPair<QString,QString>& fromTo, ACLineSegment* ac, QObject *par
}
void Line::re_extract()
{
this->extract();
}
void Line::extract()
{
//用YJV22-3x240
ACLineSegment *ac=this->ac;
double length=ac->getLength();
this->length=length;
// if((int)length==0)
// {
// std::cout<<"line length zeros "<<ac->getID().toStdString()<<std::endl;
@@ -31,5 +36,5 @@ void Line::extract()
this->g2=g0*length/1000;
this->b1=b0*length/1000;
this->b2=b0*length/1000;
this->length=length/1000;
}

View File

@@ -8,6 +8,7 @@ class Line:public Branch
{
public:
Line(const QPair<QString, QString> &fromTo, ACLineSegment* ac,QObject* parent=0);
void re_extract();
double length;
ACLineSegment *ac;