-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include <IntTools_Tools.hxx>
-#include <BOPTools_Tools3D.hxx>
-#include <BOPTools_Tools2D.hxx>
+#include <GEOMAlgo_AlgoTools.hxx>
gp_Pnt aPx;
gp_Pnt2d aP2Dx;
gp_Vec aDNx;
-
TopoDS_Face aF;
TopExp_Explorer aExp;
//
aCoef=10.;
//
aExp.Init (aZ, TopAbs_FACE);
- for (; aExp.More() ; aExp.Next()) {
+ if (aExp.More()) {
aF=*((TopoDS_Face*)&aExp.Current());
- break;
}
//
iErr=PntInFace(aF, aPx, aP2Dx);
}
//
aP2Dx.Coord(aUx, aVx);
- BOPTools_Tools2D::FaceNormal(aF, aUx, aVx, aDNx);
+ GEOMAlgo_AlgoTools::FaceNormal(aF, aUx, aVx, aDNx);
aDNx.Reverse();
//
aP.SetXYZ(aPx.XYZ()+aCoef*aTol*aDNx.XYZ());
//
// 4.
aNbDomains=aHatcher.NbDomains(aIx);
- for (i=1; i<=aNbDomains; ++i) {
- const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
- bHasFirstPoint=aDomain.HasFirstPoint();
- if (!bHasFirstPoint) {
- iErr=5;
- return iErr;
- }
- //
- aV1=aDomain.FirstPoint().Parameter();
- //
- bHasSecondPoint=aDomain.HasSecondPoint();
- if (!bHasSecondPoint) {
- iErr=6;
- return iErr;
- }
- //
- aV2=aDomain.SecondPoint().Parameter();
- //
- aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
- //
- break;
+ if (!aNbDomains) {
+ iErr=5;
+ return iErr;
+ }
+ //
+ i=1;
+ const HatchGen_Domain& aDomain=aHatcher.Domain (aIx, i) ;
+ bHasFirstPoint=aDomain.HasFirstPoint();
+ if (!bHasFirstPoint) {
+ iErr=5;
+ return iErr;
+ }
+ //
+ aV1=aDomain.FirstPoint().Parameter();
+ //
+ bHasSecondPoint=aDomain.HasSecondPoint();
+ if (!bHasSecondPoint) {
+ iErr=6;
+ return iErr;
}
//
+ aV2=aDomain.SecondPoint().Parameter();
+ //
+ aVx=IntTools_Tools::IntermediatePoint(aV1, aV2);
+ //
aS->D0(aUx, aVx, aPx);
//
theP2D.SetCoord(aUx, aVx);