From: oan Date: Mon, 7 Oct 2019 16:00:21 +0000 (+0300) Subject: 0031043: GCPnts_TangentialDeflection generates points which number is inconsistent... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=d673530f769bd1368837278a79bbc9d795b8708a;p=occt-copy.git 0031043: GCPnts_TangentialDeflection generates points which number is inconsistent with MinimumOfPoints Parameter Updated crvtpoints command API to reproduce reported problem --- diff --git a/src/GeometryTest/GeometryTest_CurveCommands.cxx b/src/GeometryTest/GeometryTest_CurveCommands.cxx index 8feb96c538..3aa06fb96d 100644 --- a/src/GeometryTest/GeometryTest_CurveCommands.cxx +++ b/src/GeometryTest/GeometryTest_CurveCommands.cxx @@ -1007,7 +1007,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/, static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, const char** a) { - Standard_Integer i, nbp; + Standard_Integer i, nbp, aMinPntsNb = 2; Standard_Real defl, angle = Precision::Angular(); Handle(Adaptor3d_HCurve) aHCurve; @@ -1030,10 +1030,13 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co } defl = Draw::Atof(a[3]); - if(n > 3) + if(n > 4) angle = Draw::Atof(a[4]); - GCPnts_TangentialDeflection PntGen(aHCurve->Curve(), angle, defl, 2); + if(n > 5) + aMinPntsNb = Draw::Atoi (a[5]); + + GCPnts_TangentialDeflection PntGen(aHCurve->Curve(), angle, defl, aMinPntsNb); nbp = PntGen.NbPoints(); di << "Nb points : " << nbp << "\n";