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