42cf5bc1 |
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 |
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 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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _TopOpeBRepDS_Curve_HeaderFile |
18 | #define _TopOpeBRepDS_Curve_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <TopoDS_Shape.hxx> |
27 | #include <Standard_Integer.hxx> |
28 | #include <Standard_OStream.hxx> |
29 | class Geom_Curve; |
30 | class TopOpeBRepDS_Interference; |
31 | class TopoDS_Shape; |
32 | class Geom2d_Curve; |
33 | |
34 | |
35 | //! A Geom curve and a tolerance. |
36 | class TopOpeBRepDS_Curve |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | Standard_EXPORT TopOpeBRepDS_Curve(); |
44 | |
45 | Standard_EXPORT TopOpeBRepDS_Curve(const Handle(Geom_Curve)& P, const Standard_Real T, const Standard_Boolean IsWalk = Standard_False); |
46 | |
47 | Standard_EXPORT void DefineCurve (const Handle(Geom_Curve)& P, const Standard_Real T, const Standard_Boolean IsWalk); |
48 | |
49 | //! Update the tolerance |
50 | Standard_EXPORT void Tolerance (const Standard_Real tol); |
51 | |
52 | //! define the interferences face/curve. |
53 | Standard_EXPORT void SetSCI (const Handle(TopOpeBRepDS_Interference)& I1, const Handle(TopOpeBRepDS_Interference)& I2); |
54 | |
55 | Standard_EXPORT const Handle(TopOpeBRepDS_Interference)& GetSCI1() const; |
56 | |
57 | Standard_EXPORT const Handle(TopOpeBRepDS_Interference)& GetSCI2() const; |
58 | |
59 | Standard_EXPORT void GetSCI (Handle(TopOpeBRepDS_Interference)& I1, Handle(TopOpeBRepDS_Interference)& I2) const; |
60 | |
61 | Standard_EXPORT void SetShapes (const TopoDS_Shape& S1, const TopoDS_Shape& S2); |
62 | |
63 | Standard_EXPORT void GetShapes (TopoDS_Shape& S1, TopoDS_Shape& S2) const; |
64 | |
65 | Standard_EXPORT const TopoDS_Shape& Shape1() const; |
66 | |
67 | Standard_EXPORT TopoDS_Shape& ChangeShape1(); |
68 | |
69 | Standard_EXPORT const TopoDS_Shape& Shape2() const; |
70 | |
71 | Standard_EXPORT TopoDS_Shape& ChangeShape2(); |
72 | |
73 | Standard_EXPORT const Handle(Geom_Curve)& Curve() const; |
74 | |
75 | Standard_EXPORT void SetRange (const Standard_Real First, const Standard_Real Last); |
76 | |
77 | Standard_EXPORT Standard_Boolean Range (Standard_Real& First, Standard_Real& Last) const; |
78 | |
79 | Standard_EXPORT Standard_Real Tolerance() const; |
80 | |
81 | Standard_EXPORT Handle(Geom_Curve)& ChangeCurve(); |
82 | |
83 | Standard_EXPORT void Curve (const Handle(Geom_Curve)& C3D, const Standard_Real Tol); |
84 | |
85 | Standard_EXPORT const Handle(Geom2d_Curve)& Curve1() const; |
86 | |
87 | Standard_EXPORT void Curve1 (const Handle(Geom2d_Curve)& PC1); |
88 | |
89 | Standard_EXPORT const Handle(Geom2d_Curve)& Curve2() const; |
90 | |
91 | Standard_EXPORT void Curve2 (const Handle(Geom2d_Curve)& PC2); |
92 | |
93 | Standard_EXPORT Standard_Boolean IsWalk() const; |
94 | |
95 | Standard_EXPORT void ChangeIsWalk (const Standard_Boolean B); |
96 | |
97 | Standard_EXPORT Standard_Boolean Keep() const; |
98 | |
99 | Standard_EXPORT void ChangeKeep (const Standard_Boolean B); |
100 | |
101 | Standard_EXPORT Standard_Integer Mother() const; |
102 | |
103 | Standard_EXPORT void ChangeMother (const Standard_Integer I); |
104 | |
105 | Standard_EXPORT Standard_Integer DSIndex() const; |
106 | |
107 | Standard_EXPORT void ChangeDSIndex (const Standard_Integer I); |
42cf5bc1 |
108 | |
109 | |
110 | |
111 | |
112 | protected: |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | private: |
119 | |
120 | |
121 | |
122 | Handle(Geom_Curve) myCurve; |
123 | Standard_Real myFirst; |
124 | Standard_Real myLast; |
125 | Standard_Boolean myRangeDefined; |
126 | Standard_Real myTolerance; |
127 | Standard_Boolean myIsWalk; |
128 | TopoDS_Shape myS1; |
129 | TopoDS_Shape myS2; |
130 | Handle(TopOpeBRepDS_Interference) mySCI1; |
131 | Handle(TopOpeBRepDS_Interference) mySCI2; |
132 | Standard_Boolean myKeep; |
133 | Standard_Integer myMother; |
134 | Standard_Integer myDSIndex; |
135 | |
136 | |
137 | }; |
138 | |
139 | |
140 | |
141 | |
142 | |
143 | |
144 | |
145 | #endif // _TopOpeBRepDS_Curve_HeaderFile |