]> OCCT Git - occt-copy.git/commitdiff
0031043: GCPnts_TangentialDeflection generates points which number is inconsistent...
authoroan <oan@opencascade.com>
Mon, 7 Oct 2019 16:00:21 +0000 (19:00 +0300)
committeroan <oan@opencascade.com>
Mon, 28 Oct 2019 10:47:15 +0000 (13:47 +0300)
Updated crvtpoints command API to reproduce reported problem

src/GeometryTest/GeometryTest_CurveCommands.cxx

index 8feb96c538b0a359e53c6d3e0e917633f11bc40f..3aa06fb96d35061f2ffcc0c9d225864f14114a83 100644 (file)
@@ -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";