2 #include "HYDROData_Stream.h"
4 #include "HYDROData_Document.h"
5 #include "HYDROData_PolylineXY.h"
6 #include "HYDROData_Profile.h"
8 #include <BRep_Builder.hxx>
9 #include <BRepBuilderAPI_MakeEdge.hxx>
10 #include <BRepBuilderAPI_MakeWire.hxx>
11 #include <BRepBuilderAPI_MakeFace.hxx>
13 #include <TDataStd_RealArray.hxx>
16 #include <TopoDS_Wire.hxx>
17 #include <TopoDS_Shell.hxx>
18 #include <TopoDS_Face.hxx>
19 #include <TopoDS_Edge.hxx>
20 #include <TopoDS_Vertex.hxx>
22 #include <TopExp_Explorer.hxx>
23 #include <BRepProj_Projection.hxx>
24 #include <BRepExtrema_ExtCC.hxx>
32 #include <Bnd_Box.hxx>
33 #include <BRepBndLib.hxx>
34 #include <TColStd_Array1OfReal.hxx>
35 #include <Precision.hxx>
36 #include <QStringList>
38 #include <NCollection_DataMap.hxx>
39 typedef NCollection_DataMap<Standard_Real, Handle(HYDROData_Profile)> HYDROData_DataMapOfRealOfHDProfile;
40 #include <TColStd_ListOfReal.hxx>
41 #include <TColStd_ListIteratorOfListOfReal.hxx>
42 #include <TCollection_CompareOfReal.hxx>
43 #include <SortTools_QuickSortOfReal.hxx>
44 #include <TColgp_Array1OfPnt.hxx>
45 #include <TColgp_HArray1OfPnt.hxx>
46 #include <GeomAPI_Interpolate.hxx>
47 #include <Geom_BSplineCurve.hxx>
48 #include <TopTools_Array1OfShape.hxx>
49 #include <BRepCheck_Analyzer.hxx>
51 //#define DEB_STREAM 1
53 //#define DEB_HASINT 1
54 //#define DEB_UPDATE 1
55 #include <BRepTools.hxx>
56 #include <TCollection_AsciiString.hxx>
59 #define PYTHON_STREAM_ID "KIND_STREAM"
61 IMPLEMENT_STANDARD_HANDLE(HYDROData_Stream,HYDROData_NaturalObject)
62 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Stream,HYDROData_NaturalObject)
65 HYDROData_Stream::HYDROData_Stream()
66 : HYDROData_NaturalObject()
70 HYDROData_Stream::~HYDROData_Stream()
74 QStringList HYDROData_Stream::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
78 Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab );
79 if ( aDocument.IsNull() )
82 QString aDocName = aDocument->GetDocPyName();
83 QString aStreamName = GetName();
85 aResList << QString( "%1 = %2.CreateObject( %3 );" )
86 .arg( aStreamName ).arg( aDocName ).arg( PYTHON_STREAM_ID );
87 aResList << QString( "%1.SetName( \"%2\" );" )
88 .arg( aStreamName ).arg( aStreamName );
89 aResList << QString( "" );
96 HYDROData_SequenceOfObjects HYDROData_Stream::GetAllReferenceObjects() const
98 HYDROData_SequenceOfObjects aResSeq = HYDROData_Object::GetAllReferenceObjects();
100 Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
101 if ( !aHydAxis.IsNull() )
102 aResSeq.Append( aHydAxis );
104 HYDROData_SequenceOfObjects aSeqOfProfiles = GetProfiles();
105 aResSeq.Append( aSeqOfProfiles );
110 TopoDS_Shape HYDROData_Stream::GetTopShape() const
112 return getTopShape();
114 TopoDS_Shape HYDROData_Stream::GetShape3D() const
118 Handle(Geom_BSplineCurve) HYDROData_Stream::buildInterpolationCurve(const Handle(TColgp_HArray1OfPnt)& theArrayOfPnt)
120 Handle(Geom_BSplineCurve) aBSpline;
121 GeomAPI_Interpolate anInterpolator (theArrayOfPnt, Standard_False, 1.0e-5);
122 anInterpolator.Perform() ;
123 if (anInterpolator.IsDone())
124 aBSpline = anInterpolator.Curve();
127 void HYDROData_Stream::Update()
129 HYDROData_NaturalObject::Update();
131 Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
132 HYDROData_SequenceOfObjects aRefProfiles = GetProfiles();
133 if ( aHydAxis.IsNull() || aRefProfiles.IsEmpty() )
136 bool anIsFirst = true;
137 gp_Pnt aPrevFirstPoint, aPrevLastPoint;
138 Handle(TColgp_HArray1OfPnt) anArrayOfFPnt = new TColgp_HArray1OfPnt(1, aRefProfiles.Length());
139 Handle(TColgp_HArray1OfPnt) anArrayOfLPnt = new TColgp_HArray1OfPnt(1, aRefProfiles.Length());
140 TopTools_Array1OfShape anArrOfProfiles(1, aRefProfiles.Length());
141 TopTools_Array1OfShape anArrOf2DProfiles(1, aRefProfiles.Length());
144 HYDROData_SequenceOfObjects::Iterator anIter( aRefProfiles );
145 for (int i=1 ; anIter.More(); anIter.Next(),i++ )
147 Handle(HYDROData_Profile) aProfile =
148 Handle(HYDROData_Profile)::DownCast( anIter.Value() );
149 if ( aProfile.IsNull() )
151 const TopoDS_Shape& aProf3d = aProfile->GetShape3D();
153 if ( !aProfile->GetFirstPoint( aPnt1 ) || !aProfile->GetLastPoint( aPnt2 ) )
155 anArrOfProfiles.SetValue(i,aProfile->GetShape3D());//aProfile->GetTopShape();
156 anArrOf2DProfiles.SetValue(i,aProfile->GetTopShape());
158 gp_Pnt aCurFirstPoint( aPnt1.X(), aPnt1.Y(), 0 ), aCurFP;
159 gp_Pnt aCurLastPoint( aPnt2.X(), aPnt2.Y(), 0 ), aCurLP;
160 TopoDS_Vertex aV1, aV2;
161 TopExp::Vertices(TopoDS::Wire(aProf3d), aV1, aV2);
162 gp_Pnt aP1 = BRep_Tool::Pnt(aV1);
163 if(aP1.X() == aPnt1.X() && aP1.Y() == aPnt1.Y())
167 aP1 = BRep_Tool::Pnt(aV2);
168 if(aP1.X() == aPnt2.X() && aP1.Y() == aPnt2.Y())
172 anArrayOfFPnt->SetValue(i,aCurFP);
173 anArrayOfLPnt->SetValue(i,aCurLP);
177 // Construct of the 3D presentation
178 Handle(Geom_BSplineCurve) aBSpline = buildInterpolationCurve (anArrayOfFPnt);
179 if(aBSpline.IsNull())
181 TopoDS_Edge anEdgLeft, anEdgRight;
182 BRepBuilderAPI_MakeEdge aMakeEdge(aBSpline);
183 if(aMakeEdge.IsDone())
184 anEdgLeft = aMakeEdge.Edge();
185 if(anEdgLeft.IsNull())
188 aBSpline = buildInterpolationCurve (anArrayOfLPnt);
189 if(aBSpline.IsNull())
191 aMakeEdge.Init(aBSpline);
192 if(aMakeEdge.IsDone())
193 anEdgRight = aMakeEdge.Edge();
194 if(anEdgRight.IsNull())
197 TopoDS_Compound aCmp;
198 aBB.MakeCompound(aCmp);
199 anIter.Init( aRefProfiles );
200 for (int i=1 ; i < anArrOfProfiles.Length() +1; i++ )
201 aBB.Add(aCmp, anArrOfProfiles.Value(i));
202 aBB.Add(aCmp,anEdgLeft);
203 aBB.Add(aCmp,anEdgRight);
204 BRepCheck_Analyzer aCh(aCmp);
209 BRepTools::Write(aCmp, "str3d.brep");
214 // Construct the top presentation
215 for(int i=1;i<= anArrayOfLPnt->Length();i++) {
216 gp_Pnt aPnt = anArrayOfFPnt->Value(i);
217 aPnt.SetZ(.0); // make 2d
218 anArrayOfFPnt->SetValue(i, aPnt);
219 aPnt = anArrayOfLPnt->Value(i);
221 anArrayOfLPnt->SetValue(i, aPnt);
224 aBSpline = buildInterpolationCurve (anArrayOfFPnt);
225 if(aBSpline.IsNull())
227 aMakeEdge.Init(aBSpline);
228 if(aMakeEdge.IsDone())
229 anEdgLeft = aMakeEdge.Edge();
231 aBSpline = buildInterpolationCurve (anArrayOfLPnt);
232 if(aBSpline.IsNull())
234 aMakeEdge.Init(aBSpline);
235 if(aMakeEdge.IsDone())
236 anEdgRight = aMakeEdge.Edge();
237 if(anEdgRight.IsNull())
239 BRepBuilderAPI_MakeEdge aMakeEdge2(anArrayOfFPnt->Value(1),anArrayOfLPnt->Value(1));
240 TopoDS_Edge aBotEdge, aTopEdge;
241 if(aMakeEdge2.IsDone())
242 aBotEdge = aMakeEdge2.Edge();
243 BRepBuilderAPI_MakeEdge aMakeEdge3(anArrayOfFPnt->Value(anArrayOfFPnt->Length()),anArrayOfLPnt->Value(anArrayOfLPnt->Length()));
244 if(aMakeEdge3.IsDone())
245 aTopEdge = aMakeEdge3.Edge();
247 BRepBuilderAPI_MakeWire aMakeWire( aBotEdge, anEdgLeft, aTopEdge,anEdgRight);
248 TopoDS_Wire aSectProfileWire;
249 if(aMakeWire.IsDone())
250 aSectProfileWire = aMakeWire.Wire();
251 BRepBuilderAPI_MakeFace aMakeFace( aSectProfileWire, Standard_True );
254 if( aMakeFace.IsDone() )
255 aFace = aMakeFace.Face();
257 aBB.MakeCompound(aCmp);
259 for(int i=1;i <= anArrOf2DProfiles.Length(); i++)
260 aBB.Add(aCmp,anArrOf2DProfiles.Value(i));
266 BRepTools::Write(aCmp, "str2d.brep");
273 bool HYDROData_Stream::SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis )
275 Handle(HYDROData_PolylineXY) aPrevAxis = GetHydraulicAxis();
277 if ( theAxis.IsNull() )
279 RemoveHydraulicAxis();
280 return !aPrevAxis.IsNull();
283 if ( IsEqual( aPrevAxis, theAxis ) )
286 TopoDS_Wire aHydraulicWire = TopoDS::Wire( theAxis->GetShape() );
287 if ( aHydraulicWire.IsNull() )
288 return false; // The polyline must be a single wire
290 SetReferenceObject( theAxis, DataTag_HydraulicAxis );
292 // Update the order of profiles
293 updateProfilesOrder();
295 // Indicate model of the need to update the stream presentation
301 Handle(HYDROData_PolylineXY) HYDROData_Stream::GetHydraulicAxis() const
303 return Handle(HYDROData_PolylineXY)::DownCast(
304 GetReferenceObject( DataTag_HydraulicAxis ) );
307 void HYDROData_Stream::RemoveHydraulicAxis()
309 Handle(HYDROData_PolylineXY) aPrevAxis = GetHydraulicAxis();
310 if ( aPrevAxis.IsNull() )
313 ClearReferenceObjects( DataTag_HydraulicAxis );
315 // We remove the reference profiles
318 // Indicate model of the need to update the stream presentation
322 bool HYDROData_Stream::HasIntersection( const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane,
323 Standard_Real& outPar ) const
325 Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
326 if ( theProfile.IsNull() || aHydAxis.IsNull() )
329 TopoDS_Wire aHydraulicWire = TopoDS::Wire( aHydAxis->GetShape() ); //guide line
330 TopoDS_Wire aProfileWire = TopoDS::Wire( theProfile->GetTopShape() );
331 if ( aHydraulicWire.IsNull() || aProfileWire.IsNull() )
334 BRepProj_Projection aProjector (aProfileWire, thePlane, gp::OZ().Direction());
335 if(!aProjector.IsDone())
337 TopoDS_Shape aPrjProfile = aProjector.Shape();
338 if(aPrjProfile.IsNull())
340 TopoDS_Vertex aV1, aV2;
341 if(aPrjProfile.ShapeType() == TopAbs_EDGE)
342 TopExp::Vertices(TopoDS::Edge(aPrjProfile), aV1, aV2);
343 else if(aPrjProfile.ShapeType() == TopAbs_WIRE)
344 TopExp::Vertices(TopoDS::Wire(aPrjProfile), aV1, aV2);
345 else if(aPrjProfile.ShapeType() == TopAbs_COMPOUND){
346 TopExp_Explorer anExp(aPrjProfile, TopAbs_WIRE);
348 TopExp::Vertices(TopoDS::Wire(anExp.Current()), aV1, aV2);
350 anExp.Init(aPrjProfile, TopAbs_EDGE);
352 TopExp::Vertices(TopoDS::Edge(anExp.Current()), aV1, aV2);
356 if(aV1.IsNull() || aV2.IsNull())
358 gp_Pnt aPnt1 = BRep_Tool::Pnt(aV1);
359 gp_Pnt aPnt2 = BRep_Tool::Pnt(aV2);
362 BRepBuilderAPI_MakeEdge aMk(aPnt1, aPnt2);
365 const TopoDS_Edge& anEdg2 = aMk.Edge();//Section edge
366 Standard_Integer aNum(0);
368 TopExp_Explorer anExplo(aHydraulicWire, TopAbs_EDGE);
369 for(;anExplo.More();anExplo.Next()) aNum++;
370 // check for self-intersection
371 const Standard_Real SquareTolerance = Precision::Confusion()*Precision::Confusion();
372 Standard_Boolean hasInt(false);
373 Standard_Real aSqDist(DBL_MAX);
374 Standard_Integer anIndx(0);
375 BRepExtrema_ExtCC aCC;
376 aCC.Initialize(anEdg2);
378 anExplo.Init(aHydraulicWire, TopAbs_EDGE);
379 for(Standard_Integer j=1;anExplo.More();anExplo.Next(),j++) {
380 const TopoDS_Edge& anEdg1 = TopoDS::Edge(anExplo.Current());
383 Standard_Boolean hasSol(false);
387 for(Standard_Integer i=1; i<= aCC.NbExt();i++)
388 if(aCC.SquareDistance(i) < aSqDist) {
389 aSqDist = aCC.SquareDistance(i);
395 if(aSqDist <= SquareTolerance) { // hasInt
396 const gp_Pnt& aPnt = aCC.PointOnE1(anIndx);
398 TopExp::Vertices(anEdg1, aV1, aV2, Standard_True);
399 outPar += BRep_Tool::Pnt(aV1).Distance(aPnt);
401 Standard_Real aPar = aCC.ParameterOnE1(anIndx);
409 TopExp::Vertices(anEdg1, aV1, aV2);
410 outPar += BRep_Tool::Pnt(aV1).Distance(BRep_Tool::Pnt(aV2));
413 } else if(aNum > 1) {
414 TopExp::Vertices(anEdg1, aV1, aV2);
415 outPar += BRep_Tool::Pnt(aV1).Distance(BRep_Tool::Pnt(aV2));
424 bool HYDROData_Stream::AddProfile( const Handle(HYDROData_Profile)& theProfile )
426 if ( theProfile.IsNull() )
429 Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
430 if ( aHydAxis.IsNull() )
434 if(!BuildFace(aHydAxis, aPlane))
437 Standard_Real aPar(.0);
438 if ( HasReference( theProfile, DataTag_Profile ) || !HasIntersection( theProfile, aPlane, aPar ) )
439 return false; // Object is already in reference list or it has no intersection
441 int aProfileIndex = insertParameter( aPar );
442 insertProfileInToOrder( theProfile, aProfileIndex );
444 // Indicate model of the need to update the stream presentation
450 HYDROData_SequenceOfObjects HYDROData_Stream::GetProfiles() const
452 return GetReferenceObjects( DataTag_Profile );
455 bool HYDROData_Stream::RemoveProfile( const Handle(HYDROData_Profile)& theProfile )
457 if ( theProfile.IsNull() )
460 int aProfileIndex = -1;
462 HYDROData_SequenceOfObjects aRefProfiles = GetProfiles();
463 HYDROData_SequenceOfObjects::Iterator anIter( aRefProfiles );
464 for ( int i = 0 ; anIter.More(); anIter.Next(), ++i )
466 Handle(HYDROData_Profile) aProfile =
467 Handle(HYDROData_Profile)::DownCast( anIter.Value() );
468 if ( aProfile.IsNull() )
471 if ( IsEqual( theProfile, aProfile ) )
478 if ( aProfileIndex == -1 )
481 RemoveReferenceObject( theProfile->Label(), DataTag_Profile );
483 // Remove parameter for removed profile
484 removeParameter( aProfileIndex );
486 // Indicate model of the need to update the stream presentation
492 void HYDROData_Stream::RemoveProfiles()
494 bool anIsToUpdate = IsMustBeUpdated() || NbReferenceObjects( DataTag_Profile ) > 0;
496 ClearReferenceObjects( DataTag_Profile );
498 // Remove the parameters array
499 removeParametersArray();
501 // Indicate model of the need to update the stream presentation
502 SetToUpdate( anIsToUpdate );
505 void HYDROData_Stream::insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile,
506 const int theBeforeIndex )
508 Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
509 if ( theProfile.IsNull() || aHydAxis.IsNull() )
512 TopoDS_Wire aHydraulicWire = TopoDS::Wire( aHydAxis->GetShape() );
513 TopoDS_Wire aProfileWire = TopoDS::Wire( theProfile->GetTopShape() );
514 if ( aHydraulicWire.IsNull() || aProfileWire.IsNull() )
517 if ( theBeforeIndex == -1 )
518 AddReferenceObject( theProfile, DataTag_Profile );
520 InsertReferenceObject( theProfile, DataTag_Profile, theBeforeIndex );
523 bool HYDROData_Stream::BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis, TopoDS_Face& thePlane) const
525 if ( theHydAxis.IsNull() ) return false;
526 TopoDS_Wire aHydraulicWire = TopoDS::Wire( theHydAxis->GetShape() );
527 if(aHydraulicWire.IsNull()) return false;
528 gp_Ax2 aX2(gp::XOY());
532 BRepBndLib::Add(aHydraulicWire,B);
533 Standard_Real axmin,aymin,azmin,axmax,aymax,azmax;
534 B.Get(axmin,aymin,azmin,axmax,aymax,azmax);
535 BRepBuilderAPI_MakeFace aMkr(aPln, axmin-500., axmax+500., aymin-500., aymax+500.); // to be tuned later according max/ Profile deviation
536 if(!aMkr.IsDone() || aMkr.Shape().IsNull()) return false;
537 thePlane = TopoDS::Face(aMkr.Shape());
541 void HYDROData_Stream::updateProfilesOrder()
543 HYDROData_SequenceOfObjects aRefProfiles = GetProfiles();
544 if ( aRefProfiles.IsEmpty() )
547 // At first we remove all profiles from order
550 Handle(HYDROData_PolylineXY) aHydAxis = GetHydraulicAxis();
551 if ( aHydAxis.IsNull() )
555 if ( !BuildFace( aHydAxis, aPlane ) )
558 Standard_Real aPar( .0 );
562 TopoDS_Compound aCmp;
563 aBB.MakeCompound(aCmp);
566 HYDROData_DataMapOfRealOfHDProfile aDM;
567 TColStd_ListOfReal aList;
568 HYDROData_SequenceOfObjects::Iterator anIter( aRefProfiles );
569 for (int i = 1 ; anIter.More(); anIter.Next(), i++ )
571 Handle(HYDROData_Profile) aProfile =
572 Handle(HYDROData_Profile)::DownCast( anIter.Value() );
574 TopoDS_Wire aProfileWire = TopoDS::Wire( aProfile->GetTopShape() );
575 aBB.Add( aCmp, aProfileWire );
577 if ( aProfile.IsNull() || !HasIntersection( aProfile, aPlane, aPar ) )
580 aDM.Bind( aPar, aProfile );
581 aList.Append( aPar );
584 if ( aList.IsEmpty() )
587 TColStd_Array1OfReal anArr( 1, aList.Extent() );
589 TColStd_ListIteratorOfListOfReal it( aList );
590 for ( int j = 1; it.More(); it.Next(), j++ )
591 anArr( j ) = it.Value();
594 if ( aList.Extent() > 1 )
596 TCollection_CompareOfReal Compar;
597 SortTools_QuickSortOfReal::Sort( anArr, Compar );
599 for (int j = 1; j <= anArr.Length(); j++) {
600 const Standard_Real aKey = anArr(j);
601 const Handle(HYDROData_Profile)& aProfile = aDM.Find(aKey);
602 insertProfileInToOrder( aProfile );
604 } else if ( aList.Extent() == 1 ) {
605 const Standard_Real aKey = aList.Last();
606 const Handle(HYDROData_Profile)& aProfile = aDM.Find(aKey);
607 insertProfileInToOrder( aProfile );
610 setParametersArray( anArr );
613 TopoDS_Wire aHydraulicWire = TopoDS::Wire( aHydAxis->GetShape() );
614 BRepTools::Write(aHydraulicWire, "Path.brep");
615 BRepTools::Write(aCmp, "Prof.brep");
619 void HYDROData_Stream::setParametersArray( const TColStd_Array1OfReal& theArray )
621 if ( theArray.Length() == 0 )
623 removeParametersArray();
627 TDF_Label aLabel = myLab.FindChild( DataTag_ParamsArray );
629 Handle(TDataStd_RealArray) aParamsArray =
630 TDataStd_RealArray::Set( aLabel, theArray.Lower(), theArray.Upper() );
632 for ( int i = theArray.Lower(), n = theArray.Upper(); i <= n; ++i )
634 const Standard_Real& aParam = theArray( i );
635 aParamsArray->SetValue( i, aParam );
639 TColStd_Array1OfReal* HYDROData_Stream::getParametersArray() const
641 TColStd_Array1OfReal* anArray = NULL;
643 TDF_Label aLabel = myLab.FindChild( DataTag_ParamsArray, false );
644 if ( !aLabel.IsNull() )
646 Handle(TDataStd_RealArray) aParamsArray;
647 if ( aLabel.FindAttribute( TDataStd_RealArray::GetID(), aParamsArray ) )
649 anArray = new TColStd_Array1OfReal( aParamsArray->Lower(), aParamsArray->Upper() );
650 for ( int i = aParamsArray->Lower(), n = aParamsArray->Upper(); i <= n; ++i )
652 const Standard_Real& aParam = aParamsArray->Value( i );
653 anArray->SetValue( i, aParam );
661 void HYDROData_Stream::removeParametersArray()
663 TDF_Label aLabel = myLab.FindChild( DataTag_ParamsArray, false );
664 if ( !aLabel.IsNull() )
665 aLabel.ForgetAllAttributes();
668 int HYDROData_Stream::insertParameter( const Standard_Real& theParam )
672 TColStd_Array1OfReal* anArr = getParametersArray();
677 TColStd_Array1OfReal aNewArr( anArr->Lower(), anArr->Upper() + 1 );
679 bool isInserted = false;
680 for ( int i = anArr->Lower(), j = i, n = anArr->Upper(); i <= n; ++i, ++j )
682 const Standard_Real& aStoredParam = anArr->Value( i );
685 if ( theParam > aStoredParam )
691 aNewArr( j ) = theParam;
697 aNewArr( j ) = aStoredParam;
703 aNewArr( aNewArr.Upper() ) = theParam;
706 setParametersArray( aNewArr );
711 TColStd_Array1OfReal aNewArr( 1, 1 );
712 aNewArr.SetValue( 1, theParam );
713 setParametersArray( aNewArr );
719 void HYDROData_Stream::removeParameter( const int& theIndex )
721 TDF_Label aLabel = myLab.FindChild( DataTag_ParamsArray, false );
722 if ( aLabel.IsNull() )
725 Handle(TDataStd_RealArray) aParamsArray;
726 if ( !aLabel.FindAttribute( TDataStd_RealArray::GetID(), aParamsArray ) )
729 TColStd_Array1OfReal aNewArr( aParamsArray->Lower(), aParamsArray->Upper() - 1 );
731 for ( int i = aParamsArray->Lower(), j = i, k = 0, n = aParamsArray->Upper(); i <= n; ++i, ++k )
733 const Standard_Real& aStoredParam = aParamsArray->Value( i );
737 aNewArr.SetValue( j, aStoredParam );
741 setParametersArray( aNewArr );