42cf5bc1 |
1 | // Created on: 1995-02-07 |
2 | // Created by: Jacques GOUSSARD |
3 | // Copyright (c) 1995-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 _GeomInt_LineConstructor_HeaderFile |
18 | #define _GeomInt_LineConstructor_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <TColStd_SequenceOfReal.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | #include <Standard_Real.hxx> |
28 | class Adaptor3d_TopolTool; |
29 | class GeomAdaptor_HSurface; |
30 | class StdFail_NotDone; |
31 | class Standard_OutOfRange; |
32 | class IntPatch_Line; |
33 | |
34 | |
35 | //! Splits given Line. |
36 | class GeomInt_LineConstructor |
37 | { |
38 | public: |
39 | |
40 | DEFINE_STANDARD_ALLOC |
41 | |
42 | |
43 | |
44 | //! Empty constructor |
45 | GeomInt_LineConstructor(); |
46 | |
47 | |
48 | //! Initializes me by two surfaces and corresponding |
49 | //! tools which represent boundaries of surfaces |
50 | void Load (const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_TopolTool)& D2, const Handle(GeomAdaptor_HSurface)& S1, const Handle(GeomAdaptor_HSurface)& S2); |
51 | |
52 | |
53 | //! Splits line |
54 | Standard_EXPORT void Perform (const Handle(IntPatch_Line)& L); |
55 | |
56 | |
57 | //! Returns True if splitting was successful |
58 | Standard_Boolean IsDone() const; |
59 | |
60 | |
61 | //! Returns number of splits |
62 | Standard_Integer NbParts() const; |
63 | |
64 | |
65 | //! Return first and last parameters |
66 | //! for given index of split |
67 | void Part (const Standard_Integer I, Standard_Real& WFirst, Standard_Real& WLast) const; |
68 | |
69 | |
70 | |
71 | |
72 | protected: |
73 | |
74 | |
75 | Standard_EXPORT void TreatCircle (const Handle(IntPatch_Line)& aLine, const Standard_Real aTol); |
76 | |
77 | |
78 | |
79 | |
80 | private: |
81 | |
82 | |
83 | |
84 | Standard_Boolean done; |
85 | TColStd_SequenceOfReal seqp; |
86 | Handle(Adaptor3d_TopolTool) myDom1; |
87 | Handle(Adaptor3d_TopolTool) myDom2; |
88 | Handle(GeomAdaptor_HSurface) myHS1; |
89 | Handle(GeomAdaptor_HSurface) myHS2; |
90 | |
91 | |
92 | }; |
93 | |
94 | |
95 | #include <GeomInt_LineConstructor.lxx> |
96 | |
97 | |
98 | |
99 | |
100 | |
101 | #endif // _GeomInt_LineConstructor_HeaderFile |