-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//function : MakePolyline2D
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D
- (TFunction_Logbook& log) const
+Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) {
return 0;
return 0;
}
- if (aNbSections != aCoords.size()) {
+ if (aNbSections != (int)aCoords.size()) {
return 0;
}
}
aFunction->SetValue(aShape);
- log.SetTouched(Label());
+ log->SetTouched(Label());
return 1;
}
//function : Execute
//purpose :
//=======================================================================
-Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
+Standard_Integer GEOMImpl_PolylineDriver::Execute(Handle(TFunction_Logbook)& log) const
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
aFunction->SetValue(aShape);
- log.SetTouched(Label());
+ log->SetTouched(Label());
return 1;
}
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
if ( coords->Length() > 3 )
pntParam << ( coords->Length() ) / 3 << " points: ";
- for ( int i = coords->Lower(), nb = coords->Upper(); i <= nb; )
- pntParam << "( " << coords->Value( i++ )
- << ", " << coords->Value( i++ )
- << ", " << coords->Value( i++ ) << " ) ";
+ for ( int i = coords->Lower(), nb = coords->Lower()+(coords->Length()/3)*3; i < nb; i+=3)
+ pntParam << "( " << coords->Value( i ) << ", " << coords->Value( i+1 ) << ", " << coords->Value( i+2 ) << " ) ";
}
else
{
AddParam(theParams, "Number of curves", aNbCurves);
aP2d.GetCoords(aCoords);
- Standard_Integer aNbCoords = aCoords.size();
+ //Standard_Integer aNbCoords = aCoords.size();
std::list <std::list <double> >::const_iterator
anIt = aCoords.begin();
return true;
}
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver)