mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0022898: IGES import fails in german environment
Added DRAW command dlocale to set and query current locale of the C subsystem Equivalents of C functions working with conversions of strings to/from reals added in Standard_CString, providing locale-independent behavior (using always "C" locale) In DRAW packages, calls to atof() and atoi() are replaced by direct calls to Draw::Atof() and Draw::Atoi(), respectively, instead of substituting by #define Use of atof(), strtod(), and *scanf() involving floating point conversions in OCCT code replaced by locale-independent Atof() and Strtod() Calls to sprintf() involving floating point in OCCT code are replaced by call to locale-independent Sprintf(), except a few places where converted strings are used immediately for display in the 3d viewer Changes of global locale are eliminated throughout OCCT code Proposed correction for GNU libC where v*printf_l functions are absent Added test case (bugs xde bug22898) for data exchange operations with non-standard locale Use xlocale on Mac OS X and within glibc Corrected strtod_l wrapper Generate error rather than warning Introduce Standard_CLocaleSentry replacement for removed OSD_Localizer Standard_CLocaleSentry - copy locale string Standard_CLocaleSentry - use _configthreadlocale on Windows Standard_CLocaleSentry::GetCLocale() - return locale_t rather than void* Corrected misprint in ~Standard_CLocaleSentry() Use French locale in bug22898 test case Mark test case as skipped if locale is unavailable on tested system. Use fr_FR locale for tests on Mac OS X
This commit is contained in:
@@ -55,7 +55,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
{
|
||||
if ( n < 4) return 1;
|
||||
|
||||
gp_Pnt2d P(atof(a[2]),atof(a[3]));
|
||||
gp_Pnt2d P(Draw::Atof(a[2]),Draw::Atof(a[3]));
|
||||
|
||||
char name[100];
|
||||
|
||||
@@ -72,7 +72,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
Handle(Geom2d_Line) L = new Geom2d_Line(P,gp_Vec2d(P,P1));
|
||||
Handle(Geom2d_TrimmedCurve) CT =
|
||||
new Geom2d_TrimmedCurve(L, 0., P.Distance(P1));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
@@ -108,14 +108,14 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
|
||||
if (n < 3) {
|
||||
if (n == 2)
|
||||
Tol2d = atof(a[1]);
|
||||
Tol2d = Draw::Atof(a[1]);
|
||||
|
||||
di << "Tolerance for 2d approx : "<< Tol2d << "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Standard_Integer i, Nb = atoi(a[2]);
|
||||
Standard_Integer i, Nb = Draw::Atoi(a[2]);
|
||||
|
||||
Standard_Boolean hasPoints = Standard_True;
|
||||
TColgp_Array1OfPnt2d Points(1, Nb);
|
||||
@@ -170,17 +170,17 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
// points
|
||||
nc = 3;
|
||||
for (i = 1; i <= Nb; i++) {
|
||||
Points(i).SetCoord(atof(a[nc]),atof(a[nc+1]));
|
||||
Points(i).SetCoord(Draw::Atof(a[nc]),Draw::Atof(a[nc+1]));
|
||||
nc += 2;
|
||||
}
|
||||
}
|
||||
else if (nc - 2 == Nb) {
|
||||
// YValues
|
||||
nc = 5;
|
||||
X0 = atof(a[3]);
|
||||
DX = atof(a[4]);
|
||||
X0 = Draw::Atof(a[3]);
|
||||
DX = Draw::Atof(a[4]);
|
||||
for (i = 1; i <= Nb; i++) {
|
||||
YValues(i) = atof(a[nc]);
|
||||
YValues(i) = Draw::Atof(a[nc]);
|
||||
Points(i).SetCoord(X0+(i-1)*DX,YValues(i));
|
||||
nc++;
|
||||
}
|
||||
@@ -245,7 +245,7 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Handle(Geom2d_Line) L = new Geom2d_Line(P1,gp_Vec2d(P1,P2));
|
||||
Handle(Geom2d_TrimmedCurve) CT =
|
||||
new Geom2d_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
|
@@ -62,7 +62,7 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
return 1;
|
||||
}
|
||||
|
||||
gp_Pnt P(atof(a[2]),atof(a[3]),atof(a[4]));
|
||||
gp_Pnt P(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4]));
|
||||
|
||||
char name[100];
|
||||
|
||||
@@ -87,13 +87,13 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
Handle(Geom_Line) L = new Geom_Line(P,gp_Vec(P,P1));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P.Distance(P1));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
}
|
||||
else {
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
di << name << " ";
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, P1);
|
||||
@@ -117,13 +117,13 @@ static Standard_Integer proj (Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
Handle(Geom_Line) L = new Geom_Line(P,gp_Vec(P,P1));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P.Distance(P1));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
}
|
||||
else {
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, P1);
|
||||
di << name << " ";
|
||||
@@ -146,7 +146,7 @@ static Standard_Integer appro(Draw_Interpretor& di, Standard_Integer n, const ch
|
||||
if ( n<3) return 1;
|
||||
|
||||
Handle(Geom_Curve) GC;
|
||||
Standard_Integer Nb = atoi(a[2]);
|
||||
Standard_Integer Nb = Draw::Atoi(a[2]);
|
||||
|
||||
TColgp_Array1OfPnt Points(1, Nb);
|
||||
|
||||
@@ -218,20 +218,20 @@ static Standard_Integer grilapp(Draw_Interpretor& di, Standard_Integer n, const
|
||||
if ( n < 12) return 1;
|
||||
|
||||
Standard_Integer i,j;
|
||||
Standard_Integer Nu = atoi(a[2]);
|
||||
Standard_Integer Nv = atoi(a[3]);
|
||||
Standard_Integer Nu = Draw::Atoi(a[2]);
|
||||
Standard_Integer Nv = Draw::Atoi(a[3]);
|
||||
TColStd_Array2OfReal ZPoints (1, Nu, 1, Nv);
|
||||
|
||||
Standard_Real X0 = atof(a[4]);
|
||||
Standard_Real dX = atof(a[5]);
|
||||
Standard_Real Y0 = atof(a[6]);
|
||||
Standard_Real dY = atof(a[7]);
|
||||
Standard_Real X0 = Draw::Atof(a[4]);
|
||||
Standard_Real dX = Draw::Atof(a[5]);
|
||||
Standard_Real Y0 = Draw::Atof(a[6]);
|
||||
Standard_Real dY = Draw::Atof(a[7]);
|
||||
|
||||
Standard_Integer Count = 8;
|
||||
for ( j = 1; j <= Nv; j++) {
|
||||
for ( i = 1; i <= Nu; i++) {
|
||||
if ( Count > n) return 1;
|
||||
ZPoints(i,j) = atof(a[Count]);
|
||||
ZPoints(i,j) = Draw::Atof(a[Count]);
|
||||
Count++;
|
||||
}
|
||||
}
|
||||
@@ -255,8 +255,8 @@ static Standard_Integer surfapp(Draw_Interpretor& di, Standard_Integer n, const
|
||||
if ( n < 5 ) return 1;
|
||||
|
||||
Standard_Integer i,j;
|
||||
Standard_Integer Nu = atoi(a[2]);
|
||||
Standard_Integer Nv = atoi(a[3]);
|
||||
Standard_Integer Nu = Draw::Atoi(a[2]);
|
||||
Standard_Integer Nv = Draw::Atoi(a[3]);
|
||||
TColgp_Array2OfPnt Points (1, Nu, 1, Nv);
|
||||
|
||||
if ( n == 5) {
|
||||
@@ -278,7 +278,7 @@ static Standard_Integer surfapp(Draw_Interpretor& di, Standard_Integer n, const
|
||||
for ( j = 1; j <= Nv; j++) {
|
||||
for ( i = 1; i <= Nu; i++) {
|
||||
if ( Count > n) return 1;
|
||||
Points(i,j) = gp_Pnt(atof(a[Count]),atof(a[Count+1]),atof(a[Count+2]));
|
||||
Points(i,j) = gp_Pnt(Draw::Atof(a[Count]),Draw::Atof(a[Count+1]),Draw::Atof(a[Count+2]));
|
||||
Count += 3;
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ static Standard_Integer surfapp(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Standard_Integer Count = 1;
|
||||
for ( j = 1; j <= Nv; j++) {
|
||||
for ( i = 1; i <= Nu; i++) {
|
||||
sprintf(name,"point_%d",Count++);
|
||||
Sprintf(name,"point_%d",Count++);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp,Points(i,j));
|
||||
}
|
||||
@@ -362,7 +362,7 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
@@ -381,7 +381,7 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
@@ -396,7 +396,7 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
@@ -411,7 +411,7 @@ static Standard_Integer extrema(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
sprintf(name,"%s%d","ext_",i);
|
||||
Sprintf(name,"%s%d","ext_",i);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
@@ -466,7 +466,7 @@ static Standard_Integer totalextcc(Draw_Interpretor& di, Standard_Integer n, con
|
||||
Handle(Geom_Line) L = new Geom_Line(P1,gp_Vec(P1,P2));
|
||||
Handle(Geom_TrimmedCurve) CT =
|
||||
new Geom_TrimmedCurve(L, 0., P1.Distance(P2));
|
||||
sprintf(name,"%s%d","ext_",1);
|
||||
Sprintf(name,"%s%d","ext_",1);
|
||||
char* temp = name; // portage WNT
|
||||
DrawTrSurf::Set(temp, CT);
|
||||
di << name << " ";
|
||||
|
@@ -89,7 +89,7 @@ static Standard_Integer solutions(Draw_Interpretor& di,
|
||||
if (ct3.IsDone()) {
|
||||
for (Standard_Integer i = 1 ; i <= ct3.NbSolutions() ; i++) {
|
||||
Handle(Geom2d_Circle) C = new Geom2d_Circle(ct3.ThisSolution(i));
|
||||
sprintf(solname,"%s_%d",name,i);
|
||||
Sprintf(solname,"%s_%d",name,i);
|
||||
char* temp = solname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,C);
|
||||
di << solname << " ";
|
||||
@@ -113,7 +113,7 @@ static Standard_Integer solutions(Draw_Interpretor& di,
|
||||
if (ct3.IsDone()) {
|
||||
for (Standard_Integer i = 1 ; i <= ct3.NbSolutions() ; i++) {
|
||||
Handle(Geom2d_Circle) C = new Geom2d_Circle(ct3.ThisSolution(i));
|
||||
sprintf(solname,"%s_%d",name,i);
|
||||
Sprintf(solname,"%s_%d",name,i);
|
||||
char* temp = solname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,C);
|
||||
di << solname << " ";
|
||||
@@ -144,7 +144,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
Standard_Boolean ip3 = DrawTrSurf::GetPoint2d(a[4],P3);
|
||||
|
||||
Standard_Real tol = Precision::Confusion();
|
||||
if (n > 5) tol = atof(a[5]);
|
||||
if (n > 5) tol = Draw::Atof(a[5]);
|
||||
|
||||
|
||||
if (!C1.IsNull()) {
|
||||
@@ -173,7 +173,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// C-C-R
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C1),
|
||||
Geom2dGcc::Unqualified(C2),
|
||||
atof(a[4]),tol);
|
||||
Draw::Atof(a[4]),tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
}
|
||||
@@ -201,7 +201,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// C-P-R
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C1),
|
||||
new Geom2d_CartesianPoint(P2),
|
||||
atof(a[4]),tol);
|
||||
Draw::Atof(a[4]),tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// C-R-C
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C1),
|
||||
Geom2dGcc::Unqualified(C3),
|
||||
atof(a[3]),
|
||||
Draw::Atof(a[3]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -221,7 +221,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// C-R-P
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C1),
|
||||
new Geom2d_CartesianPoint(P3),
|
||||
atof(a[3]),
|
||||
Draw::Atof(a[3]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -260,7 +260,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// P-C-R
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C2),
|
||||
new Geom2d_CartesianPoint(P1),
|
||||
atof(a[4]),tol);
|
||||
Draw::Atof(a[4]),tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
}
|
||||
@@ -288,7 +288,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// P-P-R
|
||||
Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P1),
|
||||
new Geom2d_CartesianPoint(P2),
|
||||
atof(a[4]),tol);
|
||||
Draw::Atof(a[4]),tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
}
|
||||
@@ -299,7 +299,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// P-R-C
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C3),
|
||||
new Geom2d_CartesianPoint(P1),
|
||||
atof(a[3]),
|
||||
Draw::Atof(a[3]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -308,7 +308,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// P-R-P
|
||||
Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P1),
|
||||
new Geom2d_CartesianPoint(P3),
|
||||
atof(a[3]),
|
||||
Draw::Atof(a[3]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -329,7 +329,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// R-C-C
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C2),
|
||||
Geom2dGcc::Unqualified(C3),
|
||||
atof(a[2]),
|
||||
Draw::Atof(a[2]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -338,7 +338,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// R-C-P
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C2),
|
||||
new Geom2d_CartesianPoint(P3),
|
||||
atof(a[2]),
|
||||
Draw::Atof(a[2]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -355,7 +355,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// R-P-C
|
||||
Geom2dGcc_Circ2d2TanRad ct3(Geom2dGcc::Unqualified(C3),
|
||||
new Geom2d_CartesianPoint(P2),
|
||||
atof(a[2]),
|
||||
Draw::Atof(a[2]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -364,7 +364,7 @@ static Standard_Integer cirtang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
// R-P-P
|
||||
Geom2dGcc_Circ2d2TanRad ct3(new Geom2d_CartesianPoint(P2),
|
||||
new Geom2d_CartesianPoint(P3),
|
||||
atof(a[2]),
|
||||
Draw::Atof(a[2]),
|
||||
tol);
|
||||
return solutions(di,ct3,a[1]);
|
||||
}
|
||||
@@ -411,7 +411,7 @@ static Standard_Integer lintang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
di << "Second argument must be a line";
|
||||
return 1;
|
||||
}
|
||||
Standard_Real ang = atof(a[4]) * (M_PI / 180.0);
|
||||
Standard_Real ang = Draw::Atof(a[4]) * (M_PI / 180.0);
|
||||
Geom2dGcc_Lin2dTanObl ct3(Geom2dGcc::Unqualified(C1),
|
||||
L->Lin2d(),
|
||||
Precision::Angular(),
|
||||
@@ -420,7 +420,7 @@ static Standard_Integer lintang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
if (ct3.IsDone()) {
|
||||
for (Standard_Integer i = 1 ; i <= ct3.NbSolutions() ; i++) {
|
||||
Handle(Geom2d_Line) LS = new Geom2d_Line(ct3.ThisSolution(i));
|
||||
sprintf(solname,"%s_%d",a[1],i);
|
||||
Sprintf(solname,"%s_%d",a[1],i);
|
||||
char* temp = solname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,LS);
|
||||
di << solname << " ";
|
||||
@@ -438,7 +438,7 @@ static Standard_Integer lintang (Draw_Interpretor& di,Standard_Integer n, const
|
||||
if (ct3.IsDone()) {
|
||||
for (Standard_Integer i = 1 ; i <= ct3.NbSolutions() ; i++) {
|
||||
Handle(Geom2d_Line) LS = new Geom2d_Line(ct3.ThisSolution(i));
|
||||
sprintf(solname,"%s_%d",a[1],i);
|
||||
Sprintf(solname,"%s_%d",a[1],i);
|
||||
char* temp = solname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,LS);
|
||||
di << solname << " ";
|
||||
@@ -684,7 +684,7 @@ static Standard_Integer tanginterpol (Draw_Interpretor& di,
|
||||
periodic_flag = Standard_True ;
|
||||
num_read += 1 ;
|
||||
}
|
||||
num_parameters = atoi(a[num_read]) ;
|
||||
num_parameters = Draw::Atoi(a[num_read]) ;
|
||||
|
||||
if (num_parameters < 2) {
|
||||
num_parameters = 2 ;
|
||||
@@ -703,7 +703,7 @@ static Standard_Integer tanginterpol (Draw_Interpretor& di,
|
||||
num_read += 1 ;
|
||||
while (num_read <= num_parameters * 3 + num_start ) {
|
||||
for (jj = 1 ; jj <= 3 ; jj++) {
|
||||
a_point.SetCoord(jj,atof(a[num_read])) ;
|
||||
a_point.SetCoord(jj,Draw::Atof(a[num_read])) ;
|
||||
num_read += 1 ;
|
||||
}
|
||||
PointsArrayPtr->SetValue(ii,a_point) ;
|
||||
@@ -728,7 +728,7 @@ static Standard_Integer tanginterpol (Draw_Interpretor& di,
|
||||
ii = 1 ;
|
||||
while (ii <= num_tangents) {
|
||||
for (jj = 1 ; jj <= 3 ; jj++) {
|
||||
a_vector.SetCoord(jj,atof(a[num_read])) ;
|
||||
a_vector.SetCoord(jj,Draw::Atof(a[num_read])) ;
|
||||
num_read += 1 ;
|
||||
}
|
||||
TangentsArray.SetValue(ii,a_vector) ;
|
||||
|
@@ -82,12 +82,12 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
Handle(Geom_Surface) surf2 = DrawTrSurf::GetSurface(a[5]);
|
||||
if (surf2.IsNull()) return 1;
|
||||
|
||||
U1 = atof(a[3]);
|
||||
U2 = atof(a[6]);
|
||||
V1 = atof(a[4]);
|
||||
V2 = atof(a[7]);
|
||||
U1 = Draw::Atof(a[3]);
|
||||
U2 = Draw::Atof(a[6]);
|
||||
V1 = Draw::Atof(a[4]);
|
||||
V2 = Draw::Atof(a[7]);
|
||||
|
||||
ord = atoi(a[1]);
|
||||
ord = Draw::Atoi(a[1]);
|
||||
|
||||
surf1->Bounds(u1, u2, v1, v2);
|
||||
b1 = ((((U1>=u1)&&(U1<=u2))||((U1<=u1)&&(U1>=u2))));
|
||||
@@ -103,8 +103,8 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
switch ( ord )
|
||||
{ case 0 : { TypeCont=GeomAbs_C0;
|
||||
switch(n)
|
||||
{ case 10 : epsC0= atof(a[9]);
|
||||
case 9 : epsnl = atof(a[8]);
|
||||
{ case 10 : epsC0= Draw::Atof(a[9]);
|
||||
case 9 : epsnl = Draw::Atof(a[8]);
|
||||
case 8 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -118,9 +118,9 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
break;
|
||||
case 1 : { TypeCont=GeomAbs_C1;
|
||||
switch(n)
|
||||
{ case 11 : epsC1=atof(a[10]);
|
||||
case 10 : epsC0= atof(a[9]);
|
||||
case 9 : epsnl = atof(a[8]);
|
||||
{ case 11 : epsC1=Draw::Atof(a[10]);
|
||||
case 10 : epsC0= Draw::Atof(a[9]);
|
||||
case 9 : epsnl = Draw::Atof(a[8]);
|
||||
case 8 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -136,10 +136,10 @@ static Standard_Integer surfaceCcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
case 2 : { TypeCont=GeomAbs_C2;
|
||||
switch(n)
|
||||
{
|
||||
case 12 : epsC2= atof(a[11]);
|
||||
case 11 : epsC1=atof(a[10]);
|
||||
case 10 : epsC0= atof(a[9]);
|
||||
case 9 : epsnl = atof(a[8]);
|
||||
case 12 : epsC2= Draw::Atof(a[11]);
|
||||
case 11 : epsC1=Draw::Atof(a[10]);
|
||||
case 10 : epsC0= Draw::Atof(a[9]);
|
||||
case 9 : epsnl = Draw::Atof(a[8]);
|
||||
case 8 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -176,12 +176,12 @@ static Standard_Integer surfaceGcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
Handle(Geom_Surface) surf2 = DrawTrSurf::GetSurface(a[5]);
|
||||
if (surf2.IsNull()) return 1;
|
||||
|
||||
U1 = atof(a[3]);
|
||||
U2 = atof(a[6]);
|
||||
V1 = atof(a[4]);
|
||||
V2 = atof(a[7]);
|
||||
U1 = Draw::Atof(a[3]);
|
||||
U2 = Draw::Atof(a[6]);
|
||||
V1 = Draw::Atof(a[4]);
|
||||
V2 = Draw::Atof(a[7]);
|
||||
|
||||
ord = atoi(a[1]);
|
||||
ord = Draw::Atoi(a[1]);
|
||||
|
||||
surf1->Bounds(u1, u2, v1, v2);
|
||||
b1 = ((((U1>=u1)&&(U1<=u2))||((U1<=u1)&&(U1>=u2))));
|
||||
@@ -198,9 +198,9 @@ static Standard_Integer surfaceGcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
{
|
||||
case 1 : { TypeCont=GeomAbs_G1;
|
||||
switch(n)
|
||||
{ case 11 : epsG1=atof(a[10]);
|
||||
case 10 : epsC0= atof(a[9]);
|
||||
case 9 : epsnl = atof(a[8]);
|
||||
{ case 11 : epsG1=Draw::Atof(a[10]);
|
||||
case 10 : epsC0= Draw::Atof(a[9]);
|
||||
case 9 : epsnl = Draw::Atof(a[8]);
|
||||
case 8 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -215,11 +215,11 @@ static Standard_Integer surfaceGcontinuity (Draw_Interpretor& di, Standard_Integ
|
||||
break;
|
||||
case 2 : { TypeCont=GeomAbs_G2;
|
||||
switch(n)
|
||||
{ case 13 : maxlen =atof (a[12]);
|
||||
case 12 : perce=atof(a[11]);
|
||||
case 11 : epsG1=atof(a[10]);
|
||||
case 10 : epsC0= atof(a[9]);
|
||||
case 9 : epsnl = atof(a[8]);
|
||||
{ case 13 : maxlen =Draw::Atof (a[12]);
|
||||
case 12 : perce=Draw::Atof(a[11]);
|
||||
case 11 : epsG1=Draw::Atof(a[10]);
|
||||
case 10 : epsC0= Draw::Atof(a[9]);
|
||||
case 9 : epsnl = Draw::Atof(a[8]);
|
||||
case 8 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -253,10 +253,10 @@ static Standard_Integer curveGcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
Handle(Geom_Curve) curv2 = DrawTrSurf::GetCurve(a[4]);
|
||||
if (curv2.IsNull()) return 1;
|
||||
|
||||
U1 = atof(a[3]);
|
||||
U2 = atof(a[5]);
|
||||
U1 = Draw::Atof(a[3]);
|
||||
U2 = Draw::Atof(a[5]);
|
||||
|
||||
ord = atoi(a[1]);
|
||||
ord = Draw::Atoi(a[1]);
|
||||
|
||||
u1=curv1->FirstParameter();
|
||||
u2=curv1->LastParameter();
|
||||
@@ -273,9 +273,9 @@ static Standard_Integer curveGcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
{
|
||||
case 1 : {
|
||||
switch(n)
|
||||
{ case 9 : epsG1=atof(a[8]);
|
||||
case 8 : epsC0= atof(a[7]);
|
||||
case 7 : epsnl = atof(a[6]);
|
||||
{ case 9 : epsG1=Draw::Atof(a[8]);
|
||||
case 8 : epsC0= Draw::Atof(a[7]);
|
||||
case 7 : epsnl = Draw::Atof(a[6]);
|
||||
case 6 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -291,12 +291,12 @@ static Standard_Integer curveGcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
case 2 : {
|
||||
TypeCont=GeomAbs_G2;
|
||||
switch(n)
|
||||
{case 12 :maxlen =atof(a[11]);
|
||||
case 11 :percent=atof(a[10]);
|
||||
case 10 : epsG2= atof(a[9]);
|
||||
case 9 : epsG1=atof(a[8]);
|
||||
case 8 : epsC0= atof(a[7]);
|
||||
case 7 : epsnl = atof(a[6]);
|
||||
{case 12 :maxlen =Draw::Atof(a[11]);
|
||||
case 11 :percent=Draw::Atof(a[10]);
|
||||
case 10 : epsG2= Draw::Atof(a[9]);
|
||||
case 9 : epsG1=Draw::Atof(a[8]);
|
||||
case 8 : epsC0= Draw::Atof(a[7]);
|
||||
case 7 : epsnl = Draw::Atof(a[6]);
|
||||
case 6 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -328,10 +328,10 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
Handle(Geom_Curve) curv2 = DrawTrSurf::GetCurve(a[4]);
|
||||
if (curv2.IsNull()) return 1;
|
||||
|
||||
U1 = atof(a[3]);
|
||||
U2 = atof(a[5]);
|
||||
U1 = Draw::Atof(a[3]);
|
||||
U2 = Draw::Atof(a[5]);
|
||||
|
||||
ord = atoi(a[1]);
|
||||
ord = Draw::Atoi(a[1]);
|
||||
|
||||
u1=curv1->FirstParameter();
|
||||
u2=curv1->LastParameter();
|
||||
@@ -347,8 +347,8 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
InitEpsCurv( epsnl,epsC0, epsC1, epsC2, epsG1, epsG2, percent,maxlen);
|
||||
switch ( ord )
|
||||
{ case 0 : { switch(n)
|
||||
{ case 8 : epsC0= atof(a[7]);
|
||||
case 7 : epsnl = atof(a[6]);
|
||||
{ case 8 : epsC0= Draw::Atof(a[7]);
|
||||
case 7 : epsnl = Draw::Atof(a[6]);
|
||||
case 6 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -362,9 +362,9 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
|
||||
} break;
|
||||
case 1 : { switch(n)
|
||||
{ case 9 : epsC1 =atof(a[8]);
|
||||
case 8 : epsC0= atof(a[7]);
|
||||
case 7 : epsnl = atof(a[6]);
|
||||
{ case 9 : epsC1 =Draw::Atof(a[8]);
|
||||
case 8 : epsC0= Draw::Atof(a[7]);
|
||||
case 7 : epsnl = Draw::Atof(a[6]);
|
||||
case 6 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
@@ -380,10 +380,10 @@ static Standard_Integer curveCcontinuity(Draw_Interpretor& di, Standard_Integer
|
||||
case 2 : { TypeCont=GeomAbs_C2;
|
||||
switch(n)
|
||||
{
|
||||
case 10 : epsC2= atof(a[9]);
|
||||
case 9 : epsC1=atof(a[8]);
|
||||
case 8 : epsC0= atof(a[7]);
|
||||
case 7 : epsnl = atof(a[6]);
|
||||
case 10 : epsC2= Draw::Atof(a[9]);
|
||||
case 9 : epsC1=Draw::Atof(a[8]);
|
||||
case 8 : epsC0= Draw::Atof(a[7]);
|
||||
case 7 : epsnl = Draw::Atof(a[6]);
|
||||
case 6 : {} break;
|
||||
default : return 1;
|
||||
}
|
||||
|
@@ -153,17 +153,17 @@ static Standard_Integer polelaw (Draw_Interpretor& , Standard_Integer n, const c
|
||||
|
||||
if (n < 3) return 1;
|
||||
Standard_Boolean periodic = Standard_False ;
|
||||
Standard_Integer deg = atoi(a[2]);
|
||||
Standard_Integer nbk = atoi(a[3]);
|
||||
Standard_Integer deg = Draw::Atoi(a[2]);
|
||||
Standard_Integer nbk = Draw::Atoi(a[3]);
|
||||
|
||||
TColStd_Array1OfReal knots(1, nbk);
|
||||
TColStd_Array1OfInteger mults(1, nbk);
|
||||
k = 4;
|
||||
Standard_Integer Sigma = 0;
|
||||
for (i = 1; i<=nbk; i++) {
|
||||
knots( i) = atof(a[k]);
|
||||
knots( i) = Draw::Atof(a[k]);
|
||||
k++;
|
||||
mults( i) = atoi(a[k]);
|
||||
mults( i) = Draw::Atoi(a[k]);
|
||||
Sigma += mults(i);
|
||||
k++;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ static Standard_Integer polelaw (Draw_Interpretor& , Standard_Integer n, const c
|
||||
flat_knots,
|
||||
schoenberg_points) ;
|
||||
for (i = 1; i <= np; i++) {
|
||||
poles(i).SetCoord(schoenberg_points(i),atof(a[k]));
|
||||
poles(i).SetCoord(schoenberg_points(i),Draw::Atof(a[k]));
|
||||
k++;
|
||||
}
|
||||
|
||||
@@ -270,9 +270,9 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Standard_Integer ONE = 1;
|
||||
|
||||
if (n == 3)
|
||||
sprintf(name,"p");
|
||||
Sprintf(name,"p");
|
||||
else if (n == 4) {
|
||||
sprintf(name,"%s",a[1]);
|
||||
Sprintf(name,"%s",a[1]);
|
||||
ONE = 2;
|
||||
}
|
||||
else {
|
||||
@@ -306,8 +306,8 @@ static Standard_Integer gproject(Draw_Interpretor& di, Standard_Integer n, const
|
||||
Handle(Geom2d_Curve) PCur2d; // Only for isoparametric projection
|
||||
|
||||
for(k = 1; k <= Projector.NbCurves(); k++){
|
||||
sprintf(newname,"%s_%d",name,k);
|
||||
sprintf(newname1,"%s2d_%d",name,k);
|
||||
Sprintf(newname,"%s_%d",name,k);
|
||||
Sprintf(newname1,"%s2d_%d",name,k);
|
||||
if(Projector.IsSinglePnt(k, P2d)){
|
||||
// cout<<"Part "<<k<<" of the projection is punctual"<<endl;
|
||||
Projector.GetSurface()->D0(P2d.X(), P2d.Y(), P);
|
||||
@@ -430,7 +430,7 @@ static Standard_Integer project (Draw_Interpretor& di,
|
||||
if ( a[index][0] != '-') return 1;
|
||||
|
||||
if ( a[index][1] == 'e') {
|
||||
Standard_Real p = atof(a[index+1]);
|
||||
Standard_Real p = Draw::Atof(a[index+1]);
|
||||
Standard_Real dU = p * (U2 - U1) / 100.;
|
||||
Standard_Real dV = p * (V2 - V1) / 100.;
|
||||
U1 -= dU; U2 += dU; V1 -= dV; V2 += dV;
|
||||
@@ -438,10 +438,10 @@ static Standard_Integer project (Draw_Interpretor& di,
|
||||
}
|
||||
else if ( a[index][1] == 'v') {
|
||||
Verif = Standard_True;
|
||||
NbPoints = atoi(a[index+1]);
|
||||
NbPoints = Draw::Atoi(a[index+1]);
|
||||
}
|
||||
else if ( a[index][1] == 't') {
|
||||
tolerance = atof(a[index+1]);
|
||||
tolerance = Draw::Atof(a[index+1]);
|
||||
}
|
||||
index += 2;
|
||||
}
|
||||
@@ -507,13 +507,13 @@ Standard_Integer projonplane(Draw_Interpretor& di,
|
||||
if ( C.IsNull()) return 1;
|
||||
|
||||
Standard_Boolean Param = Standard_True;
|
||||
if ((n == 5 && atoi(a[4]) == 0) ||
|
||||
(n == 8 && atoi(a[7]) == 0)) Param = Standard_False;
|
||||
if ((n == 5 && Draw::Atoi(a[4]) == 0) ||
|
||||
(n == 8 && Draw::Atoi(a[7]) == 0)) Param = Standard_False;
|
||||
|
||||
gp_Dir D;
|
||||
|
||||
if ( n == 8) {
|
||||
D = gp_Dir(atof(a[4]),atof(a[5]),atof(a[6]));
|
||||
D = gp_Dir(Draw::Atof(a[4]),Draw::Atof(a[5]),Draw::Atof(a[6]));
|
||||
}
|
||||
else {
|
||||
D = Pl->Pln().Position().Direction();
|
||||
@@ -539,9 +539,9 @@ static void solution(const Handle(GccInt_Bisec)& Bis,
|
||||
{
|
||||
char solname[200];
|
||||
if ( i == 0)
|
||||
sprintf(solname,"%s",name);
|
||||
Sprintf(solname,"%s",name);
|
||||
else
|
||||
sprintf(solname,"%s_%d",name,i);
|
||||
Sprintf(solname,"%s_%d",name,i);
|
||||
const char* temp = solname; // pour portage WNT
|
||||
|
||||
switch ( Bis->ArcType()) {
|
||||
@@ -591,7 +591,7 @@ static Standard_Integer bisec (Draw_Interpretor& di,
|
||||
char solname[200];
|
||||
NbSol = Bis.NbSolutions();
|
||||
for ( i = 1; i <= NbSol; i++) {
|
||||
sprintf(solname,"%s_%d",a[1],i);
|
||||
Sprintf(solname,"%s_%d",a[1],i);
|
||||
const char* temp = solname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,new Geom2d_Line(Bis.ThisSolution(i)));
|
||||
}
|
||||
@@ -775,8 +775,8 @@ static Standard_Integer movelaw (Draw_Interpretor& di, Standard_Integer n, const
|
||||
tolerance,
|
||||
tx ;
|
||||
|
||||
u = atof(a[2]);
|
||||
x = atof(a[3]);
|
||||
u = Draw::Atof(a[2]);
|
||||
x = Draw::Atof(a[3]);
|
||||
tolerance = 1.0e-5 ;
|
||||
dimension = 2 ;
|
||||
if (n < 5) {
|
||||
@@ -784,9 +784,9 @@ static Standard_Integer movelaw (Draw_Interpretor& di, Standard_Integer n, const
|
||||
}
|
||||
Handle(Geom2d_BSplineCurve) G2 = DrawTrSurf::GetBSplineCurve2d(a[1]);
|
||||
if (!G2.IsNull()) {
|
||||
tx = atof(a[4]) ;
|
||||
tx = Draw::Atof(a[4]) ;
|
||||
if (n == 6) {
|
||||
condition = Max(atoi(a[5]), -1) ;
|
||||
condition = Max(Draw::Atoi(a[5]), -1) ;
|
||||
condition = Min(condition, G2->Degree()-1) ;
|
||||
}
|
||||
TColgp_Array1OfPnt2d curve_poles(1,G2->NbPoles()) ;
|
||||
@@ -891,7 +891,7 @@ static Standard_Integer crvpoints (Draw_Interpretor& di, Standard_Integer /*n*/,
|
||||
Standard_Real defl;
|
||||
|
||||
Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]);
|
||||
defl = atof(a[3]);
|
||||
defl = Draw::Atof(a[3]);
|
||||
|
||||
GeomAdaptor_Curve GAC(C);
|
||||
GCPnts_QuasiUniformDeflection PntGen(GAC, defl);
|
||||
@@ -948,10 +948,10 @@ static Standard_Integer crvtpoints (Draw_Interpretor& di, Standard_Integer n, co
|
||||
Standard_Real defl, angle = Precision::Angular();
|
||||
|
||||
Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]);
|
||||
defl = atof(a[3]);
|
||||
defl = Draw::Atof(a[3]);
|
||||
|
||||
if(n > 3)
|
||||
angle = atof(a[4]);
|
||||
angle = Draw::Atof(a[4]);
|
||||
|
||||
GeomAdaptor_Curve GAC(C);
|
||||
GCPnts_TangentialDeflection PntGen(GAC, angle, defl, 2);
|
||||
@@ -1017,7 +1017,7 @@ static Standard_Integer uniformAbscissa (Draw_Interpretor& di, Standard_Integer
|
||||
}
|
||||
|
||||
Standard_Integer nocp;
|
||||
nocp = atoi(a[2]);
|
||||
nocp = Draw::Atoi(a[2]);
|
||||
if(nocp < 2)
|
||||
return 1;
|
||||
|
||||
@@ -1065,12 +1065,12 @@ static Standard_Integer EllipsUniformAbscissa (Draw_Interpretor& di, Standard_In
|
||||
return 1;
|
||||
|
||||
Standard_Real R1;
|
||||
R1 = atof(a[1]);
|
||||
R1 = Draw::Atof(a[1]);
|
||||
Standard_Real R2;
|
||||
R2 = atof(a[2]);
|
||||
R2 = Draw::Atof(a[2]);
|
||||
|
||||
Standard_Integer nocp;
|
||||
nocp = atoi(a[3]);
|
||||
nocp = Draw::Atoi(a[3]);
|
||||
if(nocp < 2)
|
||||
return 1;
|
||||
|
||||
@@ -1143,7 +1143,7 @@ static Standard_Integer mypoints (Draw_Interpretor& di, Standard_Integer /*n*/,
|
||||
Standard_Real defl;
|
||||
|
||||
Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[2]);
|
||||
defl = atof(a[3]);
|
||||
defl = Draw::Atof(a[3]);
|
||||
const Handle(Geom_BSplineCurve)& aBS = Handle(Geom_BSplineCurve)::DownCast(C);
|
||||
|
||||
if(aBS.IsNull()) return 1;
|
||||
@@ -1271,7 +1271,7 @@ static Standard_Integer surfpoints (Draw_Interpretor& /*di*/, Standard_Integer /
|
||||
Standard_Real defl;
|
||||
|
||||
Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[2]);
|
||||
defl = atof(a[3]);
|
||||
defl = Draw::Atof(a[3]);
|
||||
|
||||
Handle(GeomAdaptor_HSurface) AS = new GeomAdaptor_HSurface(S);
|
||||
|
||||
@@ -1348,7 +1348,7 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n,
|
||||
}
|
||||
//
|
||||
Standard_Real tol = Precision::Confusion();
|
||||
if (n == 5 || n == 9 || n == 13 || n == 17) tol = atof(a[n-1]);
|
||||
if (n == 5 || n == 9 || n == 13 || n == 17) tol = Draw::Atof(a[n-1]);
|
||||
//
|
||||
Handle(Geom_Curve) Result;
|
||||
gp_Pnt Point;
|
||||
@@ -1381,11 +1381,11 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n,
|
||||
}
|
||||
if (useStart)
|
||||
for (Standard_Integer i=ista1; i <= ista2; i++)
|
||||
UVsta[i-ista1] = atof(a[i]);
|
||||
UVsta[i-ista1] = Draw::Atof(a[i]);
|
||||
if (useBnd) {
|
||||
Standard_Real UVbnd[8];
|
||||
for (Standard_Integer i=ibnd1; i <= ibnd2; i++)
|
||||
UVbnd[i-ibnd1] = atof(a[i]);
|
||||
UVbnd[i-ibnd1] = Draw::Atof(a[i]);
|
||||
AS1 = new GeomAdaptor_HSurface(GS1,UVbnd[0],UVbnd[1],UVbnd[2],UVbnd[3]);
|
||||
AS2 = new GeomAdaptor_HSurface(GS2,UVbnd[4],UVbnd[5],UVbnd[6],UVbnd[7]);
|
||||
}
|
||||
@@ -1415,7 +1415,7 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n,
|
||||
aNbLines = Inters.NbLines();
|
||||
if (aNbLines >= 2) {
|
||||
for (i=1; i<=aNbLines; ++i) {
|
||||
sprintf(buf, "%s_%d",a[1],i);
|
||||
Sprintf(buf, "%s_%d",a[1],i);
|
||||
Result = Inters.Line(i);
|
||||
const char* temp = buf;
|
||||
DrawTrSurf::Set(temp,Result);
|
||||
@@ -1429,7 +1429,7 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n,
|
||||
aNbPoints=Inters.NbPoints();
|
||||
for (i=1; i<=aNbPoints; ++i) {
|
||||
Point=Inters.Point(i);
|
||||
sprintf(buf,"%s_p_%d",a[1],i);
|
||||
Sprintf(buf,"%s_p_%d",a[1],i);
|
||||
const char* temp =buf;
|
||||
DrawTrSurf::Set(temp, Point);
|
||||
}
|
||||
@@ -1448,13 +1448,13 @@ static Standard_Integer intersection (Draw_Interpretor& di, Standard_Integer n,
|
||||
Standard_Integer i;
|
||||
Standard_Integer Compt = 1;
|
||||
for (i = 1; i <= nblines; i++, Compt++) {
|
||||
sprintf(newname,"%s_%d",a[1],Compt);
|
||||
Sprintf(newname,"%s_%d",a[1],Compt);
|
||||
Result = Inters.Segment(i);
|
||||
const char* temp = newname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,Result);
|
||||
}
|
||||
for (i = 1; i <= nbpoints; i++, Compt++) {
|
||||
sprintf(newname,"%s_%d",a[1],i);
|
||||
Sprintf(newname,"%s_%d",a[1],i);
|
||||
Point = Inters.Point(i);
|
||||
const char* temp = newname; // pour portage WNT
|
||||
DrawTrSurf::Set(temp,Point);
|
||||
|
@@ -64,9 +64,9 @@ BattenCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
|
||||
Standard_Boolean Ok;
|
||||
FairCurve_AnalysisCode Iana;
|
||||
Standard_Real a1 = atof(cangle1),
|
||||
a2 = atof(cangle2),
|
||||
h = atof(cheigth);
|
||||
Standard_Real a1 = Draw::Atof(cangle1),
|
||||
a2 = Draw::Atof(cangle2),
|
||||
h = Draw::Atof(cheigth);
|
||||
gp_Pnt2d P1, P2;
|
||||
|
||||
|
||||
@@ -108,9 +108,9 @@ MVCurve(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
|
||||
Standard_Boolean Ok;
|
||||
FairCurve_AnalysisCode Iana;
|
||||
Standard_Real a1 = atof(cangle1),
|
||||
a2 = atof(cangle2),
|
||||
h = atof(cheigth);
|
||||
Standard_Real a1 = Draw::Atof(cangle1),
|
||||
a2 = Draw::Atof(cangle2),
|
||||
h = Draw::Atof(cheigth);
|
||||
gp_Pnt2d P1, P2;
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ SetPoint(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *PointName = argv[2];
|
||||
const char *BattenName = argv[3];
|
||||
|
||||
Standard_Integer cote = atoi(side);
|
||||
Standard_Integer cote = Draw::Atoi(side);
|
||||
|
||||
Handle(DrawTrSurf_Point)
|
||||
Pnt = Handle(DrawTrSurf_Point)::DownCast(Draw::Get(PointName));
|
||||
@@ -173,8 +173,8 @@ SetAngle(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *val = argv[2];
|
||||
const char *BattenName = argv[3];
|
||||
|
||||
Standard_Real angle = atof(val);
|
||||
Standard_Integer cote = atoi(side);
|
||||
Standard_Real angle = Draw::Atof(val);
|
||||
Standard_Integer cote = Draw::Atoi(side);
|
||||
|
||||
Handle(DrawFairCurve_Batten)
|
||||
Bat = Handle(DrawFairCurve_Batten)::DownCast(Draw::Get(BattenName));
|
||||
@@ -197,8 +197,8 @@ SetCurvature(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *val = argv[2];
|
||||
const char *MVCName = argv[3];
|
||||
|
||||
Standard_Real rho = atof(val);
|
||||
Standard_Integer cote = atoi(side);
|
||||
Standard_Real rho = Draw::Atof(val);
|
||||
Standard_Integer cote = Draw::Atoi(side);
|
||||
|
||||
Handle(DrawFairCurve_MinimalVariation)
|
||||
MVC = Handle(DrawFairCurve_MinimalVariation)::DownCast(Draw::Get(MVCName));
|
||||
@@ -221,7 +221,7 @@ SetSlide(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *val = argv[1];
|
||||
const char *BattenName = argv[2];
|
||||
|
||||
Standard_Real slide = atof(val);
|
||||
Standard_Real slide = Draw::Atof(val);
|
||||
|
||||
Handle(DrawFairCurve_Batten)
|
||||
Bat = Handle(DrawFairCurve_Batten)::DownCast(Draw::Get(BattenName));
|
||||
@@ -243,7 +243,7 @@ FreeAngle(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *side = argv[1];
|
||||
const char *BattenName = argv[2];
|
||||
|
||||
Standard_Integer cote = atoi(side);
|
||||
Standard_Integer cote = Draw::Atoi(side);
|
||||
|
||||
Handle(DrawFairCurve_Batten)
|
||||
Bat = Handle(DrawFairCurve_Batten)::DownCast(Draw::Get(BattenName));
|
||||
@@ -264,7 +264,7 @@ FreeCurvature(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *side = argv[1];
|
||||
const char *MVCName = argv[2];
|
||||
|
||||
Standard_Integer cote = atoi(side);
|
||||
Standard_Integer cote = Draw::Atoi(side);
|
||||
|
||||
Handle(DrawFairCurve_MinimalVariation)
|
||||
MVC = Handle(DrawFairCurve_MinimalVariation)::DownCast(Draw::Get(MVCName));
|
||||
@@ -303,7 +303,7 @@ SetHeight(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *val = argv[1];
|
||||
const char *BattenName = argv[2];
|
||||
|
||||
Standard_Real Height = atof(val);
|
||||
Standard_Real Height = Draw::Atof(val);
|
||||
|
||||
Handle(DrawFairCurve_Batten)
|
||||
Bat = Handle(DrawFairCurve_Batten)::DownCast(Draw::Get(BattenName));
|
||||
@@ -324,7 +324,7 @@ SetSlope(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *val = argv[1];
|
||||
const char *BattenName = argv[2];
|
||||
|
||||
Standard_Real Slope = atof(val);
|
||||
Standard_Real Slope = Draw::Atof(val);
|
||||
|
||||
Handle(DrawFairCurve_Batten)
|
||||
Bat = Handle(DrawFairCurve_Batten)::DownCast(Draw::Get(BattenName));
|
||||
@@ -344,7 +344,7 @@ SetPhysicalRatio(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
const char *val = argv[1];
|
||||
const char *MVCName = argv[2];
|
||||
|
||||
Standard_Real ratio = atof(val);
|
||||
Standard_Real ratio = Draw::Atof(val);
|
||||
|
||||
Handle(DrawFairCurve_MinimalVariation)
|
||||
MVC = Handle(DrawFairCurve_MinimalVariation)::DownCast(Draw::Get(MVCName));
|
||||
|
@@ -48,8 +48,8 @@ static Standard_Integer polytr(Draw_Interpretor& di, Standard_Integer n, const c
|
||||
if (n < 4)
|
||||
return 1;
|
||||
|
||||
Standard_Integer nbNodes = atoi(a[2]);
|
||||
Standard_Integer nbTri = atoi(a[3]);
|
||||
Standard_Integer nbNodes = Draw::Atoi(a[2]);
|
||||
Standard_Integer nbTri = Draw::Atoi(a[3]);
|
||||
|
||||
// read the nodes
|
||||
Standard_Integer i, j = 4;
|
||||
@@ -60,7 +60,7 @@ static Standard_Integer polytr(Draw_Interpretor& di, Standard_Integer n, const c
|
||||
di << "Not enough nodes";
|
||||
return 1;
|
||||
}
|
||||
Nodes(i).SetCoord(atof(a[j]),atof(a[j+1]),atof(a[j+2]));
|
||||
Nodes(i).SetCoord(Draw::Atof(a[j]),Draw::Atof(a[j+1]),Draw::Atof(a[j+2]));
|
||||
j += 3;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ static Standard_Integer polytr(Draw_Interpretor& di, Standard_Integer n, const c
|
||||
di << "Not enough triangles";
|
||||
return 1;
|
||||
}
|
||||
Triangles(i).Set(atoi(a[j]),atoi(a[j+1]),atoi(a[j+2]));
|
||||
Triangles(i).Set(Draw::Atoi(a[j]),Draw::Atoi(a[j+1]),Draw::Atoi(a[j+2]));
|
||||
j += 3;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ static Standard_Integer polygon3d(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
if (n < 4)
|
||||
return 1;
|
||||
|
||||
Standard_Integer nbNodes = atoi(a[2]);
|
||||
Standard_Integer nbNodes = Draw::Atoi(a[2]);
|
||||
|
||||
// read the nodes
|
||||
Standard_Integer i, j = 3;
|
||||
@@ -105,7 +105,7 @@ static Standard_Integer polygon3d(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
di << "Not enough nodes";
|
||||
return 1;
|
||||
}
|
||||
Nodes(i).SetCoord(atof(a[j]),atof(a[j+1]),atof(a[j+2]));
|
||||
Nodes(i).SetCoord(Draw::Atof(a[j]),Draw::Atof(a[j+1]),Draw::Atof(a[j+2]));
|
||||
j += 3;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ static Standard_Integer polygon2d(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
if (n < 4)
|
||||
return 1;
|
||||
|
||||
Standard_Integer nbNodes = atoi(a[2]);
|
||||
Standard_Integer nbNodes = Draw::Atoi(a[2]);
|
||||
|
||||
// read the nodes
|
||||
Standard_Integer i, j = 3;
|
||||
@@ -137,7 +137,7 @@ static Standard_Integer polygon2d(Draw_Interpretor& di, Standard_Integer n, cons
|
||||
di << "Not enough nodes";
|
||||
return 1;
|
||||
}
|
||||
Nodes(i).SetCoord(atof(a[j]),atof(a[j+1]));
|
||||
Nodes(i).SetCoord(Draw::Atof(a[j]),Draw::Atof(a[j+1]));
|
||||
j += 2;
|
||||
}
|
||||
|
||||
|
@@ -130,7 +130,7 @@ static Standard_Integer sweep (Draw_Interpretor&,
|
||||
Pipe.Init(path, Support, firstS);
|
||||
}
|
||||
else if (Option == GeomFill_IsConstantNormal) {
|
||||
gp_Dir D ( atof(a[3]), atof(a[4]), atof(a[5]) );
|
||||
gp_Dir D ( Draw::Atof(a[3]), Draw::Atof(a[4]), Draw::Atof(a[5]) );
|
||||
Handle(Geom_Curve) path = DrawTrSurf::GetCurve(a[6]);
|
||||
Handle(Geom_Curve) firstS = DrawTrSurf::GetCurve(a[7]);
|
||||
Pipe.Init(path, firstS, D);
|
||||
@@ -146,8 +146,8 @@ static Standard_Integer sweep (Draw_Interpretor&,
|
||||
}
|
||||
|
||||
if (n >=isection+2) {
|
||||
MaxDegree = atoi(a[isection+1]);
|
||||
if (n >isection+2) NbSeg = atoi(a[isection+2]);
|
||||
MaxDegree = Draw::Atoi(a[isection+1]);
|
||||
if (n >isection+2) NbSeg = Draw::Atoi(a[isection+2]);
|
||||
}
|
||||
|
||||
Pipe.Perform(Tol, Standard_False, GeomAbs_C2, MaxDegree, NbSeg);
|
||||
@@ -188,7 +188,7 @@ static Standard_Integer tuyau (Draw_Interpretor&,
|
||||
if ( firstS.IsNull()) {
|
||||
if ( narg == 4) {
|
||||
// tuyau a rayon constant.
|
||||
Pipe.Init(path, atof(a[isect]));
|
||||
Pipe.Init(path, Draw::Atof(a[isect]));
|
||||
}
|
||||
else
|
||||
return 1;
|
||||
@@ -321,7 +321,7 @@ static Standard_Integer fillcurves(Draw_Interpretor& di,
|
||||
|
||||
Standard_Integer ist = 2;
|
||||
GeomFill_FillingStyle Style = GeomFill_CoonsStyle;
|
||||
if(n > 6) ist = atoi(a[6]);
|
||||
if(n > 6) ist = Draw::Atoi(a[6]);
|
||||
|
||||
if(ist == 1) Style = GeomFill_StretchStyle;
|
||||
if(ist == 2) Style = GeomFill_CoonsStyle;
|
||||
|
@@ -70,12 +70,12 @@ static Standard_Integer xdistcs(Draw_Interpretor& , Standard_Integer n, const ch
|
||||
return 0;
|
||||
}
|
||||
//
|
||||
aT1=atof(a[3]);
|
||||
aT2=atof(a[4]);
|
||||
aT1=Draw::Atof(a[3]);
|
||||
aT2=Draw::Atof(a[4]);
|
||||
//
|
||||
aNbP=10;
|
||||
if (n>5) {
|
||||
aNbP=atoi(a[5]);
|
||||
aNbP=Draw::Atoi(a[5]);
|
||||
}
|
||||
//
|
||||
iSize=3;
|
||||
|
Reference in New Issue
Block a user