// Created on: 1993-08-12
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
//
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
//
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
#include <GeomliteTest.hxx>
#include <DrawTrSurf.hxx>
#include <Draw.hxx>
//#ifdef WNT
#include <stdio.h>
-#ifdef WNT
+#ifdef _WIN32
//#define strcasecmp strcmp Already defined
Standard_IMPORT Draw_Viewer dout;
#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
if (n < 4) return 1;
if (n >= 6) report_curvature = 1 ;
- UParameter = atof(a[2]);
- VParameter = atof(a[3]);
+ UParameter = Draw::Atof(a[2]);
+ VParameter = Draw::Atof(a[3]);
Handle(Geom_Surface) SurfacePtr = DrawTrSurf::GetSurface(a[1]);
if (!SurfacePtr.IsNull()) {
GeomLProp_SLProps myProperties(SurfacePtr,
i = 2;
}
else if (n < 8) {
- loc = gp_Ax3(gp_Pnt(atof(a[2]),atof(a[3]),atof(a[4])),
+ loc = gp_Ax3(gp_Pnt(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4])),
gp_Dir(0,0,1),gp_Dir(1,0,0));
i = 5;
}
else if (n < 11) {
- loc = gp_Ax3(gp_Pnt(atof(a[2]),atof(a[3]),atof(a[4])),
- gp_Dir(atof(a[5]),atof(a[6]),atof(a[7])));
+ loc = gp_Ax3(gp_Pnt(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4])),
+ gp_Dir(Draw::Atof(a[5]),Draw::Atof(a[6]),Draw::Atof(a[7])));
i = 8;
}
else if (n < 14) {
- loc = gp_Ax3(gp_Pnt(atof(a[2]),atof(a[3]),atof(a[4])),
- gp_Dir(atof(a[5]),atof(a[6]),atof(a[7])),
- gp_Dir(atof(a[8]),atof(a[9]),atof(a[10])));
+ loc = gp_Ax3(gp_Pnt(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4])),
+ gp_Dir(Draw::Atof(a[5]),Draw::Atof(a[6]),Draw::Atof(a[7])),
+ gp_Dir(Draw::Atof(a[8]),Draw::Atof(a[9]),Draw::Atof(a[10])));
i = 11;
}
else
}
else {
if (i >= n) return 1;
- Standard_Real par1 = atof(a[i]);
+ Standard_Real par1 = Draw::Atof(a[i]);
if (!strcasecmp(a[0],"cylinder")) {
Handle(Geom_CylindricalSurface) C =
else {
if (i+1 >= n) return 1;
- Standard_Real par2 = atof(a[i+1]);
+ Standard_Real par2 = Draw::Atof(a[i+1]);
if (!strcasecmp(a[0],"cone")) {
par1 *= (M_PI / 180.0);
if (!strcasecmp(a[0],"beziersurf")) {
- Standard_Integer nup = atoi(a[2]);
- Standard_Integer nvp = atoi(a[3]);
+ Standard_Integer nup = Draw::Atoi(a[2]);
+ Standard_Integer nvp = Draw::Atoi(a[3]);
if (nup * nvp == 0) return 1;
i = (n - 4) / (nup * nvp);
k = 4;
for (j = 1; j <= nvp; j++) {
for (i = 1; i <= nup; i++) {
- poles(i, j).SetCoord(atof(a[k]),atof(a[k+1]),atof(a[k+2]));
+ poles(i, j).SetCoord(Draw::Atof(a[k]),Draw::Atof(a[k+1]),Draw::Atof(a[k+2]));
k += 3;
if (hasw) {
- weights(i, j) = atof(a[k]);
+ weights(i, j) = Draw::Atof(a[k]);
k++;
}
}
}
else {
- Standard_Integer udeg = atoi(a[2]);
- Standard_Integer nbuk = atoi(a[3]);
+ Standard_Integer udeg = Draw::Atoi(a[2]);
+ Standard_Integer nbuk = Draw::Atoi(a[3]);
Standard_Boolean uper = (*a[0] == 'u') || (*(a[0]+1) == 'u');
Standard_Boolean vper = (*a[0] == 'v') || (*(a[0]+1) == 'v');
k = 4;
Standard_Integer SigmaU = 0;
for (i = 1; i<=nbuk; i++) {
- uk( i) = atof(a[k]);
+ uk( i) = Draw::Atof(a[k]);
k++;
- umult( i) = atoi(a[k]);
+ umult( i) = Draw::Atoi(a[k]);
SigmaU += umult(i);
k++;
}
- Standard_Integer vdeg = atoi(a[k]);
+ Standard_Integer vdeg = Draw::Atoi(a[k]);
k++;
- Standard_Integer nbvk = atoi(a[k]);
+ Standard_Integer nbvk = Draw::Atoi(a[k]);
k++;
TColStd_Array1OfReal vk (1, nbvk);
TColStd_Array1OfInteger vmult(1, nbvk);
Standard_Integer SigmaV = 0;
for (i = 1; i<=nbvk; i++) {
- vk( i) = atof(a[k]);
+ vk( i) = Draw::Atof(a[k]);
k++;
- vmult( i) = atoi(a[k]);
+ vmult( i) = Draw::Atoi(a[k]);
SigmaV += vmult(i);
k++;
}
for (j = 1; j <= nvp; j++) {
for (i = 1; i <= nup; i++) {
- poles(i, j).SetCoord(atof(a[k]),atof(a[k+1]),atof(a[k+2]));
+ poles(i, j).SetCoord(Draw::Atof(a[k]),Draw::Atof(a[k+1]),Draw::Atof(a[k+2]));
k += 3;
- weights(i, j) = atof(a[k]);
+ weights(i, j) = Draw::Atof(a[k]);
k++;
}
}
gp_Pnt P;
if (!strcasecmp(a[0],"extsurf")) {
- D.SetCoord(atof(a[3]),atof(a[4]),atof(a[5]));
+ D.SetCoord(Draw::Atof(a[3]),Draw::Atof(a[4]),Draw::Atof(a[5]));
Handle(Geom_SurfaceOfLinearExtrusion) result =
new Geom_SurfaceOfLinearExtrusion(GC,D);
}
else if (!strcasecmp(a[0],"revsurf")) {
if (n<8) return 1;
- P.SetCoord(atof(a[3]),atof(a[4]),atof(a[5]));
- D.SetCoord(atof(a[6]),atof(a[7]),atof(a[8]));
+ P.SetCoord(Draw::Atof(a[3]),Draw::Atof(a[4]),Draw::Atof(a[5]));
+ D.SetCoord(Draw::Atof(a[6]),Draw::Atof(a[7]),Draw::Atof(a[8]));
Handle(Geom_SurfaceOfRevolution) result =
new Geom_SurfaceOfRevolution(GC,gp_Ax1(P,D));
if (n < 5) return 1;
- Standard_Real u1 = atof(a[3]);
- Standard_Real u2 = atof(a[4]);
+ Standard_Real u1 = Draw::Atof(a[3]);
+ Standard_Real u2 = Draw::Atof(a[4]);
Handle(Geom_Geometry) result;
Handle(Geom2d_Curve) result2d;
if (!GS.IsNull()) {
if (n<7) return 1;
result =
- new Geom_RectangularTrimmedSurface(GS,u1,u2,atof(a[5]),atof(a[6]));
+ new Geom_RectangularTrimmedSurface(GS,u1,u2,Draw::Atof(a[5]),Draw::Atof(a[6]));
}
else if (!GC.IsNull()) {
result = new Geom_TrimmedCurve(GC, u1, u2);
if ( S.IsNull()) return 1;
if (n == 7) {
Standard_Real U1, U2, V1, V2;
- U1 = atof(a[3]);
- U2 = atof(a[4]);
- V1 = atof(a[5]);
- V2 = atof(a[6]);
+ U1 = Draw::Atof(a[3]);
+ U2 = Draw::Atof(a[4]);
+ V1 = Draw::Atof(a[5]);
+ V2 = Draw::Atof(a[6]);
GeomConvert_BSplineSurfaceToBezierSurface
Conv(S, U1, U2, V1, V2, Precision::PConfusion());
NbU = Conv.NbUPatches();
di << NbU << " X " << NbV << " patches in the result" << "\n";
for (i = 1; i <= NbU; i++) {
for (j = 1; j <= NbV; j++) {
- sprintf(name,"%s_%i_%i",a[1],i,j);
+ Sprintf(name,"%s_%i_%i",a[1],i,j);
char *temp = name ;
DrawTrSurf::Set(temp,Conv.Patch(i,j));
}
di << NbU << " X " << NbV << " patches in the result" << "\n";
for (i = 1; i <= NbU; i++) {
for (j = 1; j <= NbV; j++) {
- sprintf(name,"%s_%i_%i",a[1],i,j);
+ Sprintf(name,"%s_%i_%i",a[1],i,j);
char *temp = name ;
DrawTrSurf::Set(temp,Conv.Patch(i,j));
}
else {
if (n==5) {
Standard_Real U1, U2;
- U1 = atof(a[3]);
- U2 = atof(a[4]);
+ U1 = Draw::Atof(a[3]);
+ U2 = Draw::Atof(a[4]);
GeomConvert_BSplineCurveToBezierCurve Conv(C3d, U1, U2,
Precision::PConfusion());
NbArc = Conv.NbArcs();
di << NbArc << " arcs in the result" << "\n";
for (i = 1; i <= NbArc; i++) {
- sprintf(name,"%s_%i",a[1],i);
+ Sprintf(name,"%s_%i",a[1],i);
char *temp = name ;
DrawTrSurf::Set(temp,Conv.Arc(i));
}
NbArc = Conv.NbArcs();
di << NbArc << " arcs in the result" << "\n";
for (i = 1; i <= NbArc; i++) {
- sprintf(name,"%s_%i",a[1],i);
+ Sprintf(name,"%s_%i",a[1],i);
char *temp = name ;
DrawTrSurf::Set(temp,Conv.Arc(i));
}
else {
if (n==5) {
Standard_Real U1, U2;
- U1 = atof(a[3]);
- U2 = atof(a[4]);
+ U1 = Draw::Atof(a[3]);
+ U2 = Draw::Atof(a[4]);
Geom2dConvert_BSplineCurveToBezierCurve Conv(C2d, U1, U2,
Precision::PConfusion());
NbArc = Conv.NbArcs();
di << NbArc << " arcs in the result" << "\n";
for (i = 1; i <= NbArc; i++) {
- sprintf(name,"%s_%i",a[1],i);
+ Sprintf(name,"%s_%i",a[1],i);
char *temp = name ;
DrawTrSurf::Set(temp,Conv.Arc(i));
}
NbArc = Conv.NbArcs();
di << NbArc << " arcs in the result" << "\n";
for (i = 1; i <= NbArc; i++) {
- sprintf(name,"%s_%i",a[1],i);
+ Sprintf(name,"%s_%i",a[1],i);
char *temp = name ;
DrawTrSurf::Set(temp,Conv.Arc(i));
}
Standard_Integer ii, jj, kk=0, NbU, NbV;
Standard_Real Tol = Precision::Confusion();
- NbU = atoi(a[2]);
+ NbU = Draw::Atoi(a[2]);
if ( (Handle(Geom_Curve)::
DownCast(DrawTrSurf::Get(a[3]))).IsNull()) {
// Cas Surfacique
- NbV = atoi(a[3]);
+ NbV = Draw::Atoi(a[3]);
if (n<4+NbU*NbV) {
di << "The number of bezier surface have to be " << NbU*NbV << "\n";
return 1;
}
kk++;
}
- if (kk<n) Tol = atof(a[kk]);
+ if (kk<n) Tol = Draw::Atof(a[kk]);
GeomConvert_CompBezierSurfacesToBSplineSurface Conv(BZ, Tol);
if ( n>10 || n<3) return 1;
- if (n>3) Tol = Max(atof(a[3]),1.e-10);
+ if (n>3) Tol = Max(Draw::Atof(a[3]),1.e-10);
if (n==5) return 1;
if (n>5) {
- if (atoi(a[4]) == 0) myUCont = GeomAbs_C0;
- if (atoi(a[4]) == 2) myUCont = GeomAbs_C2;
- if (atoi(a[5]) == 0) myVCont = GeomAbs_C0;
- if (atoi(a[5]) == 2) myVCont = GeomAbs_C2;
+ if (Draw::Atoi(a[4]) == 0) myUCont = GeomAbs_C0;
+ if (Draw::Atoi(a[4]) == 2) myUCont = GeomAbs_C2;
+ if (Draw::Atoi(a[5]) == 0) myVCont = GeomAbs_C0;
+ if (Draw::Atoi(a[5]) == 2) myVCont = GeomAbs_C2;
}
if (n==7) return 1;
if (n>7) {
- ( degU = (atoi(a[6])));
- ( degV = (atoi(a[7])));
+ ( degU = (Draw::Atoi(a[6])));
+ ( degV = (Draw::Atoi(a[7])));
if ((degU<1) || (degU>24)) degU = 14;
if ((degV<1) || (degV>24)) degV = 14;
}
- if (n>8) nmax = atoi(a[8]);
- if (n>9) myPrec = atoi(a[9]);
+ if (n>8) nmax = Draw::Atoi(a[8]);
+ if (n>9) myPrec = Draw::Atoi(a[9]);
Handle(Geom_Surface) surf = DrawTrSurf::GetSurface(a[2]);
if (surf.IsNull()) return 1;
// test the Geom2d curve
Handle(Geom2d_Curve) C2d = DrawTrSurf::GetCurve2d(a[2]);
if (!C2d.IsNull()) {
- Handle(Geom2d_OffsetCurve) OC = new Geom2d_OffsetCurve(C2d,atof(a[3]));
+ Handle(Geom2d_OffsetCurve) OC = new Geom2d_OffsetCurve(C2d,Draw::Atof(a[3]));
DrawTrSurf::Set(a[1],OC);
return 0;
}
yasurf = Standard_True;
}
- Standard_Real dist = atof(a[3]);
+ Standard_Real dist = Draw::Atof(a[3]);
Handle(Geom_Geometry) result;
}
else {
if (n < 7) return 1;
- gp_Dir D(atof(a[4]),atof(a[5]),atof(a[6]));
+ gp_Dir D(Draw::Atof(a[4]),Draw::Atof(a[5]),Draw::Atof(a[6]));
Handle(Geom_OffsetCurve) GT = new Geom_OffsetCurve(GC, dist, D);
result = GT;
}
if (n < 4) return 1;
Handle(Geom_Curve) C;
- Standard_Real par = atof(a[3]);
+ Standard_Real par = Draw::Atof(a[3]);
Handle(Geom_Surface) GS = DrawTrSurf::GetSurface(a[2]);
if (!GS.IsNull()) {
if (*a[0] == 'u')
Handle(Geom_Surface) GS = DrawTrSurf::GetSurface(a[1]);
if (GS.IsNull()) return 1;
- Standard_Real U = atof(a[2]);
- Standard_Real V = atof(a[3]);
+ Standard_Real U = Draw::Atof(a[2]);
+ Standard_Real V = Draw::Atof(a[3]);
Standard_Boolean DrawPoint = ( n%3 == 2);
if ( DrawPoint) n--;
BSpline = Standard_True;
}
- Standard_Real dx = atof(a[n-3]);
- Standard_Real dy = atof(a[n-2]);
- Standard_Real dz = atof(a[n-1]);
+ Standard_Real dx = Draw::Atof(a[n-3]);
+ Standard_Real dy = Draw::Atof(a[n-2]);
+ Standard_Real dz = Draw::Atof(a[n-1]);
Standard_Integer nup, nvp;
if( !BSpline) {
if (!strcasecmp(a[0],"movep")) {
if (n<7) return 1;
- FirstRow = atoi(a[2]);
- FirstCol = atoi(a[3]);
+ FirstRow = Draw::Atoi(a[2]);
+ FirstCol = Draw::Atoi(a[3]);
if ( FirstRow < 1 || FirstRow > nup ||
FirstCol < 1 || FirstCol > nvp ) return 1;
LastRow = FirstRow;
LastCol = FirstCol;
}
else if (!strcasecmp(a[0],"moverowp")) {
- FirstRow = atoi(a[2]);
+ FirstRow = Draw::Atoi(a[2]);
if ( FirstRow < 1 || FirstRow > nup ) return 1;
LastRow = FirstRow;
FirstCol = 1;
LastCol = nvp;
}
else if (!strcasecmp(a[0],"movecolp")) {
- FirstCol = atoi(a[2]);
+ FirstCol = Draw::Atoi(a[2]);
if ( FirstCol < 1 || FirstCol > nvp ) return 1;
LastCol = FirstCol;
FirstRow = 1;
return 1;
}
- Standard_Real u = atof(a[2]);
- Standard_Real v = atof(a[3]);
+ Standard_Real u = Draw::Atof(a[2]);
+ Standard_Real v = Draw::Atof(a[3]);
- Standard_Real dx = atof(a[4]);
- Standard_Real dy = atof(a[5]);
- Standard_Real dz = atof(a[6]);
+ Standard_Real dx = Draw::Atof(a[4]);
+ Standard_Real dy = Draw::Atof(a[5]);
+ Standard_Real dz = Draw::Atof(a[6]);
Standard_Integer index1u = 0;
Standard_Integer index2u = 0;
Standard_Integer fmodifu, lmodifu, fmodifv, lmodifv;
if (n == 11) {
- index1u = atoi(a[7]);
- index2u = atoi(a[8]);
- index1v = atoi(a[9]);
- index2v = atoi(a[10]);
+ index1u = Draw::Atoi(a[7]);
+ index2u = Draw::Atoi(a[8]);
+ index1v = Draw::Atoi(a[9]);
+ index2v = Draw::Atoi(a[10]);
}
else {
index1u = 2;
if ( !strcasecmp(a[0],"insertuknot") ||
!strcasecmp(a[0],"insertvknot") ) {
if (n<4) return 1;
- knot = atof(a[2]);
- mult = atoi(a[3]);
+ knot = Draw::Atof(a[2]);
+ mult = Draw::Atoi(a[3]);
}
else if ( !strcasecmp(a[0],"remuknot") ||
!strcasecmp(a[0],"remvknot") ) {
- index = atoi(a[2]);
- if (n>=4) mult = atoi(a[3]);
+ index = Draw::Atoi(a[2]);
+ if (n>=4) mult = Draw::Atoi(a[3]);
}
Standard_Real tol = RealLast();
GBs->InsertVKnot(knot,mult,Precision::PConfusion());
}
else if (!strcasecmp(a[0],"remuknot")) {
- if (n>=5) tol = atof(a[4]);
+ if (n>=5) tol = Draw::Atof(a[4]);
if (!GBs->RemoveUKnot(index,mult,tol))
return 1;
}
else if (!strcasecmp(a[0],"remvknot")) {
- if (n>=5) tol = atof(a[4]);
+ if (n>=5) tol = Draw::Atof(a[4]);
if (!GBs->RemoveVKnot(index,mult,tol))
return 1;
}
{
if (n < 3) return 1;
- Standard_Integer NewDeg = atoi(a[2]);
+ Standard_Integer NewDeg = Draw::Atoi(a[2]);
Standard_Boolean BSpline = Standard_False;
Standard_Integer UDeg=0, VDeg=0;
{
if (n < 3) return 1;
- Standard_Integer NewIndex = atoi(a[2]);
+ Standard_Integer NewIndex = Draw::Atoi(a[2]);
Standard_Boolean BSpline = Standard_False;
Handle(Geom_BezierSurface) GBz = DrawTrSurf::GetBezierSurface(a[1]);
BSpline = Standard_True;
}
- Standard_Integer Index;
- if ( !strcasecmp(a[0],"remrowpole")) {
- if (BSpline)
- Index = GBs->UDegree();
- else
- Index = GBz->UDegree();
- }
- else if ( !strcasecmp(a[0],"remcolpole")) {
- if (BSpline)
- Index = GBs->VDegree();
- else
- Index = GBz->VDegree();
- }
-
if ( !strcasecmp(a[0],"remrowpole")) {
if ( BSpline) {
di << " Error : Cannot remove a polerow on a BSplineSurface " << "\n";
Standard_Integer UIndex = 0;
Standard_Integer VIndex = 0;
- Standard_Integer view = atoi(a[2]);
- Standard_Real x = atof(a[3]);
- Standard_Real y = atof(a[4]);
+ Standard_Integer view = Draw::Atoi(a[2]);
+ Standard_Real x = Draw::Atof(a[3]);
+ Standard_Real y = Draw::Atof(a[4]);
Draw_Display d = dout.MakeDisplay(view);
GBs = DrawTrSurf::GetBSplineSurface(a[1]);
if (GBs.IsNull())
return 1;
- GBs->Segment(atof(a[2]),atof(a[3]),atof(a[4]),atof(a[5]));
+ GBs->Segment(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4]),Draw::Atof(a[5]));
}
else {
- GBz->Segment(atof(a[2]),atof(a[3]),atof(a[4]),atof(a[5]));
+ GBz->Segment(Draw::Atof(a[2]),Draw::Atof(a[3]),Draw::Atof(a[4]),Draw::Atof(a[5]));
}
Draw::Repaint();
if (GBs.IsNull())
return 1;
if ( !strcasecmp(a[0],"setuorigin")) {
- GBs->SetUOrigin(atoi(a[2]));
+ GBs->SetUOrigin(Draw::Atoi(a[2]));
}
else if ( !strcasecmp(a[0],"setvorigin")) {
- GBs->SetVOrigin(atoi(a[2]));
+ GBs->SetVOrigin(Draw::Atoi(a[2]));
}
else
return 1;
// try to find parameters on a Surface
Handle(Geom_Surface) S = DrawTrSurf::GetSurface(a[1]);
if( S.IsNull() ) { di << "Unknown surface" << "\n"; return 1; }
- gp_Pnt P(atof(a[2]), atof(a[3]), atof(a[4]));
- Standard_Real Tol = atof(a[5]), U = 0., V = 0.;
+ gp_Pnt P(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4]));
+ Standard_Real Tol = Draw::Atof(a[5]), U = 0., V = 0.;
Standard_Boolean res = GeomLib_Tool::Parameters(S,P,Tol,U,V);
Draw::Set(a[6],U);
// try to find parameters on a 3d Curve
Handle(Geom_Curve) C = DrawTrSurf::GetCurve(a[1]);
if( C.IsNull() ) { di << "Unknown curve" << "\n"; return 1; }
- gp_Pnt P(atof(a[2]), atof(a[3]), atof(a[4]));
- Standard_Real Tol = atof(a[5]), U = 0.;
+ gp_Pnt P(Draw::Atof(a[2]), Draw::Atof(a[3]), Draw::Atof(a[4]));
+ Standard_Real Tol = Draw::Atof(a[5]), U = 0.;
Standard_Boolean res = GeomLib_Tool::Parameter(C,P,Tol,U);
Draw::Set(a[6],U);
// try to find parameters on a 2d Curve
Handle(Geom2d_Curve) C = DrawTrSurf::GetCurve2d(a[1]);
if( C.IsNull() ) { di << "Unknown curve 2d" << "\n"; return 1; }
- gp_Pnt2d P(atof(a[2]), atof(a[3]));
- Standard_Real Tol = atof(a[4]), U = 0.;
+ gp_Pnt2d P(Draw::Atof(a[2]), Draw::Atof(a[3]));
+ Standard_Real Tol = Draw::Atof(a[4]), U = 0.;
Standard_Boolean res = GeomLib_Tool::Parameter(C,P,Tol,U);
Draw::Set(a[5],U);