0024428: Implementation of LGPL license
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_NormalProjection.cxx
1 // Created on: 1997-10-13
2 // Created by: Roman BORISOV
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and / or modify it
9 // under the terms of the GNU Lesser General Public 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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <BRepOffsetAPI_NormalProjection.ixx>
18
19 BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection()
20 {
21 }
22
23  BRepOffsetAPI_NormalProjection::BRepOffsetAPI_NormalProjection(const TopoDS_Shape& S)
24 {
25   myNormalProjector.Init(S);
26 }
27
28  void BRepOffsetAPI_NormalProjection::Init(const TopoDS_Shape& S) 
29 {
30   myNormalProjector.Init(S);
31 }
32
33  void BRepOffsetAPI_NormalProjection::Add(const TopoDS_Shape& ToProj) 
34 {
35   myNormalProjector.Add(ToProj);
36 }
37
38  void BRepOffsetAPI_NormalProjection::SetParams(const Standard_Real Tol3D,const Standard_Real Tol2D,const GeomAbs_Shape InternalContinuity,const Standard_Integer MaxDegree,const Standard_Integer MaxSeg) 
39 {
40   myNormalProjector.SetParams(Tol3D, Tol2D, InternalContinuity, MaxDegree, MaxSeg);
41 }
42
43  void BRepOffsetAPI_NormalProjection::SetMaxDistance(const Standard_Real MaxDist)
44 {
45   myNormalProjector.SetMaxDistance(MaxDist);
46 }
47
48  void BRepOffsetAPI_NormalProjection::SetLimit(const Standard_Boolean FaceBounds)
49 {
50   myNormalProjector.SetLimit(FaceBounds);
51 }
52
53  void BRepOffsetAPI_NormalProjection::Compute3d(const Standard_Boolean With3d)
54 {
55   myNormalProjector.Compute3d(With3d);
56 }
57
58  void BRepOffsetAPI_NormalProjection::Build() 
59 {
60   myNormalProjector.Build();
61   myShape = myNormalProjector.Projection();
62   Done();
63 }
64
65  Standard_Boolean BRepOffsetAPI_NormalProjection::IsDone() const
66 {
67   return myNormalProjector.IsDone();
68 }
69
70  const TopoDS_Shape& BRepOffsetAPI_NormalProjection::Couple(const TopoDS_Edge& E) const
71 {
72   return myNormalProjector.Couple(E);
73 }
74
75  const TopTools_ListOfShape& BRepOffsetAPI_NormalProjection::Generated(const TopoDS_Shape& S)
76 {
77   return myNormalProjector.Generated(S);
78 }
79
80  const TopoDS_Shape& BRepOffsetAPI_NormalProjection::Projection() const
81 {
82   return myNormalProjector.Projection();
83 }
84
85  const TopoDS_Shape& BRepOffsetAPI_NormalProjection::Ancestor(const TopoDS_Edge& E) const
86 {
87   return myNormalProjector.Ancestor(E);
88 }
89
90 //=======================================================================
91 //function : BuildWire
92 //purpose  : 
93 //=======================================================================
94  
95  Standard_Boolean BRepOffsetAPI_NormalProjection::BuildWire(TopTools_ListOfShape& ListOfWire) const
96 {
97   return myNormalProjector.BuildWire(ListOfWire);
98 }