mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +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:
@@ -677,18 +677,18 @@ static int VSelPrecision(Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
}
|
||||
else if( argc > 1 )
|
||||
{
|
||||
StdSelect_SensitivityMode aMode = ( StdSelect_SensitivityMode )atoi( argv[1] );
|
||||
StdSelect_SensitivityMode aMode = ( StdSelect_SensitivityMode )Draw::Atoi( argv[1] );
|
||||
aContext->SetSensitivityMode( aMode );
|
||||
if( argc > 2 )
|
||||
{
|
||||
if( aMode == StdSelect_SM_WINDOW )
|
||||
{
|
||||
Standard_Integer aPixelTolerance = atoi( argv[2] );
|
||||
Standard_Integer aPixelTolerance = Draw::Atoi( argv[2] );
|
||||
aContext->SetPixelTolerance( aPixelTolerance );
|
||||
}
|
||||
else if( aMode == StdSelect_SM_VIEW )
|
||||
{
|
||||
Standard_Real aSensitivity = atof( argv[2] );
|
||||
Standard_Real aSensitivity = Draw::Atof( argv[2] );
|
||||
aContext->SetSensitivity( aSensitivity );
|
||||
}
|
||||
}
|
||||
@@ -727,8 +727,8 @@ static Standard_Integer VDump (Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
}
|
||||
}
|
||||
|
||||
Standard_Integer aWidth = (argc > 3) ? atoi (argv[3]) : 0;
|
||||
Standard_Integer aHeight = (argc > 4) ? atoi (argv[4]) : 0;
|
||||
Standard_Integer aWidth = (argc > 3) ? Draw::Atoi (argv[3]) : 0;
|
||||
Standard_Integer aHeight = (argc > 4) ? Draw::Atoi (argv[4]) : 0;
|
||||
|
||||
Handle(AIS_InteractiveContext) IC;
|
||||
Handle(V3d_View) view;
|
||||
@@ -855,7 +855,7 @@ static int VDispMode (Draw_Interpretor& , Standard_Integer argc, const char** ar
|
||||
}
|
||||
}
|
||||
else if(argc==2){
|
||||
Standard_Integer Dmode = atoi(argv[1]);
|
||||
Standard_Integer Dmode = Draw::Atoi(argv[1]);
|
||||
if(Ctx->NbCurrents()==0 && TypeOfOperation==3){
|
||||
Handle(AIS_InteractiveObject) IO;
|
||||
VwrTst_DispErase(IO,Dmode,TypeOfOperation,Standard_True);
|
||||
@@ -878,7 +878,7 @@ static int VDispMode (Draw_Interpretor& , Standard_Integer argc, const char** ar
|
||||
if(GetMapOfAIS().IsBound2(name))
|
||||
IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (!IO.IsNull())
|
||||
VwrTst_DispErase(IO,atoi(argv[2]),TypeOfOperation,Standard_True);
|
||||
VwrTst_DispErase(IO,Draw::Atoi(argv[2]),TypeOfOperation,Standard_True);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -891,7 +891,7 @@ static int VDispMode (Draw_Interpretor& , Standard_Integer argc, const char** ar
|
||||
static int VSubInt(Draw_Interpretor& di, Standard_Integer argc, const char** argv)
|
||||
{
|
||||
if(argc==1) return 1;
|
||||
Standard_Integer On = atoi(argv[1]);
|
||||
Standard_Integer On = Draw::Atoi(argv[1]);
|
||||
const Handle(AIS_InteractiveContext)& Ctx = ViewerTest::GetAISContext();
|
||||
|
||||
if(argc==2){
|
||||
@@ -1095,14 +1095,14 @@ static int VTransparency (Draw_Interpretor& di, Standard_Integer argc,
|
||||
const Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(anObj);
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetTransparency(ashape,atof(argv[2]) );
|
||||
TheAISContext()->SetTransparency(ashape,Draw::Atof(argv[2]) );
|
||||
else
|
||||
TheAISContext()->UnsetTransparency(ashape);
|
||||
} else if (anObj->IsKind(STANDARD_TYPE(NIS_InteractiveObject))) {
|
||||
const Handle(NIS_InteractiveObject) ashape =
|
||||
Handle(NIS_InteractiveObject)::DownCast(anObj);
|
||||
if(HaveToSet)
|
||||
ashape->SetTransparency(atof(argv[2]) );
|
||||
ashape->SetTransparency(Draw::Atof(argv[2]) );
|
||||
else
|
||||
ashape->UnsetTransparency();
|
||||
}
|
||||
@@ -1118,7 +1118,7 @@ static int VTransparency (Draw_Interpretor& di, Standard_Integer argc,
|
||||
{
|
||||
Handle(AIS_InteractiveObject) ashape = TheAISContext() -> Current();
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetTransparency(ashape,atof(argv[1]),Standard_False);
|
||||
TheAISContext()->SetTransparency(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetTransparency(ashape,Standard_False);
|
||||
}
|
||||
@@ -1136,7 +1136,7 @@ static int VTransparency (Draw_Interpretor& di, Standard_Integer argc,
|
||||
Handle(AIS_InteractiveObject)::DownCast(it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if(HaveToSet)
|
||||
TheAISContext()->SetTransparency(ashape,atof(argv[1]),Standard_False);
|
||||
TheAISContext()->SetTransparency(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetTransparency(ashape,Standard_False);
|
||||
it.Next();
|
||||
@@ -1281,14 +1281,14 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
const Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth ( ashape,atof (argv[2]) );
|
||||
TheAISContext()->SetWidth ( ashape,Draw::Atof (argv[2]) );
|
||||
else
|
||||
TheAISContext()->UnsetWidth (ashape);
|
||||
} else if (anObj->IsKind(STANDARD_TYPE(NIS_InteractiveObject))) {
|
||||
const Handle(NIS_Triangulated) ashape =
|
||||
Handle(NIS_Triangulated)::DownCast(GetMapOfAIS().Find2(name));
|
||||
if (HaveToSet && !ashape.IsNull())
|
||||
ashape->SetLineWidth ( atof (argv[2]) );
|
||||
ashape->SetLineWidth ( Draw::Atof (argv[2]) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1303,7 +1303,7 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
{
|
||||
Handle(AIS_InteractiveObject) ashape = TheAISContext() -> Current();
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth(ashape,atof(argv[1]),Standard_False);
|
||||
TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetWidth(ashape,Standard_False);
|
||||
}
|
||||
@@ -1320,7 +1320,7 @@ static int VWidth (Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
if (HaveToSet)
|
||||
TheAISContext()->SetWidth(ashape,atof(argv[1]),Standard_False);
|
||||
TheAISContext()->SetWidth(ashape,Draw::Atof(argv[1]),Standard_False);
|
||||
else
|
||||
TheAISContext()->UnsetWidth(ashape,Standard_False);
|
||||
it.Next();
|
||||
@@ -1387,7 +1387,7 @@ static int VInteriorStyle (Draw_Interpretor& di, Standard_Integer argc, const ch
|
||||
if (anObj->IsKind(STANDARD_TYPE(AIS_InteractiveObject))) {
|
||||
const Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
|
||||
SetInteriorStyle (ashape, atoi (argv[2]), di);
|
||||
SetInteriorStyle (ashape, Draw::Atoi (argv[2]), di);
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1400,7 +1400,7 @@ static int VInteriorStyle (Draw_Interpretor& di, Standard_Integer argc, const ch
|
||||
TheAISContext() ->NextCurrent() )
|
||||
{
|
||||
Handle(AIS_InteractiveObject) ashape = TheAISContext() -> Current();
|
||||
SetInteriorStyle (ashape, atoi (argv[1]), di);
|
||||
SetInteriorStyle (ashape, Draw::Atoi (argv[1]), di);
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
@@ -1413,7 +1413,7 @@ static int VInteriorStyle (Draw_Interpretor& di, Standard_Integer argc, const ch
|
||||
Handle(AIS_InteractiveObject) ashape =
|
||||
Handle(AIS_InteractiveObject)::DownCast (it.Key1());
|
||||
if (!ashape.IsNull())
|
||||
SetInteriorStyle (ashape, atoi (argv[1]), di);
|
||||
SetInteriorStyle (ashape, Draw::Atoi (argv[1]), di);
|
||||
it.Next();
|
||||
}
|
||||
}
|
||||
@@ -1773,8 +1773,8 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
|
||||
}
|
||||
|
||||
myShape->SetTextureScale (( argv[2] ? Standard_True : Standard_False ),
|
||||
( argv[2] ? atof(argv[2]) : 1.0 ),
|
||||
( argv[2] ? atof(argv[argc-1]) : 1.0 ) );
|
||||
( argv[2] ? Draw::Atof(argv[2]) : 1.0 ),
|
||||
( argv[2] ? Draw::Atof(argv[argc-1]) : 1.0 ) );
|
||||
break;
|
||||
|
||||
case 3: // vtexorigin : we change the origin of the texture on the shape
|
||||
@@ -1784,8 +1784,8 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
|
||||
return 1;
|
||||
}
|
||||
myShape->SetTextureOrigin (( argv[2] ? Standard_True : Standard_False ),
|
||||
( argv[2] ? atof(argv[2]) : 0.0 ),
|
||||
( argv[2] ? atof(argv[argc-1]) : 0.0 ));
|
||||
( argv[2] ? Draw::Atof(argv[2]) : 0.0 ),
|
||||
( argv[2] ? Draw::Atof(argv[argc-1]) : 0.0 ));
|
||||
break;
|
||||
|
||||
case 4: // vtexrepeat : we change the number of occurences of the texture on the shape
|
||||
@@ -1797,7 +1797,7 @@ Standard_Integer VTexture (Draw_Interpretor& di,Standard_Integer argc, const cha
|
||||
if (argc>2 && argv[2])
|
||||
{
|
||||
di <<"Texture repeat enabled"<<"\n";
|
||||
myShape->SetTextureRepeat(Standard_True, atof(argv[2]), atof(argv[argc-1]) );
|
||||
myShape->SetTextureRepeat(Standard_True, Draw::Atof(argv[2]), Draw::Atof(argv[argc-1]) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2040,7 +2040,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
|
||||
|
||||
myTimer.Start();
|
||||
|
||||
if (atoi(argv[3])==1 ) {
|
||||
if (Draw::Atoi(argv[3])==1 ) {
|
||||
di<<" Primitives sensibles OFF"<<"\n";
|
||||
TheAISContext()->Deactivate(aIO);
|
||||
}
|
||||
@@ -2048,7 +2048,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
|
||||
di<<" Primitives sensibles ON"<<"\n";
|
||||
}
|
||||
// Movement par transformation
|
||||
if(atoi(argv[2]) ==1) {
|
||||
if(Draw::Atoi(argv[2]) ==1) {
|
||||
di<<" Calcul par Transformation"<<"\n";
|
||||
for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) {
|
||||
|
||||
@@ -2075,7 +2075,7 @@ static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) {
|
||||
TheAISContext() ->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
if (atoi(argv[3])==1 ){
|
||||
if (Draw::Atoi(argv[3])==1 ){
|
||||
// On reactive la selection des primitives sensibles
|
||||
TheAISContext()->Activate(aIO,0);
|
||||
}
|
||||
@@ -2219,7 +2219,7 @@ static int VShading(Draw_Interpretor& ,Standard_Integer argc, const char** argv)
|
||||
if (argc < 3) {
|
||||
myDevCoef = 0.0008;
|
||||
} else {
|
||||
myDevCoef =atof(argv[2]);
|
||||
myDevCoef =Draw::Atof(argv[2]);
|
||||
}
|
||||
|
||||
TCollection_AsciiString name=argv[1];
|
||||
@@ -2294,7 +2294,7 @@ static int VActivatedMode (Draw_Interpretor& di, Standard_Integer argc, const ch
|
||||
|
||||
// IL n'y a aps de nom de shape passe en argument
|
||||
if (HaveToSet && !ThereIsName){
|
||||
Standard_Integer aMode=atoi(argv [1]);
|
||||
Standard_Integer aMode=Draw::Atoi(argv [1]);
|
||||
|
||||
const char *cmode="???";
|
||||
switch (aMode) {
|
||||
@@ -2406,7 +2406,7 @@ static int VActivatedMode (Draw_Interpretor& di, Standard_Integer argc, const ch
|
||||
}
|
||||
}
|
||||
else if (HaveToSet && ThereIsName){
|
||||
Standard_Integer aMode=atoi(argv [2]);
|
||||
Standard_Integer aMode=Draw::Atoi(argv [2]);
|
||||
Handle(AIS_InteractiveObject) aIO =
|
||||
Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(argv[1]));
|
||||
|
||||
@@ -3173,20 +3173,20 @@ static int VSetTransMode ( Draw_Interpretor& di, Standard_Integer argc, const ch
|
||||
|
||||
TCollection_AsciiString shapeName;
|
||||
shapeName = argv[1];
|
||||
Standard_Integer persFlag1 = atoi(argv[2]);
|
||||
Standard_Integer persFlag1 = Draw::Atoi(argv[2]);
|
||||
Standard_Integer persFlag2 = 0;
|
||||
Standard_Integer persFlag3 = 0;
|
||||
gp_Pnt origin = gp_Pnt( 0.0, 0.0, 0.0 );
|
||||
if ( argc == 4 || argc == 5 || argc == 7 || argc == 8 ) {
|
||||
persFlag2 = atoi(argv[3]);
|
||||
persFlag2 = Draw::Atoi(argv[3]);
|
||||
}
|
||||
if ( argc == 5 || argc == 8 ) {
|
||||
persFlag3 = atoi(argv[4]);
|
||||
persFlag3 = Draw::Atoi(argv[4]);
|
||||
}
|
||||
if ( argc >= 6 ) {
|
||||
origin.SetX( atof(argv[argc - 3]) );
|
||||
origin.SetY( atof(argv[argc - 2]) );
|
||||
origin.SetZ( atof(argv[argc - 1]) );
|
||||
origin.SetX( Draw::Atof(argv[argc - 3]) );
|
||||
origin.SetY( Draw::Atof(argv[argc - 2]) );
|
||||
origin.SetZ( Draw::Atof(argv[argc - 1]) );
|
||||
}
|
||||
|
||||
Standard_Boolean IsBound = GetMapOfAIS().IsBound2(shapeName);
|
||||
@@ -3247,7 +3247,7 @@ Standard_Integer hlrtest(Draw_Interpretor&, Standard_Integer n, const char**
|
||||
Standard_Boolean IsPoly = Standard_False;
|
||||
gp_Ax2 anAx2 = gp::XOY();
|
||||
|
||||
//if(n > 2) aPolyAlgo = atoi(a[2]);
|
||||
//if(n > 2) aPolyAlgo = Draw::Atoi(a[2]);
|
||||
|
||||
//IsPoly = aPolyAlgo > 0;
|
||||
|
||||
@@ -3256,17 +3256,17 @@ Standard_Integer hlrtest(Draw_Interpretor&, Standard_Integer n, const char**
|
||||
|
||||
if (n == 11)
|
||||
{
|
||||
Standard_Real x = atof(a[2]);
|
||||
Standard_Real y = atof(a[3]);
|
||||
Standard_Real z = atof(a[4]);
|
||||
Standard_Real x = Draw::Atof(a[2]);
|
||||
Standard_Real y = Draw::Atof(a[3]);
|
||||
Standard_Real z = Draw::Atof(a[4]);
|
||||
|
||||
Standard_Real dx = atof(a[5]);
|
||||
Standard_Real dy = atof(a[6]);
|
||||
Standard_Real dz = atof(a[7]);
|
||||
Standard_Real dx = Draw::Atof(a[5]);
|
||||
Standard_Real dy = Draw::Atof(a[6]);
|
||||
Standard_Real dz = Draw::Atof(a[7]);
|
||||
|
||||
Standard_Real dx1 = atof(a[8]);
|
||||
Standard_Real dy1 = atof(a[9]);
|
||||
Standard_Real dz1 = atof(a[10]);
|
||||
Standard_Real dx1 = Draw::Atof(a[8]);
|
||||
Standard_Real dy1 = Draw::Atof(a[9]);
|
||||
Standard_Real dz1 = Draw::Atof(a[10]);
|
||||
|
||||
gp_Pnt anOrigin (x, y, z);
|
||||
gp_Dir aNormal (dx, dy, dz);
|
||||
@@ -3307,7 +3307,7 @@ Standard_Integer phlrtest(Draw_Interpretor&, Standard_Integer n, const char*
|
||||
Standard_Boolean IsPoly = Standard_True;
|
||||
gp_Ax2 anAx2 = gp::XOY();
|
||||
|
||||
//if(n > 2) aPolyAlgo = atoi(a[2]);
|
||||
//if(n > 2) aPolyAlgo = Draw::Atoi(a[2]);
|
||||
|
||||
//IsPoly = aPolyAlgo > 0;
|
||||
|
||||
@@ -3316,17 +3316,17 @@ Standard_Integer phlrtest(Draw_Interpretor&, Standard_Integer n, const char*
|
||||
|
||||
if (n == 11)
|
||||
{
|
||||
Standard_Real x = atof(a[2]);
|
||||
Standard_Real y = atof(a[3]);
|
||||
Standard_Real z = atof(a[4]);
|
||||
Standard_Real x = Draw::Atof(a[2]);
|
||||
Standard_Real y = Draw::Atof(a[3]);
|
||||
Standard_Real z = Draw::Atof(a[4]);
|
||||
|
||||
Standard_Real dx = atof(a[5]);
|
||||
Standard_Real dy = atof(a[6]);
|
||||
Standard_Real dz = atof(a[7]);
|
||||
Standard_Real dx = Draw::Atof(a[5]);
|
||||
Standard_Real dy = Draw::Atof(a[6]);
|
||||
Standard_Real dz = Draw::Atof(a[7]);
|
||||
|
||||
Standard_Real dx1 = atof(a[8]);
|
||||
Standard_Real dy1 = atof(a[9]);
|
||||
Standard_Real dz1 = atof(a[10]);
|
||||
Standard_Real dx1 = Draw::Atof(a[8]);
|
||||
Standard_Real dy1 = Draw::Atof(a[9]);
|
||||
Standard_Real dz1 = Draw::Atof(a[10]);
|
||||
|
||||
gp_Pnt anOrigin (x, y, z);
|
||||
gp_Dir aNormal (dx, dy, dz);
|
||||
@@ -3623,7 +3623,7 @@ static Standard_Integer TDraft(Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
// argv[4] - Standard_Real Angle
|
||||
// argv[5] - Standard_Integer Reverse
|
||||
|
||||
// sprintf(prefix, argv[1]);
|
||||
// Sprintf(prefix, argv[1]);
|
||||
Standard_Real anAngle = 0;
|
||||
Standard_Boolean Rev = Standard_False;
|
||||
Standard_Integer rev = 0;
|
||||
@@ -3635,7 +3635,7 @@ static Standard_Integer TDraft(Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
di << "TEST : Plane is NULL" << "\n";
|
||||
return 1;
|
||||
}
|
||||
anAngle = atof(argv[4]);
|
||||
anAngle = Draw::Atof(argv[4]);
|
||||
anAngle = 2*M_PI * anAngle / 360.0;
|
||||
gp_Pln aPln;
|
||||
Handle( Geom_Surface )aSurf;
|
||||
@@ -3643,7 +3643,7 @@ static Standard_Integer TDraft(Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
Standard_Real Offset;
|
||||
gp_Dir aDir;
|
||||
if(argc > 4) { // == 5
|
||||
rev = atoi(argv[5]);
|
||||
rev = Draw::Atoi(argv[5]);
|
||||
Rev = (rev)? Standard_True : Standard_False;
|
||||
}
|
||||
|
||||
|
@@ -104,10 +104,10 @@ static Standard_Integer tolblend(Draw_Interpretor& di, Standard_Integer narg, co
|
||||
return 0;
|
||||
}
|
||||
else if(narg == 5){
|
||||
ta = atof(a[1]);
|
||||
t3d = atof(a[2]);
|
||||
t2d = atof(a[3]);
|
||||
fl = atof(a[4]);
|
||||
ta = Draw::Atof(a[1]);
|
||||
t3d = Draw::Atof(a[2]);
|
||||
t2d = Draw::Atof(a[3]);
|
||||
fl = Draw::Atof(a[4]);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -149,7 +149,7 @@ static Standard_Integer VBLEND(Draw_Interpretor& di, Standard_Integer narg, cons
|
||||
TopoDS_Edge E;
|
||||
Standard_Integer nbedge = 0;
|
||||
for (Standard_Integer ii = 1; ii < (narg-1)/2; ii++){
|
||||
Rad = atof(a[2*ii + 1]);
|
||||
Rad = Draw::Atof(a[2*ii + 1]);
|
||||
TopoDS_Shape aLocalShape = DBRep::Get(a[(2*ii+2)],TopAbs_EDGE);
|
||||
E = TopoDS::Edge(aLocalShape);
|
||||
// E = TopoDS::Edge(DBRep::Get(a[(2*ii+2)],TopAbs_EDGE));
|
||||
|
@@ -266,19 +266,19 @@ static int VTrihedron (Draw_Interpretor& theDi,
|
||||
Standard_Integer anArgIter = 2; // 1st is an IO name
|
||||
if (anArgIter < theArgsNb)
|
||||
{
|
||||
anOrigin.SetX (atof (theArgVec[anArgIter++]));
|
||||
anOrigin.SetY (atof (theArgVec[anArgIter++]));
|
||||
anOrigin.SetZ (atof (theArgVec[anArgIter++]));
|
||||
anOrigin.SetX (Draw::Atof (theArgVec[anArgIter++]));
|
||||
anOrigin.SetY (Draw::Atof (theArgVec[anArgIter++]));
|
||||
anOrigin.SetZ (Draw::Atof (theArgVec[anArgIter++]));
|
||||
if (anArgIter < theArgsNb)
|
||||
{
|
||||
Standard_Real aX = atof (theArgVec[anArgIter++]);
|
||||
Standard_Real aY = atof (theArgVec[anArgIter++]);
|
||||
Standard_Real aZ = atof (theArgVec[anArgIter++]);
|
||||
Standard_Real aX = Draw::Atof (theArgVec[anArgIter++]);
|
||||
Standard_Real aY = Draw::Atof (theArgVec[anArgIter++]);
|
||||
Standard_Real aZ = Draw::Atof (theArgVec[anArgIter++]);
|
||||
aDirZ.SetCoord (aX, aY, aZ);
|
||||
|
||||
aX = atof (theArgVec[anArgIter++]);
|
||||
aY = atof (theArgVec[anArgIter++]);
|
||||
aZ = atof (theArgVec[anArgIter++]);
|
||||
aX = Draw::Atof (theArgVec[anArgIter++]);
|
||||
aY = Draw::Atof (theArgVec[anArgIter++]);
|
||||
aZ = Draw::Atof (theArgVec[anArgIter++]);
|
||||
aDirX.SetCoord (aX, aY, aZ);
|
||||
}
|
||||
}
|
||||
@@ -323,8 +323,8 @@ static int VSize (Draw_Interpretor& di, Standard_Integer argc, const char** argv
|
||||
|
||||
// Verification du nombre d'arguments
|
||||
if (argc==1) {ThereIsName=Standard_False;value=100;}
|
||||
else if (argc==2) {ThereIsName=Standard_False;value=atof(argv[1]);}
|
||||
else {ThereIsName=Standard_True;value=atof(argv[2]);}
|
||||
else if (argc==2) {ThereIsName=Standard_False;value=Draw::Atof(argv[1]);}
|
||||
else {ThereIsName=Standard_True;value=Draw::Atof(argv[2]);}
|
||||
|
||||
// On ferme le contexte local pour travailler dans le contexte global
|
||||
if(TheAISContext()->HasOpenedContext())
|
||||
@@ -564,7 +564,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
if (HasArg) {
|
||||
Standard_Real coord[6];
|
||||
for(Standard_Integer i=0;i<=5;i++){
|
||||
coord[i]=atof(argv[2+i]);
|
||||
coord[i]=Draw::Atof(argv[2+i]);
|
||||
}
|
||||
gp_Pnt p1(coord[0],coord[1],coord[2]), p2(coord[3],coord[4],coord[5]) ;
|
||||
|
||||
@@ -816,7 +816,7 @@ static int VPointBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
if (HasArg) {
|
||||
Standard_Real thecoord[3];
|
||||
for(Standard_Integer i=0;i<=2;i++)
|
||||
thecoord[i]=atof(argv[2+i]);
|
||||
thecoord[i]=Draw::Atof(argv[2+i]);
|
||||
Handle(Geom_CartesianPoint ) myGeomPoint= new Geom_CartesianPoint (thecoord[0],thecoord[1],thecoord[2]);
|
||||
Handle(AIS_Point) myAISPoint=new AIS_Point(myGeomPoint );
|
||||
GetMapOfAIS().Bind (myAISPoint,name);
|
||||
@@ -990,23 +990,23 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& di,
|
||||
Handle(Geom_CartesianPoint)::DownCast( anAISPointC->Component());
|
||||
|
||||
// Verification that the three points are different
|
||||
if(abs(aCartPointB->X()-aCartPointA->X())<=Precision::Confusion() &&
|
||||
abs(aCartPointB->Y()-aCartPointA->Y())<=Precision::Confusion() &&
|
||||
abs(aCartPointB->Z()-aCartPointA->Z())<=Precision::Confusion())
|
||||
if(Abs(aCartPointB->X()-aCartPointA->X())<=Precision::Confusion() &&
|
||||
Abs(aCartPointB->Y()-aCartPointA->Y())<=Precision::Confusion() &&
|
||||
Abs(aCartPointB->Z()-aCartPointA->Z())<=Precision::Confusion())
|
||||
{
|
||||
// B=A
|
||||
std::cout<<"vplane error: same points"<<"\n";return 1;
|
||||
}
|
||||
if(abs(aCartPointC->X()-aCartPointA->X())<=Precision::Confusion() &&
|
||||
abs(aCartPointC->Y()-aCartPointA->Y())<=Precision::Confusion() &&
|
||||
abs(aCartPointC->Z()-aCartPointA->Z())<=Precision::Confusion())
|
||||
if(Abs(aCartPointC->X()-aCartPointA->X())<=Precision::Confusion() &&
|
||||
Abs(aCartPointC->Y()-aCartPointA->Y())<=Precision::Confusion() &&
|
||||
Abs(aCartPointC->Z()-aCartPointA->Z())<=Precision::Confusion())
|
||||
{
|
||||
// C=A
|
||||
std::cout<<"vplane error: same points"<<"\n";return 1;
|
||||
}
|
||||
if(abs(aCartPointC->X()-aCartPointB->X())<=Precision::Confusion() &&
|
||||
abs(aCartPointC->Y()-aCartPointB->Y())<=Precision::Confusion() &&
|
||||
abs(aCartPointC->Z()-aCartPointB->Z())<=Precision::Confusion())
|
||||
if(Abs(aCartPointC->X()-aCartPointB->X())<=Precision::Confusion() &&
|
||||
Abs(aCartPointC->Y()-aCartPointB->Y())<=Precision::Confusion() &&
|
||||
Abs(aCartPointC->Z()-aCartPointB->Z())<=Precision::Confusion())
|
||||
{
|
||||
// C=B
|
||||
std::cout<<"vplane error: same points"<<"\n";return 1;
|
||||
@@ -1682,8 +1682,8 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
|
||||
Standard_Real coord[6];
|
||||
for(Standard_Integer i=0;i<=2;i++){
|
||||
coord[i]=atof(argv[2+i]);
|
||||
coord[i+3]=atof(argv[5+i]);
|
||||
coord[i]=Draw::Atof(argv[2+i]);
|
||||
coord[i+3]=Draw::Atof(argv[5+i]);
|
||||
}
|
||||
|
||||
Handle(Geom_CartesianPoint ) myCartPointA=new Geom_CartesianPoint (coord[0],coord[1],coord[2] );
|
||||
@@ -1927,7 +1927,7 @@ static int VCircleBuilder(Draw_Interpretor& di, Standard_Integer argc, const cha
|
||||
{
|
||||
// Get arguments
|
||||
TCollection_AsciiString aName(argv[1]);
|
||||
Standard_Boolean isFilled = (Standard_Boolean)atoi(argv[5]);
|
||||
Standard_Boolean isFilled = (Standard_Boolean)Draw::Atoi(argv[5]);
|
||||
|
||||
Handle(AIS_InteractiveObject) theShapeA;
|
||||
Handle(AIS_InteractiveObject) theShapeB;
|
||||
@@ -1976,25 +1976,25 @@ static int VCircleBuilder(Draw_Interpretor& di, Standard_Integer argc, const cha
|
||||
Handle(Geom_CartesianPoint)::DownCast(myGeomPointC);
|
||||
|
||||
// Test A=B
|
||||
if (abs(myCartPointA->X()-myCartPointB->X()) <= Precision::Confusion() &&
|
||||
abs(myCartPointA->Y()-myCartPointB->Y()) <= Precision::Confusion() &&
|
||||
abs(myCartPointA->Z()-myCartPointB->Z()) <= Precision::Confusion() )
|
||||
if (Abs(myCartPointA->X()-myCartPointB->X()) <= Precision::Confusion() &&
|
||||
Abs(myCartPointA->Y()-myCartPointB->Y()) <= Precision::Confusion() &&
|
||||
Abs(myCartPointA->Z()-myCartPointB->Z()) <= Precision::Confusion() )
|
||||
{
|
||||
std::cout << "vcircle error: Same points.\n";
|
||||
return 1; // TCL_ERROR
|
||||
}
|
||||
// Test A=C
|
||||
if (abs(myCartPointA->X()-myCartPointC->X()) <= Precision::Confusion() &&
|
||||
abs(myCartPointA->Y()-myCartPointC->Y()) <= Precision::Confusion() &&
|
||||
abs(myCartPointA->Z()-myCartPointC->Z()) <= Precision::Confusion() )
|
||||
if (Abs(myCartPointA->X()-myCartPointC->X()) <= Precision::Confusion() &&
|
||||
Abs(myCartPointA->Y()-myCartPointC->Y()) <= Precision::Confusion() &&
|
||||
Abs(myCartPointA->Z()-myCartPointC->Z()) <= Precision::Confusion() )
|
||||
{
|
||||
std::cout << "vcircle error: Same points.\n";
|
||||
return 1; // TCL_ERROR
|
||||
}
|
||||
// Test B=C
|
||||
if (abs(myCartPointB->X()-myCartPointC->X()) <= Precision::Confusion() &&
|
||||
abs(myCartPointB->Y()-myCartPointC->Y()) <= Precision::Confusion() &&
|
||||
abs(myCartPointB->Z()-myCartPointC->Z()) <= Precision::Confusion() )
|
||||
if (Abs(myCartPointB->X()-myCartPointC->X()) <= Precision::Confusion() &&
|
||||
Abs(myCartPointB->Y()-myCartPointC->Y()) <= Precision::Confusion() &&
|
||||
Abs(myCartPointB->Z()-myCartPointC->Z()) <= Precision::Confusion() )
|
||||
{
|
||||
std::cout << "vcircle error: Same points.\n";
|
||||
return 1;// TCL_ERROR
|
||||
@@ -2028,7 +2028,7 @@ static int VCircleBuilder(Draw_Interpretor& di, Standard_Integer argc, const cha
|
||||
return 1; // TCL_ERROR
|
||||
}
|
||||
// <20>heck that the radius is >= 0
|
||||
if (atof(argv[4]) <= 0 )
|
||||
if (Draw::Atof(argv[4]) <= 0 )
|
||||
{
|
||||
std::cout << "vcircle error: the radius must be >=0.\n";
|
||||
return 1; // TCL_ERROR
|
||||
@@ -2047,7 +2047,7 @@ static int VCircleBuilder(Draw_Interpretor& di, Standard_Integer argc, const cha
|
||||
gp_Ax1 thegpAxe = mygpPlane.Axis();
|
||||
gp_Dir theDir = thegpAxe.Direction();
|
||||
gp_Pnt theCenter = myCartPointB->Pnt();
|
||||
Standard_Real TheR = atof(argv[4]);
|
||||
Standard_Real TheR = Draw::Atof(argv[4]);
|
||||
GC_MakeCircle Cir = GC_MakeCircle (theCenter, theDir ,TheR);
|
||||
Handle (Geom_Circle) theGeomCircle;
|
||||
try
|
||||
@@ -2416,32 +2416,32 @@ static int VDrawText (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
}
|
||||
|
||||
// Text position
|
||||
const Standard_Real X = atof(argv[2]);
|
||||
const Standard_Real Y = atof(argv[3]);
|
||||
const Standard_Real Z = atof(argv[4]);
|
||||
const Standard_Real X = Draw::Atof(argv[2]);
|
||||
const Standard_Real Y = Draw::Atof(argv[3]);
|
||||
const Standard_Real Z = Draw::Atof(argv[4]);
|
||||
const gp_Pnt pnt(X,Y,Z);
|
||||
|
||||
// Text color
|
||||
const Quantity_Parameter R = atof(argv[5])/255.;
|
||||
const Quantity_Parameter G = atof(argv[6])/255.;
|
||||
const Quantity_Parameter B = atof(argv[7])/255.;
|
||||
const Quantity_Parameter R = Draw::Atof(argv[5])/255.;
|
||||
const Quantity_Parameter G = Draw::Atof(argv[6])/255.;
|
||||
const Quantity_Parameter B = Draw::Atof(argv[7])/255.;
|
||||
const Quantity_Color aColor( R, G, B, Quantity_TOC_RGB );
|
||||
|
||||
// Text alignment
|
||||
const int hor_align = atoi(argv[8]);
|
||||
const int ver_align = atoi(argv[9]);
|
||||
const int hor_align = Draw::Atoi(argv[8]);
|
||||
const int ver_align = Draw::Atoi(argv[9]);
|
||||
|
||||
// Text angle
|
||||
const Standard_Real angle = atof(argv[10]);
|
||||
const Standard_Real angle = Draw::Atof(argv[10]);
|
||||
|
||||
// Text zooming
|
||||
const Standard_Boolean zoom = atoi(argv[11]);
|
||||
const Standard_Boolean zoom = Draw::Atoi(argv[11]);
|
||||
|
||||
// Text height
|
||||
const Standard_Real height = atof(argv[12]);
|
||||
const Standard_Real height = Draw::Atof(argv[12]);
|
||||
|
||||
// Text aspect
|
||||
const Font_FontAspect aspect = Font_FontAspect(atoi(argv[13]));
|
||||
const Font_FontAspect aspect = Font_FontAspect(Draw::Atoi(argv[13]));
|
||||
|
||||
// Text font
|
||||
TCollection_AsciiString font;
|
||||
@@ -2451,7 +2451,7 @@ static int VDrawText (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
font.AssignCat(argv[14]);
|
||||
|
||||
// Text is multibyte
|
||||
const Standard_Boolean isMultibyte = (argc < 16)? Standard_False : (atoi(argv[15]) != 0);
|
||||
const Standard_Boolean isMultibyte = (argc < 16)? Standard_False : (Draw::Atoi(argv[15]) != 0);
|
||||
|
||||
// Read text string
|
||||
TCollection_ExtendedString name;
|
||||
@@ -2769,12 +2769,12 @@ static int VDrawSphere (Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
|
||||
// read the arguments
|
||||
TCollection_AsciiString aShapeName (argv[1]);
|
||||
Standard_Integer aResolution = atoi (argv[2]);
|
||||
Standard_Real aCenterX = (argc > 5) ? atof (argv[3]) : 0.0;
|
||||
Standard_Real aCenterY = (argc > 5) ? atof (argv[4]) : 0.0;
|
||||
Standard_Real aCenterZ = (argc > 5) ? atof (argv[5]) : 0.0;
|
||||
Standard_Real aRadius = (argc > 6) ? atof (argv[6]) : 100.0;
|
||||
Standard_Boolean toShowEdges = (argc > 7) ? atoi (argv[7]) : Standard_False;
|
||||
Standard_Integer aResolution = Draw::Atoi (argv[2]);
|
||||
Standard_Real aCenterX = (argc > 5) ? Draw::Atof (argv[3]) : 0.0;
|
||||
Standard_Real aCenterY = (argc > 5) ? Draw::Atof (argv[4]) : 0.0;
|
||||
Standard_Real aCenterZ = (argc > 5) ? Draw::Atof (argv[5]) : 0.0;
|
||||
Standard_Real aRadius = (argc > 6) ? Draw::Atof (argv[6]) : 100.0;
|
||||
Standard_Boolean toShowEdges = (argc > 7) ? Draw::Atoi (argv[7]) : Standard_False;
|
||||
|
||||
// remove AIS object with given name from map
|
||||
VDisplayAISObject (aShapeName, Handle(AIS_InteractiveObject)());
|
||||
@@ -2908,7 +2908,7 @@ static int VClipPlane (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
}
|
||||
else if (argc == 2 || argc == 3)
|
||||
{
|
||||
Standard_Integer aPlaneIdToOff = (argc == 3) ? atoi (argv[1]) : 1;
|
||||
Standard_Integer aPlaneIdToOff = (argc == 3) ? Draw::Atoi (argv[1]) : 1;
|
||||
Standard_Boolean toIterateAll = (argc == 2);
|
||||
TCollection_AsciiString isOnOffStr ((argc == 3) ? argv[2] : argv[1]);
|
||||
isOnOffStr.LowerCase();
|
||||
@@ -3001,12 +3001,12 @@ static int VClipPlane (Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Real aLocX = atof (argv[1]);
|
||||
Standard_Real aLocY = atof (argv[2]);
|
||||
Standard_Real aLocZ = atof (argv[3]);
|
||||
Standard_Real aNormDX = atof (argv[4]);
|
||||
Standard_Real aNormDY = atof (argv[5]);
|
||||
Standard_Real aNormDZ = atof (argv[6]);
|
||||
Standard_Real aLocX = Draw::Atof (argv[1]);
|
||||
Standard_Real aLocY = Draw::Atof (argv[2]);
|
||||
Standard_Real aLocZ = Draw::Atof (argv[3]);
|
||||
Standard_Real aNormDX = Draw::Atof (argv[4]);
|
||||
Standard_Real aNormDY = Draw::Atof (argv[5]);
|
||||
Standard_Real aNormDZ = Draw::Atof (argv[6]);
|
||||
|
||||
Handle(V3d_Plane) aPlaneV3d = new V3d_Plane();
|
||||
gp_Pln aPlane (gp_Pnt (aLocX, aLocY, aLocZ), gp_Dir (aNormDX, aNormDY, aNormDZ));
|
||||
@@ -3093,9 +3093,9 @@ static int VComputeHLR (Draw_Interpretor& di,
|
||||
{
|
||||
gp_Dir anUp;
|
||||
|
||||
anEye.SetCoord (atof (argv[3]), atof (argv[4]), atof (argv[5]));
|
||||
aDir.SetCoord (atof (argv[6]), atof (argv[7]), atof (argv[8]));
|
||||
anUp.SetCoord (atof (argv[9]), atof (argv[10]), atof (argv[11]));
|
||||
anEye.SetCoord (Draw::Atof (argv[3]), Draw::Atof (argv[4]), Draw::Atof (argv[5]));
|
||||
aDir.SetCoord (Draw::Atof (argv[6]), Draw::Atof (argv[7]), Draw::Atof (argv[8]));
|
||||
anUp.SetCoord (Draw::Atof (argv[9]), Draw::Atof (argv[10]), Draw::Atof (argv[11]));
|
||||
aProjAx.SetLocation (anEye);
|
||||
aProjAx.SetDirection (aDir);
|
||||
aProjAx.SetYDirection (anUp);
|
||||
@@ -3377,38 +3377,38 @@ static int VDrawPArray (Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
// vertex command
|
||||
if (CheckInputCommand ("v", argv, aArgIndex, 3, argc))
|
||||
{
|
||||
anArray->AddVertex (atof (argv[aArgIndex - 3]),
|
||||
atof (argv[aArgIndex - 2]),
|
||||
atof (argv[aArgIndex - 1]));
|
||||
anArray->AddVertex (Draw::Atof (argv[aArgIndex - 3]),
|
||||
Draw::Atof (argv[aArgIndex - 2]),
|
||||
Draw::Atof (argv[aArgIndex - 1]));
|
||||
|
||||
// vertex has a normal or normal with color or texel
|
||||
if (CheckInputCommand ("n", argv, aArgIndex, 3, argc))
|
||||
anArray->SetVertexNormal (anArray->VertexNumber (),
|
||||
atof (argv[aArgIndex - 3]),
|
||||
atof (argv[aArgIndex - 2]),
|
||||
atof (argv[aArgIndex - 1]));
|
||||
Draw::Atof (argv[aArgIndex - 3]),
|
||||
Draw::Atof (argv[aArgIndex - 2]),
|
||||
Draw::Atof (argv[aArgIndex - 1]));
|
||||
|
||||
if (CheckInputCommand ("c", argv, aArgIndex, 3, argc))
|
||||
anArray->SetVertexColor (anArray->VertexNumber (),
|
||||
atof (argv[aArgIndex - 3]),
|
||||
atof (argv[aArgIndex - 2]),
|
||||
atof (argv[aArgIndex - 1]));
|
||||
Draw::Atof (argv[aArgIndex - 3]),
|
||||
Draw::Atof (argv[aArgIndex - 2]),
|
||||
Draw::Atof (argv[aArgIndex - 1]));
|
||||
|
||||
if (CheckInputCommand ("t", argv, aArgIndex, 2, argc))
|
||||
anArray->SetVertexTexel (anArray->VertexNumber (),
|
||||
atof (argv[aArgIndex - 2]),
|
||||
atof (argv[aArgIndex - 1]));
|
||||
Draw::Atof (argv[aArgIndex - 2]),
|
||||
Draw::Atof (argv[aArgIndex - 1]));
|
||||
}
|
||||
// bounds command
|
||||
else if (CheckInputCommand ("b", argv, aArgIndex, 1, argc))
|
||||
{
|
||||
Standard_Integer aVertCount = atoi (argv[aArgIndex - 1]);
|
||||
Standard_Integer aVertCount = Draw::Atoi (argv[aArgIndex - 1]);
|
||||
|
||||
if (CheckInputCommand ("c", argv, aArgIndex, 3, argc))
|
||||
anArray->AddBound (aVertCount,
|
||||
atof (argv[aArgIndex - 3]),
|
||||
atof (argv[aArgIndex - 2]),
|
||||
atof (argv[aArgIndex - 1]));
|
||||
Draw::Atof (argv[aArgIndex - 3]),
|
||||
Draw::Atof (argv[aArgIndex - 2]),
|
||||
Draw::Atof (argv[aArgIndex - 1]));
|
||||
|
||||
else
|
||||
anArray->AddBound (aVertCount);
|
||||
@@ -3416,7 +3416,7 @@ static int VDrawPArray (Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
// edge command
|
||||
else if (CheckInputCommand ("e", argv, aArgIndex, 1, argc))
|
||||
{
|
||||
Standard_Integer aVertIndex = atoi (argv[aArgIndex - 1]);
|
||||
Standard_Integer aVertIndex = Draw::Atoi (argv[aArgIndex - 1]);
|
||||
|
||||
// edge has/hasn't hide flag
|
||||
if (CheckInputCommand ("h", argv, aArgIndex, 0, argc))
|
||||
@@ -3461,9 +3461,9 @@ static Standard_Integer VSetLocation (Draw_Interpretor& di,
|
||||
}
|
||||
|
||||
TCollection_AsciiString aName (argv[1]);
|
||||
Standard_Real aX = atof (argv[2]);
|
||||
Standard_Real aY = atof (argv[3]);
|
||||
Standard_Real aZ = atof (argv[4]);
|
||||
Standard_Real aX = Draw::Atof (argv[2]);
|
||||
Standard_Real aY = Draw::Atof (argv[3]);
|
||||
Standard_Real aZ = Draw::Atof (argv[4]);
|
||||
|
||||
// find object
|
||||
ViewerTest_DoubleMapOfInteractiveAndName& aMap = GetMapOfAIS();
|
||||
@@ -3620,15 +3620,15 @@ static Standard_Integer VConnect(Draw_Interpretor& di,
|
||||
}
|
||||
|
||||
// Get location data
|
||||
Standard_Real aXo = atof (argv[anArgIter++]);
|
||||
Standard_Real aYo = atof (argv[anArgIter++]);
|
||||
Standard_Real aZo = atof (argv[anArgIter++]);
|
||||
Standard_Real aXu = atof (argv[anArgIter++]);
|
||||
Standard_Real aXv = atof (argv[anArgIter++]);
|
||||
Standard_Real aXw = atof (argv[anArgIter++]);
|
||||
Standard_Real aZu = atof (argv[anArgIter++]);
|
||||
Standard_Real aZv = atof (argv[anArgIter++]);
|
||||
Standard_Real aZw = atof (argv[anArgIter++]);
|
||||
Standard_Real aXo = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aYo = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZo = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aXu = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aXv = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aXw = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZu = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZv = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZw = Draw::Atof (argv[anArgIter++]);
|
||||
|
||||
// Create transformation
|
||||
gp_Pnt aPoint(aXo, aYo, aZo);
|
||||
@@ -3803,15 +3803,15 @@ static Standard_Integer VConnectShape(Draw_Interpretor& di,
|
||||
}
|
||||
|
||||
// Get location data
|
||||
Standard_Real aXo = atof (argv[anArgIter++]);
|
||||
Standard_Real aYo = atof (argv[anArgIter++]);
|
||||
Standard_Real aZo = atof (argv[anArgIter++]);
|
||||
Standard_Real aXu = atof (argv[anArgIter++]);
|
||||
Standard_Real aXv = atof (argv[anArgIter++]);
|
||||
Standard_Real aXw = atof (argv[anArgIter++]);
|
||||
Standard_Real aZu = atof (argv[anArgIter++]);
|
||||
Standard_Real aZv = atof (argv[anArgIter++]);
|
||||
Standard_Real aZw = atof (argv[anArgIter++]);
|
||||
Standard_Real aXo = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aYo = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZo = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aXu = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aXv = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aXw = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZu = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZv = Draw::Atof (argv[anArgIter++]);
|
||||
Standard_Real aZw = Draw::Atof (argv[anArgIter++]);
|
||||
|
||||
// Create transformation
|
||||
gp_Pnt aPoint(aXo, aYo, aZo);
|
||||
@@ -3907,8 +3907,8 @@ static Standard_Integer VSetSelectionMode(Draw_Interpretor& di,
|
||||
if(argc == 3)
|
||||
{
|
||||
// Get arguments
|
||||
Standard_Integer aMode = atoi(argv[1]);
|
||||
Standard_Boolean isTurnOn = atoi(argv[2]);
|
||||
Standard_Integer aMode = Draw::Atoi(argv[1]);
|
||||
Standard_Boolean isTurnOn = Draw::Atoi(argv[2]);
|
||||
|
||||
// Get all displayed objects
|
||||
AIS_ListOfInteractive anObjList;
|
||||
@@ -3962,8 +3962,8 @@ static Standard_Integer VSetSelectionMode(Draw_Interpretor& di,
|
||||
else
|
||||
{
|
||||
// Get argumnets
|
||||
Standard_Integer aMode = atoi(argv[2]);
|
||||
Standard_Boolean isTurnOn = atoi(argv[3]);
|
||||
Standard_Integer aMode = Draw::Atoi(argv[2]);
|
||||
Standard_Boolean isTurnOn = Draw::Atoi(argv[3]);
|
||||
TCollection_AsciiString aName(argv[1]);
|
||||
|
||||
// Check if there is an object with given name in context
|
||||
@@ -4116,9 +4116,9 @@ Standard_Boolean IsPoint (const TCollection_AsciiString& theName,
|
||||
Standard_Boolean IsMatch (const Handle(Geom_CartesianPoint)& thePoint1,
|
||||
const Handle(Geom_CartesianPoint)& thePoint2)
|
||||
{
|
||||
if(abs(thePoint1->X()-thePoint2->X()) <= Precision::Confusion() &&
|
||||
abs(thePoint1->Y()-thePoint2->Y()) <= Precision::Confusion() &&
|
||||
abs(thePoint1->Z()-thePoint2->Z()) <= Precision::Confusion())
|
||||
if(Abs(thePoint1->X()-thePoint2->X()) <= Precision::Confusion() &&
|
||||
Abs(thePoint1->Y()-thePoint2->Y()) <= Precision::Confusion() &&
|
||||
Abs(thePoint1->Z()-thePoint2->Z()) <= Precision::Confusion())
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
@@ -4380,7 +4380,7 @@ static Standard_Integer VObjZLayer (Draw_Interpretor& di,
|
||||
// process operation
|
||||
if (aOperation.IsEqual ("set"))
|
||||
{
|
||||
Standard_Integer aLayerId = atoi (argv [3]);
|
||||
Standard_Integer aLayerId = Draw::Atoi (argv [3]);
|
||||
aContext->SetZLayer (anInterObj, aLayerId);
|
||||
}
|
||||
else if (aOperation.IsEqual ("get"))
|
||||
@@ -4439,9 +4439,9 @@ static Standard_Integer VPolygonOffset(Draw_Interpretor& di,
|
||||
Standard_ShortReal aFactor, aUnits;
|
||||
if (argc == 5)
|
||||
{
|
||||
aMode = atoi(argv[2]);
|
||||
aFactor = (Standard_ShortReal) atof(argv[3]);
|
||||
aUnits = (Standard_ShortReal) atof(argv[4]);
|
||||
aMode = Draw::Atoi(argv[2]);
|
||||
aFactor = (Standard_ShortReal) Draw::Atof(argv[3]);
|
||||
aUnits = (Standard_ShortReal) Draw::Atof(argv[4]);
|
||||
|
||||
anInterObj->SetPolygonOffsets(aMode, aFactor, aUnits);
|
||||
aContext->UpdateCurrentViewer();
|
||||
@@ -4547,28 +4547,28 @@ static Standard_Integer VShowFaceBoundary (Draw_Interpretor& di,
|
||||
TheAISContext ()->DefaultDrawer () : anInterObj->Attributes ();
|
||||
|
||||
// turn boundaries on/off
|
||||
Standard_Boolean isBoundaryDraw = (atoi (argv[2]) == 1);
|
||||
Standard_Boolean isBoundaryDraw = (Draw::Atoi (argv[2]) == 1);
|
||||
aDrawer->SetFaceBoundaryDraw (isBoundaryDraw);
|
||||
|
||||
// set boundary line color
|
||||
if (argc >= 6)
|
||||
{
|
||||
// Text color
|
||||
aRed = atof (argv[3])/255.;
|
||||
aGreen = atof (argv[4])/255.;
|
||||
aBlue = atof (argv[5])/255.;
|
||||
aRed = Draw::Atof (argv[3])/255.;
|
||||
aGreen = Draw::Atof (argv[4])/255.;
|
||||
aBlue = Draw::Atof (argv[5])/255.;
|
||||
}
|
||||
|
||||
// set line width
|
||||
if (argc >= 7)
|
||||
{
|
||||
aWidth = (Standard_Real)atof (argv[6]);
|
||||
aWidth = (Standard_Real)Draw::Atof (argv[6]);
|
||||
}
|
||||
|
||||
// select appropriate line type
|
||||
if (argc == 8)
|
||||
{
|
||||
switch (atoi (argv[7]))
|
||||
switch (Draw::Atoi (argv[7]))
|
||||
{
|
||||
case 1: aLineType = Aspect_TOL_DASH; break;
|
||||
case 2: aLineType = Aspect_TOL_DOT; break;
|
||||
|
@@ -328,10 +328,10 @@ void ViewerTest::ViewerInit (const Standard_Integer thePxLeft, const Standard_I
|
||||
|
||||
static int VInit (Draw_Interpretor& , Standard_Integer argc, const char** argv)
|
||||
{
|
||||
Standard_Integer aPxLeft = (argc > 1) ? atoi (argv[1]) : 0;
|
||||
Standard_Integer aPxTop = (argc > 2) ? atoi (argv[2]) : 0;
|
||||
Standard_Integer aPxWidth = (argc > 3) ? atoi (argv[3]) : 0;
|
||||
Standard_Integer aPxHeight = (argc > 4) ? atoi (argv[4]) : 0;
|
||||
Standard_Integer aPxLeft = (argc > 1) ? Draw::Atoi (argv[1]) : 0;
|
||||
Standard_Integer aPxTop = (argc > 2) ? Draw::Atoi (argv[2]) : 0;
|
||||
Standard_Integer aPxWidth = (argc > 3) ? Draw::Atoi (argv[3]) : 0;
|
||||
Standard_Integer aPxHeight = (argc > 4) ? Draw::Atoi (argv[4]) : 0;
|
||||
ViewerTest::ViewerInit (aPxLeft, aPxTop, aPxWidth, aPxHeight);
|
||||
return 0;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ void VT_ProcessKeyPress (const char* buf_ret)
|
||||
}
|
||||
// Number
|
||||
else{
|
||||
Standard_Integer Num = atoi(buf_ret);
|
||||
Standard_Integer Num = Draw::Atoi(buf_ret);
|
||||
if(Num>=0 && Num<=7)
|
||||
ViewerTest::StandardModeActivation(Num);
|
||||
}
|
||||
@@ -1606,17 +1606,17 @@ static int VSetGradientBg(Draw_Interpretor& di, Standard_Integer argc, const cha
|
||||
if (argc == 8)
|
||||
{
|
||||
|
||||
Standard_Real R1 = atof(argv[1])/255.;
|
||||
Standard_Real G1 = atof(argv[2])/255.;
|
||||
Standard_Real B1 = atof(argv[3])/255.;
|
||||
Standard_Real R1 = Draw::Atof(argv[1])/255.;
|
||||
Standard_Real G1 = Draw::Atof(argv[2])/255.;
|
||||
Standard_Real B1 = Draw::Atof(argv[3])/255.;
|
||||
Quantity_Color aColor1(R1,G1,B1,Quantity_TOC_RGB);
|
||||
|
||||
Standard_Real R2 = atof(argv[4])/255.;
|
||||
Standard_Real G2 = atof(argv[5])/255.;
|
||||
Standard_Real B2 = atof(argv[6])/255.;
|
||||
Standard_Real R2 = Draw::Atof(argv[4])/255.;
|
||||
Standard_Real G2 = Draw::Atof(argv[5])/255.;
|
||||
Standard_Real B2 = Draw::Atof(argv[6])/255.;
|
||||
|
||||
Quantity_Color aColor2(R2,G2,B2,Quantity_TOC_RGB);
|
||||
int aType = atoi(argv[7]);
|
||||
int aType = Draw::Atoi(argv[7]);
|
||||
if( aType < 0 || aType > 8 )
|
||||
{
|
||||
di << "Wrong fill type " << "\n";
|
||||
@@ -1656,7 +1656,7 @@ static int VSetGradientBgMode(Draw_Interpretor& di, Standard_Integer argc, const
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
int aType = atoi(argv[1]);
|
||||
int aType = Draw::Atoi(argv[1]);
|
||||
if( aType < 0 || aType > 8 )
|
||||
{
|
||||
di << "Wrong fill type " << "\n";
|
||||
@@ -1696,9 +1696,9 @@ static int VSetColorBg(Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
if (argc == 4)
|
||||
{
|
||||
|
||||
Standard_Real R = atof(argv[1])/255.;
|
||||
Standard_Real G = atof(argv[2])/255.;
|
||||
Standard_Real B = atof(argv[3])/255.;
|
||||
Standard_Real R = Draw::Atof(argv[1])/255.;
|
||||
Standard_Real G = Draw::Atof(argv[2])/255.;
|
||||
Standard_Real B = Draw::Atof(argv[3])/255.;
|
||||
Quantity_Color aColor(R,G,B,Quantity_TOC_RGB);
|
||||
|
||||
Handle(V3d_View) V3dView = ViewerTest::CurrentView();
|
||||
@@ -1723,7 +1723,7 @@ static int VScale(Draw_Interpretor& di, Standard_Integer argc, const char** argv
|
||||
di << argv[0] << "Invalid number of arguments" << "\n";
|
||||
return 1;
|
||||
}
|
||||
V3dView->SetAxialScale( atof(argv[1]), atof(argv[2]), atof(argv[3]) );
|
||||
V3dView->SetAxialScale( Draw::Atof(argv[1]), Draw::Atof(argv[2]), Draw::Atof(argv[3]) );
|
||||
return 0;
|
||||
}
|
||||
//==============================================================================
|
||||
@@ -1774,12 +1774,12 @@ static int VTestZBuffTrihedron(Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Real R = atof(argv[2])/255.;
|
||||
Standard_Real G = atof(argv[3])/255.;
|
||||
Standard_Real B = atof(argv[4])/255.;
|
||||
Standard_Real R = Draw::Atof(argv[2])/255.;
|
||||
Standard_Real G = Draw::Atof(argv[3])/255.;
|
||||
Standard_Real B = Draw::Atof(argv[4])/255.;
|
||||
Quantity_Color aColor(R, G, B, Quantity_TOC_RGB);
|
||||
|
||||
Standard_Real aScale = atof(argv[5]);
|
||||
Standard_Real aScale = Draw::Atof(argv[5]);
|
||||
|
||||
if( aScale <= 0.0 )
|
||||
{
|
||||
@@ -1829,10 +1829,10 @@ static int VRotate( Draw_Interpretor& di, Standard_Integer argc, const char** ar
|
||||
}
|
||||
|
||||
if ( argc == 4 ) {
|
||||
V3dView->Rotate( atof(argv[1]), atof(argv[2]), atof(argv[3]) );
|
||||
V3dView->Rotate( Draw::Atof(argv[1]), Draw::Atof(argv[2]), Draw::Atof(argv[3]) );
|
||||
return 0;
|
||||
} else if ( argc == 7 ) {
|
||||
V3dView->Rotate( atof(argv[1]), atof(argv[2]), atof(argv[3]), atof(argv[4]), atof(argv[5]), atof(argv[6]) );
|
||||
V3dView->Rotate( Draw::Atof(argv[1]), Draw::Atof(argv[2]), Draw::Atof(argv[3]), Draw::Atof(argv[4]), Draw::Atof(argv[5]), Draw::Atof(argv[6]) );
|
||||
return 0;
|
||||
} else {
|
||||
di << argv[0] << " Invalid number of arguments" << "\n";
|
||||
@@ -1852,12 +1852,12 @@ static int VZoom( Draw_Interpretor& di, Standard_Integer argc, const char** argv
|
||||
}
|
||||
|
||||
if ( argc == 2 ) {
|
||||
Standard_Real coef = atof(argv[1]);
|
||||
Standard_Real coef = Draw::Atof(argv[1]);
|
||||
if ( coef <= 0.0 ) {
|
||||
di << argv[1] << "Invalid value" << "\n";
|
||||
return 1;
|
||||
}
|
||||
V3dView->SetZoom( atof(argv[1]) );
|
||||
V3dView->SetZoom( Draw::Atof(argv[1]) );
|
||||
return 0;
|
||||
} else {
|
||||
di << argv[0] << " Invalid number of arguments" << "\n";
|
||||
@@ -1875,7 +1875,7 @@ static int VPan( Draw_Interpretor& di, Standard_Integer argc, const char** argv
|
||||
if ( V3dView.IsNull() ) return 1;
|
||||
|
||||
if ( argc == 3 ) {
|
||||
V3dView->Pan( atoi(argv[1]), atoi(argv[2]) );
|
||||
V3dView->Pan( Draw::Atoi(argv[1]), Draw::Atoi(argv[2]) );
|
||||
return 0;
|
||||
} else {
|
||||
di << argv[0] << " Invalid number of arguments" << "\n";
|
||||
@@ -1993,18 +1993,18 @@ static int VColorScale (Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
{
|
||||
if( argc > 3 )
|
||||
{
|
||||
minRange = atof( argv[1] );
|
||||
maxRange = atof( argv[2] );
|
||||
numIntervals = atoi( argv[3] );
|
||||
minRange = Draw::Atof( argv[1] );
|
||||
maxRange = Draw::Atof( argv[2] );
|
||||
numIntervals = Draw::Atoi( argv[3] );
|
||||
}
|
||||
if ( argc > 4 )
|
||||
textHeight = atoi( argv[4] );
|
||||
textHeight = Draw::Atoi( argv[4] );
|
||||
if ( argc > 5 )
|
||||
position = (Aspect_TypeOfColorScalePosition)atoi( argv[5] );
|
||||
position = (Aspect_TypeOfColorScalePosition)Draw::Atoi( argv[5] );
|
||||
if ( argc > 7 )
|
||||
{
|
||||
X = atof( argv[6] );
|
||||
Y = atof( argv[7] );
|
||||
X = Draw::Atof( argv[6] );
|
||||
Y = Draw::Atof( argv[7] );
|
||||
}
|
||||
}
|
||||
Handle(V3d_View) curView = ViewerTest::CurrentView( );
|
||||
@@ -2068,7 +2068,7 @@ static int VGraduatedTrihedron(Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
}
|
||||
|
||||
// Erase (==0) or display (!=0)
|
||||
const int display = atoi(argv[1]);
|
||||
const int display = Draw::Atoi(argv[1]);
|
||||
|
||||
if (display)
|
||||
{
|
||||
@@ -2080,7 +2080,7 @@ static int VGraduatedTrihedron(Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
font.AssignCat(argv[5]);
|
||||
|
||||
// Text is multibyte
|
||||
const Standard_Boolean isMultibyte = (argc < 7)? Standard_False : (atoi(argv[6]) != 0);
|
||||
const Standard_Boolean isMultibyte = (argc < 7)? Standard_False : (Draw::Atoi(argv[6]) != 0);
|
||||
|
||||
// Set axis names
|
||||
TCollection_ExtendedString xname, yname, zname;
|
||||
@@ -2173,12 +2173,12 @@ static int VPrintView (Draw_Interpretor& di, Standard_Integer argc,
|
||||
}
|
||||
|
||||
// get the input params
|
||||
Standard_Integer aWidth = atoi (argv[1]);
|
||||
Standard_Integer aHeight = atoi (argv[2]);
|
||||
Standard_Integer aWidth = Draw::Atoi (argv[1]);
|
||||
Standard_Integer aHeight = Draw::Atoi (argv[2]);
|
||||
Standard_Integer aMode = 0;
|
||||
TCollection_AsciiString aFileName = TCollection_AsciiString (argv[3]);
|
||||
if (argc==5)
|
||||
aMode = atoi (argv[4]);
|
||||
aMode = Draw::Atoi (argv[4]);
|
||||
|
||||
// check the input parameters
|
||||
if (aWidth <= 0 || aHeight <= 0)
|
||||
@@ -2316,7 +2316,7 @@ static int VZLayer (Draw_Interpretor& di, Standard_Integer argc, const char** ar
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Integer aDelId = atoi (argv[2]);
|
||||
Standard_Integer aDelId = Draw::Atoi (argv[2]);
|
||||
if (!aViewer->RemoveZLayer (aDelId))
|
||||
{
|
||||
di << "Impossible to remove the z layer or invalid id!\n";
|
||||
@@ -2519,10 +2519,10 @@ static int VLayerLine(Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
}
|
||||
|
||||
// get the input params
|
||||
Standard_Real X1 = atof(argv[1]);
|
||||
Standard_Real Y1 = atof(argv[2]);
|
||||
Standard_Real X2 = atof(argv[3]);
|
||||
Standard_Real Y2 = atof(argv[4]);
|
||||
Standard_Real X1 = Draw::Atof(argv[1]);
|
||||
Standard_Real Y1 = Draw::Atof(argv[2]);
|
||||
Standard_Real X2 = Draw::Atof(argv[3]);
|
||||
Standard_Real Y2 = Draw::Atof(argv[4]);
|
||||
|
||||
Standard_Real aWidth = 0.5;
|
||||
Standard_Integer aType = 0;
|
||||
@@ -2530,16 +2530,16 @@ static int VLayerLine(Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
|
||||
// has width
|
||||
if (argc > 5)
|
||||
aWidth = atof(argv[5]);
|
||||
aWidth = Draw::Atof(argv[5]);
|
||||
|
||||
// has type
|
||||
if (argc > 6)
|
||||
aType = (Standard_Integer) atoi(argv[6]);
|
||||
aType = (Standard_Integer) Draw::Atoi(argv[6]);
|
||||
|
||||
// has transparency
|
||||
if (argc > 7)
|
||||
{
|
||||
aTransparency = atof(argv[7]);
|
||||
aTransparency = Draw::Atof(argv[7]);
|
||||
if (aTransparency < 0 || aTransparency > 1.0)
|
||||
aTransparency = 1.0;
|
||||
}
|
||||
@@ -2609,9 +2609,9 @@ static int VOverlayText (Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
}
|
||||
|
||||
TCollection_AsciiString aText (argv[1]);
|
||||
Standard_Real aPosX = atof(argv[2]);
|
||||
Standard_Real aPosY = atof(argv[3]);
|
||||
Standard_Real aHeight = (argc >= 5) ? atof (argv[4]) : 10.0;
|
||||
Standard_Real aPosX = Draw::Atof(argv[2]);
|
||||
Standard_Real aPosY = Draw::Atof(argv[3]);
|
||||
Standard_Real aHeight = (argc >= 5) ? Draw::Atof (argv[4]) : 10.0;
|
||||
|
||||
// font name
|
||||
TCollection_AsciiString aFontName = "Courier";
|
||||
@@ -2624,9 +2624,9 @@ static int VOverlayText (Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
Quantity_Parameter aColorBlue = 1.0;
|
||||
if (argc >= 9)
|
||||
{
|
||||
aColorRed = atof (argv[6])/255.;
|
||||
aColorGreen = atof (argv[7])/255.;
|
||||
aColorBlue = atof (argv[8])/255.;
|
||||
aColorRed = Draw::Atof (argv[6])/255.;
|
||||
aColorGreen = Draw::Atof (argv[7])/255.;
|
||||
aColorBlue = Draw::Atof (argv[8])/255.;
|
||||
}
|
||||
|
||||
// display type
|
||||
@@ -2648,9 +2648,9 @@ static int VOverlayText (Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
Quantity_Parameter aSubBlue = 1.0;
|
||||
if (argc == 13)
|
||||
{
|
||||
aSubRed = atof (argv[10])/255.;
|
||||
aSubGreen = atof (argv[11])/255.;
|
||||
aSubBlue = atof (argv[12])/255.;
|
||||
aSubRed = Draw::Atof (argv[10])/255.;
|
||||
aSubGreen = Draw::Atof (argv[11])/255.;
|
||||
aSubBlue = Draw::Atof (argv[12])/255.;
|
||||
}
|
||||
|
||||
// check fo current overlay
|
||||
@@ -2750,13 +2750,13 @@ static int VGrid (Draw_Interpretor& theDI,
|
||||
Quantity_Length aRStepX, aRStepY;
|
||||
aViewer->RectangularGridValues (anOriginX, anOriginY, aRStepX, aRStepY, aRotAngle);
|
||||
|
||||
anOriginX = atof (theArgVec[anIter++]);
|
||||
anOriginY = atof (theArgVec[anIter++]);
|
||||
anOriginX = Draw::Atof (theArgVec[anIter++]);
|
||||
anOriginY = Draw::Atof (theArgVec[anIter++]);
|
||||
if (aTail == 5)
|
||||
{
|
||||
aRStepX = atof (theArgVec[anIter++]);
|
||||
aRStepY = atof (theArgVec[anIter++]);
|
||||
aRotAngle = atof (theArgVec[anIter++]);
|
||||
aRStepX = Draw::Atof (theArgVec[anIter++]);
|
||||
aRStepY = Draw::Atof (theArgVec[anIter++]);
|
||||
aRotAngle = Draw::Atof (theArgVec[anIter++]);
|
||||
}
|
||||
aViewer->SetRectangularGridValues (anOriginX, anOriginY, aRStepX, aRStepY, aRotAngle);
|
||||
aViewer->ActivateGrid (aType, aMode);
|
||||
@@ -2767,13 +2767,13 @@ static int VGrid (Draw_Interpretor& theDI,
|
||||
Standard_Integer aDivisionNumber;
|
||||
aViewer->CircularGridValues (anOriginX, anOriginY, aRadiusStep, aDivisionNumber, aRotAngle);
|
||||
|
||||
anOriginX = atof (theArgVec[anIter++]);
|
||||
anOriginY = atof (theArgVec[anIter++]);
|
||||
anOriginX = Draw::Atof (theArgVec[anIter++]);
|
||||
anOriginY = Draw::Atof (theArgVec[anIter++]);
|
||||
if (aTail == 5)
|
||||
{
|
||||
aRadiusStep = atof (theArgVec[anIter++]);
|
||||
aDivisionNumber = atoi (theArgVec[anIter++]);
|
||||
aRotAngle = atof (theArgVec[anIter++]);
|
||||
aRadiusStep = Draw::Atof (theArgVec[anIter++]);
|
||||
aDivisionNumber = Draw::Atoi (theArgVec[anIter++]);
|
||||
aRotAngle = Draw::Atof (theArgVec[anIter++]);
|
||||
}
|
||||
|
||||
aViewer->SetCircularGridValues (anOriginX, anOriginY, aRadiusStep, aDivisionNumber, aRotAngle);
|
||||
@@ -2800,7 +2800,7 @@ static int VFps (Draw_Interpretor& theDI,
|
||||
return 1;
|
||||
}
|
||||
|
||||
Standard_Integer aFramesNb = (theArgNb > 1) ? atoi(theArgVec[1]) : 100;
|
||||
Standard_Integer aFramesNb = (theArgNb > 1) ? Draw::Atoi(theArgVec[1]) : 100;
|
||||
if (aFramesNb <= 0)
|
||||
{
|
||||
std::cerr << "Incorrect arguments!\n";
|
||||
@@ -2867,7 +2867,7 @@ static int VVbo (Draw_Interpretor& theDI,
|
||||
return 1;
|
||||
}
|
||||
|
||||
aDriver->EnableVBO (atoi(theArgVec[1]) != 0);
|
||||
aDriver->EnableVBO (Draw::Atoi(theArgVec[1]) != 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2942,8 +2942,8 @@ static int VReadPixel (Draw_Interpretor& theDI,
|
||||
|
||||
Standard_Integer aWidth, aHeight;
|
||||
aView->Window()->Size (aWidth, aHeight);
|
||||
const Standard_Integer anX = atoi (theArgVec[1]);
|
||||
const Standard_Integer anY = atoi (theArgVec[2]);
|
||||
const Standard_Integer anX = Draw::Atoi (theArgVec[1]);
|
||||
const Standard_Integer anY = Draw::Atoi (theArgVec[2]);
|
||||
if (anX < 0 || anX >= aWidth || anY < 0 || anY > aHeight)
|
||||
{
|
||||
std::cerr << "Pixel coordinates (" << anX << "; " << anY << ") are out of view (" << aWidth << " x " << aHeight << ")\n";
|
||||
@@ -3068,14 +3068,14 @@ static int VDiffImage (Draw_Interpretor& theDI, Standard_Integer theArgNb, const
|
||||
const char* anImgPathNew = theArgVec[2];
|
||||
|
||||
// get string tolerance and check its validity
|
||||
Standard_Real aTolColor = atof (theArgVec[3]);
|
||||
Standard_Real aTolColor = Draw::Atof (theArgVec[3]);
|
||||
if (aTolColor < 0.0)
|
||||
aTolColor = 0.0;
|
||||
if (aTolColor > 1.0)
|
||||
aTolColor = 1.0;
|
||||
|
||||
Standard_Boolean toBlackWhite = (atoi (theArgVec[4]) == 1);
|
||||
Standard_Boolean isBorderFilterOn = (atoi (theArgVec[5]) == 1);
|
||||
Standard_Boolean toBlackWhite = (Draw::Atoi (theArgVec[4]) == 1);
|
||||
Standard_Boolean isBorderFilterOn = (Draw::Atoi (theArgVec[5]) == 1);
|
||||
|
||||
// image file of difference
|
||||
const char* aDiffImagePath = (theArgNb >= 7) ? theArgVec[6] : NULL;
|
||||
|
Reference in New Issue
Block a user