<< " 0.000\n";
}
}
+ else if (anEnt->IsKind( STANDARD_TYPE(HYDROData_Profile) ))
+ {
+ //Collect data
+ Handle(HYDROData_Profile) aProfile = Handle(HYDROData_Profile)::DownCast( anEnt );
+ HYDROData_ProfileUZ::PointsList aPointList = aProfile->GetParametricPoints();
+ bool IsClosed = aProfile->GetProfileUZ(false)->IsClosedSection(0);;
+ bool IsSpline = false;
+ if (aProfile->GetProfileUZ(false)->GetSectionType(0) == HYDROData_PolylineXY::SECTION_SPLINE)
+ IsSpline = true;
+ //Write to stream
+ aTextStream << "B P\n";
+ aTextStream << "CN " << aProfile->GetName() << "\n";
+ aTextStream << "CP " << IsClosed << " " << IsSpline << "\n";
+ gp_XY aLeftPoint(0.0, 0.0);
+ gp_XY aRightPoint(0.0, 0.0);
+ if (aProfile->GetLeftPoint(aLeftPoint, true) && aProfile->GetRightPoint(aRightPoint, true))
+ aTextStream << "CP " << QString::number(aLeftPoint.X(), 'f', 3) << " " <<
+ QString::number(aLeftPoint.Y(), 'f', 3) << " " <<
+ QString::number(aRightPoint.X(), 'f', 3) << " " <<
+ QString::number(aRightPoint.Y(), 'f', 3) << "\n";
+ else
+ aTextStream << "CP 0.0 0.0 0.0 0.0\n";
+ aTextStream << "CP 2\n";
+ for (int k = aPointList.Lower(); k <= aPointList.Upper(); k++)
+ aTextStream << " " << QString::number(aPointList(k).X(), 'f', 3)
+ << " 0.000 "
+ << QString::number(aPointList(k).Y(), 'f', 3) << "\n";
+ }
}
}
\ No newline at end of file