1 // Created on: 1993-06-03
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <StdFail_UndefinedDerivative.hxx>
19 inline void Contap_SurfFunction::Set(const gp_Pnt& Eye)
21 myType = Contap_ContourPrs; // pers
26 inline void Contap_SurfFunction::Set(const gp_Dir& Direction)
28 myType = Contap_ContourStd; // Contour app
33 inline void Contap_SurfFunction::Set(const gp_Dir& Direction,
34 const Standard_Real Angle)
36 myType = Contap_DraftStd; // Contour vu
39 myCosAng = Cos(M_PI/2.+Angle);
42 inline void Contap_SurfFunction::Set(const gp_Pnt& Eye,
43 const Standard_Real Angle)
45 myType = Contap_DraftPrs; // Contour vu "conique"...
48 myCosAng = Cos(M_PI/2.+Angle);
51 inline void Contap_SurfFunction::Set(const Standard_Real Tolerance)
53 tol = Max(Tolerance, 1.e-12);
56 inline const gp_Pnt& Contap_SurfFunction::Point () const
61 inline Standard_Real Contap_SurfFunction::Root () const
66 inline Standard_Real Contap_SurfFunction::Tolerance () const
71 inline const gp_Vec& Contap_SurfFunction::Direction3d()
73 if (IsTangent()) StdFail_UndefinedDerivative::Raise();
77 inline const gp_Dir2d& Contap_SurfFunction::Direction2d()
79 if (IsTangent()) StdFail_UndefinedDerivative::Raise();
83 inline const TheSurface& Contap_SurfFunction::Surface() const
88 inline const gp_Pnt& Contap_SurfFunction::Eye() const
93 inline const gp_Dir& Contap_SurfFunction::Direction() const
98 inline Standard_Real Contap_SurfFunction::Angle () const
103 inline Contap_TFunction Contap_SurfFunction::FunctionType () const