1 // Created on: 1993-06-23
2 // Created by: Jean Yves LEBEY
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.
19 #include <TopoDS_Shape.hxx>
20 #include <TopOpeBRepDS_Point.hxx>
21 #include <TopOpeBRepTool_ShapeTool.hxx>
23 //=======================================================================
24 //function : TopOpeBRepDS_Point
26 //=======================================================================
27 TopOpeBRepDS_Point::TopOpeBRepDS_Point()
28 : myKeep(Standard_True)
33 //=======================================================================
34 //function : TopOpeBRepDS_Point
36 //=======================================================================
38 TopOpeBRepDS_Point::TopOpeBRepDS_Point(const gp_Pnt& P,
39 const Standard_Real T)
47 //=======================================================================
48 //function : TopOpeBRepDS_Point
50 //=======================================================================
52 TopOpeBRepDS_Point::TopOpeBRepDS_Point(const TopoDS_Shape& S)
54 myPoint = TopOpeBRepTool_ShapeTool::Pnt(S);
55 myTolerance = TopOpeBRepTool_ShapeTool::Tolerance(S);
59 //=======================================================================
62 //=======================================================================
64 Standard_Boolean TopOpeBRepDS_Point::IsEqual(const TopOpeBRepDS_Point& P) const
66 Standard_Real t = Max(myTolerance,P.Tolerance());
67 Standard_Boolean b = myPoint.IsEqual(P.Point(),t);
72 //=======================================================================
75 //=======================================================================
77 const gp_Pnt& TopOpeBRepDS_Point::Point()const
82 //=======================================================================
83 //function : ChangePoint
85 //=======================================================================
87 gp_Pnt& TopOpeBRepDS_Point::ChangePoint()
93 //=======================================================================
94 //function : Tolerance
96 //=======================================================================
98 Standard_Real TopOpeBRepDS_Point::Tolerance()const
103 //=======================================================================
104 //function : Tolerance
106 //=======================================================================
108 void TopOpeBRepDS_Point::Tolerance(const Standard_Real Tol)
113 //=======================================================================
116 //=======================================================================
118 Standard_Boolean TopOpeBRepDS_Point::Keep() const
122 //=======================================================================
123 //function : ChangeKeep
125 //=======================================================================
127 void TopOpeBRepDS_Point::ChangeKeep(const Standard_Boolean b)