// Created on: 1996-10-09
// Created by: Philippe MANGIN
// Copyright (c) 1996-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.
-
-#include <GeometryTest.ixx>
-
#include <Draw.hxx>
+#include <DrawFairCurve_Batten.hxx>
+#include <DrawFairCurve_MinimalVariation.hxx>
#include <DrawTrSurf.hxx>
#include <DrawTrSurf_Point.hxx>
-#include <gp_Pnt2d.hxx>
#include <FairCurve_AnalysisCode.hxx>
#include <FairCurve_Batten.hxx>
#include <FairCurve_MinimalVariation.hxx>
-#include <DrawFairCurve_Batten.hxx>
-#include <DrawFairCurve_MinimalVariation.hxx>
-#include <string.h>
+#include <GeometryTest.hxx>
+#include <gp_Pnt2d.hxx>
+#include <string.h>
//=======================================================================
Standard_Boolean IsGoodNumber(Standard_Integer argc, Standard_Integer waiting, Draw_Interpretor& di)
//=======================================================================
// argc vaut 1 de plus, puisque argv[0] contient le nom de la commande
if (argc != (waiting+1))
{
- di << "Waiting "<< waiting << " arguments" << "\n";
+ di << "Waiting "<< waiting << " arguments\n";
return Standard_False;
}
else
const char *cheigth = argv[5];
const char *BattenName = argv[6];
- 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;
Bat->SetAngle1(a1*M_PI/180);
Bat->SetAngle2(a2*M_PI/180);
- Ok = Bat->Compute(Iana);
+ Bat->Compute(Iana);
Handle(DrawFairCurve_Batten) aBatten = new DrawFairCurve_Batten(Bat);
if (aBatten.IsNull()) {
- di << " Batten null "<< "\n";
+ di << " Batten null \n";
return 1;
}
Draw::Set(BattenName,aBatten);
const char *cheigth = argv[5];
const char *MVCName = argv[6];
- 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;
MVC->SetAngle1(a1*M_PI/180);
MVC->SetAngle2(a2*M_PI/180);
- Ok = MVC->Compute(Iana);
+ MVC->Compute(Iana);
Handle(DrawFairCurve_MinimalVariation) aMVC = new DrawFairCurve_MinimalVariation(MVC);
if (aMVC.IsNull()) {
- di << " MVC null "<< "\n";
+ di << " MVC null \n";
return 1;
}
Draw::Set(MVCName, aMVC);
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));
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));
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));
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));
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));
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));
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));
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));
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));