1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027537: GCPnts_TangentialDeflection produces incorrect number of sample points for circular edge

* Round up number of sample points to satisfy deflection.
* Test case added
This commit is contained in:
azv
2016-05-24 14:01:10 +03:00
committed by bugmaster
parent c574faecb9
commit b819ae67ce
2 changed files with 57 additions and 1 deletions

View File

@@ -219,7 +219,8 @@ void GCPnts_TangentialDeflection::PerformCircular (const TheCurve& C)
dfR, curvatureDeflection, angularDeflection, myMinLen);
const Standard_Real aDiff = lastu - firstu;
Standard_Integer NbPoints = (Standard_Integer)(aDiff / Du);
// Round up number of points to satisfy curvatureDeflection more precisely
Standard_Integer NbPoints = (Standard_Integer)Ceiling(aDiff / Du);
NbPoints = Max(NbPoints, minNbPnts - 1);
Du = aDiff / NbPoints;