-// File: TopOpeBRep_FFTransitionTool.cxx
-// Created: Thu Oct 27 11:14:38 1994
-// Author: Jean Yves LEBEY
-// <jyl@bravox>
+// Created on: 1994-10-27
+// Created by: Jean Yves LEBEY
+// Copyright (c) 1994-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// 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.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
-#include <TopOpeBRepDS_SolidSurfaceInterference.hxx>
-#include <TopOpeBRepDS_CurvePointInterference.hxx>
-#include <TopOpeBRepDS_SurfaceCurveInterference.hxx>
-#include <TopAbs.hxx>
-#include <IntSurf_Transition.hxx>
-#include <IntSurf_TypeTrans.hxx>
-#include <IntSurf_Situation.hxx>
-#include <TopOpeBRep_FFTransitionTool.ixx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS.hxx>
#include <BRep_Tool.hxx>
-#include <Geom_Surface.hxx>
#include <Geom_Curve.hxx>
+#include <Geom_Surface.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <gp_Vec.hxx>
-
-#ifdef DEB
-Standard_IMPORT Standard_Boolean TopOpeBRepDS_GettraceDSF();
-#endif
+#include <IntSurf_Situation.hxx>
+#include <IntSurf_Transition.hxx>
+#include <IntSurf_TypeTrans.hxx>
+#include <TopAbs.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopOpeBRep_FFTransitionTool.hxx>
+#include <TopOpeBRep_LineInter.hxx>
+#include <TopOpeBRep_VPointInter.hxx>
+#include <TopOpeBRepDS_CurvePointInterference.hxx>
+#include <TopOpeBRepDS_SolidSurfaceInterference.hxx>
+#include <TopOpeBRepDS_SurfaceCurveInterference.hxx>
+#include <TopOpeBRepDS_Transition.hxx>
//-----------------------------------------------------------------------
//function : TransitionToOrientation
case IntSurf_Outside : result = TopAbs_EXTERNAL; break;
case IntSurf_Unknown :
Odefined = Standard_False;
-#ifdef DEB
-// if ( TopOpeBRepDS_GettraceDSF() ) {
-// cout<<"TopOpeBRepDS:TransitionToOrientation : unknown situation"<<endl;
-// }
-#endif
break;
}
break;
case IntSurf_Undecided :
Odefined = Standard_False;
-#ifdef DEB
-// if ( TopOpeBRepDS_GettraceDSF() ) {
-// cout<<"TopOpeBRepDS:TransitionToOrientation : undecided transition"<<endl;
-// }
-#endif
break;
}
}
else {
Standard_Boolean Odefined = Standard_True;
-#ifdef DEB
- TopAbs_Orientation O;
-#else
+
TopAbs_Orientation O = TopAbs_FORWARD;
-#endif
IntSurf_TypeTrans trans;
trans = (Index == 1) ? L.TransitionOnS1() : L.TransitionOnS2();
case IntSurf_Unknown :
Odefined = Standard_False;
-#ifdef DEB
- if ( TopOpeBRepDS_GettraceDSF() ) {
- cout<<"ProcessFaceTransition : unknown situation"<<endl;
- }
-#endif
break;
}
break;
} // case Touch
case IntSurf_Undecided :
-
- Odefined = Standard_False;
-#ifdef DEB
- if ( TopOpeBRepDS_GettraceDSF() ) {
- cout<<"ProcessFaceTransition : undecided transition"<<endl;
- }
-#endif
- break;
+ Odefined = Standard_False;
+ break;
} // trans
if ( C2.IsNull() ) {
return Standard_False;
}
- Standard_Real res = Standard_False;
-
+
GeomAPI_ProjectPointOnCurve mydist(P1,C2,FC2,LC2);
if ( mydist.Extrema().IsDone() ) {
if ( mydist.NbPoints() ) {
T2 = mydist.LowerDistanceParameter();
- res = Standard_True;
+ return Standard_True;
}
}
-//#ifdef DEB
-// return res; // BUG ???
-//#else
- return (Standard_Boolean ) res ;
-//#endif
+ return Standard_False;
}
// -------------------------------------------------
gp_Pnt P1; gp_Vec D1_C1; C1->D1(T1,P1,D1_C1);
// D1_C2 : D1(C2(P1))
- Standard_Real T2;
+ Standard_Real T2 = 0.0;
Standard_Boolean projok = ::FUN_ProjectPoint(P1,C2,FC2,LC2,T2);
if ( !projok ) {
return Standard_False;
TopAbs_Orientation oriE = E.Orientation();
const Handle(Geom_Surface)& S = BRep_Tool::Surface(F);
- Standard_Real U,V;
+ Standard_Real U = 0.,V = 0.;
if (ShapeIndex == 1) VP.ParametersOnS1(U,V);
else if (ShapeIndex == 2) VP.ParametersOnS2(U,V);