Salome HOME
projects
/
modules
/
geom.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
29470 - Point cloud on a face
[modules/geom.git]
/
src
/
GEOMImpl
/
GEOMImpl_PolylineDriver.cxx
diff --git
a/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx
b/src/GEOMImpl/GEOMImpl_PolylineDriver.cxx
index 60a8aaa409e6ca6103d170e323bb27b9d56371ea..0a6d2420ca7ffc7b1d7042e034a7a9441fe2ff97 100644
(file)
--- a/
src/GEOMImpl/GEOMImpl_PolylineDriver.cxx
+++ b/
src/GEOMImpl/GEOMImpl_PolylineDriver.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
15
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
22
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
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-69,8
+69,7
@@
GEOMImpl_PolylineDriver::GEOMImpl_PolylineDriver()
//function : MakePolyline2D
//purpose :
//=======================================================================
//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;
{
if (Label().IsNull()) {
return 0;
@@
-105,7
+104,7
@@
Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D
return 0;
}
return 0;
}
- if (aNbSections != aCoords.size()) {
+ if (aNbSections !=
(int)
aCoords.size()) {
return 0;
}
return 0;
}
@@
-179,7
+178,7
@@
Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D
}
aFunction->SetValue(aShape);
}
aFunction->SetValue(aShape);
- log
.SetTouched(Label());
+ log
->SetTouched(Label());
return 1;
}
return 1;
}
@@
-188,7
+187,7
@@
Standard_Integer GEOMImpl_PolylineDriver::MakePolyline2D
//function : Execute
//purpose :
//=======================================================================
//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());
{
if (Label().IsNull()) return 0;
Handle(GEOM_Function) aFunction = GEOM_Function::GetFunction(Label());
@@
-273,7
+272,7
@@
Standard_Integer GEOMImpl_PolylineDriver::Execute(TFunction_Logbook& log) const
aFunction->SetValue(aShape);
aFunction->SetValue(aShape);
- log
.SetTouched(Label());
+ log
->SetTouched(Label());
return 1;
}
return 1;
}
@@
-319,10
+318,8
@@
GetCreationInformation(std::string& theOperationName,
Handle(TColStd_HArray1OfReal) coords = aCI.GetCoordinates();
if ( coords->Length() > 3 )
pntParam << ( coords->Length() ) / 3 << " points: ";
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
{
}
else
{
@@
-384,7
+381,7
@@
GetCreationInformation(std::string& theOperationName,
AddParam(theParams, "Number of curves", aNbCurves);
aP2d.GetCoords(aCoords);
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();
std::list <std::list <double> >::const_iterator
anIt = aCoords.begin();
@@
-438,5
+435,4
@@
GetCreationInformation(std::string& theOperationName,
return true;
}
return true;
}
-IMPLEMENT_STANDARD_HANDLE (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
-IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_PolylineDriver,GEOM_BaseDriver)