mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0031043: GCPnts_TangentialDeflection generates points which number is inconsistent with MinimumOfPoints Parameter
Updated crvtpoints command API to reproduce reported problem Generate number of points according to the specified minimum value
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user