-// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2023 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
Handle(TColgp_HArray1OfPnt) points;
std::vector<gp_Pnt> aTmpPoints;
+
CurveCreator::Coordinates::const_iterator aPIt = myPoints.begin();
CurveCreator::Coordinates::const_iterator aPItLast = myPoints.end();
- const gp_Pnt aFirstPoint(
- *aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
- gp_Pnt aPoint = aFirstPoint;
- aTmpPoints.push_back(aPoint);
+
+ gp_Pnt aFirstPoint;
+ gp_Pnt aPoint;
+
+ if( myPoints.size() > 0 )
+ {
+ aFirstPoint = gp_Pnt(*aPIt, *(aPIt + 1), (theDimension == 2) ? 0 : *(aPIt + 2));
+ aPoint = aFirstPoint;
+ aTmpPoints.push_back(aPoint);
+ }
for (; aPIt != aPItLast; aPIt += theDimension)
{