42cf5bc1 |
1 | // Created on: 1993-02-22 |
2 | // Created by: Jacques GOUSSARD |
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 _IntSurf_LineOn2S_HeaderFile |
18 | #define _IntSurf_LineOn2S_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
92a55b01 |
23 | #include <Bnd_Box.hxx> |
24 | #include <Bnd_Box2d.hxx> |
42cf5bc1 |
25 | #include <IntSurf_SequenceOfPntOn2S.hxx> |
25e59720 |
26 | #include <Standard_Transient.hxx> |
42cf5bc1 |
27 | #include <IntSurf_Allocator.hxx> |
28 | #include <Standard_Integer.hxx> |
29 | #include <Standard_Boolean.hxx> |
30 | #include <Standard_Real.hxx> |
31 | class Standard_OutOfRange; |
32 | class IntSurf_PntOn2S; |
33 | |
34 | |
35 | class IntSurf_LineOn2S; |
25e59720 |
36 | DEFINE_STANDARD_HANDLE(IntSurf_LineOn2S, Standard_Transient) |
42cf5bc1 |
37 | |
38 | |
25e59720 |
39 | class IntSurf_LineOn2S : public Standard_Transient |
42cf5bc1 |
40 | { |
41 | |
42 | public: |
43 | |
44 | |
45 | Standard_EXPORT IntSurf_LineOn2S(const IntSurf_Allocator& theAllocator = 0); |
46 | |
47 | //! Adds a point in the line. |
48 | void Add (const IntSurf_PntOn2S& P); |
49 | |
50 | //! Returns the number of points in the line. |
51 | Standard_Integer NbPoints() const; |
52 | |
53 | //! Returns the point of range Index in the line. |
54 | const IntSurf_PntOn2S& Value (const Standard_Integer Index) const; |
55 | |
56 | //! Reverses the order of points of the line. |
57 | void Reverse(); |
58 | |
59 | //! Keeps in <me> the points 1 to Index-1, and returns |
60 | //! the items Index to the end. |
61 | Standard_EXPORT Handle(IntSurf_LineOn2S) Split (const Standard_Integer Index); |
62 | |
63 | //! Replaces the point of range Index in the line. |
64 | void Value (const Standard_Integer Index, const IntSurf_PntOn2S& P); |
65 | |
66 | //! Sets the parametric coordinates on one of the surfaces |
67 | //! of the point of range Index in the line. |
68 | void SetUV (const Standard_Integer Index, const Standard_Boolean OnFirst, const Standard_Real U, const Standard_Real V); |
69 | |
70 | void Clear(); |
71 | |
72 | Standard_EXPORT void InsertBefore (const Standard_Integer I, const IntSurf_PntOn2S& P); |
73 | |
74 | Standard_EXPORT void RemovePoint (const Standard_Integer I); |
75 | |
92a55b01 |
76 | //! Returns TRUE if theP is out of the box built from |
77 | //! the points on 1st surface |
78 | Standard_EXPORT Standard_Boolean IsOutSurf1Box(const gp_Pnt2d& theP); |
42cf5bc1 |
79 | |
92a55b01 |
80 | //! Returns TRUE if theP is out of the box built from |
81 | //! the points on 2nd surface |
82 | Standard_EXPORT Standard_Boolean IsOutSurf2Box(const gp_Pnt2d& theP); |
42cf5bc1 |
83 | |
92a55b01 |
84 | //! Returns TRUE if theP is out of the box built from 3D-points. |
85 | Standard_EXPORT Standard_Boolean IsOutBox(const gp_Pnt& theP); |
42cf5bc1 |
86 | |
25e59720 |
87 | DEFINE_STANDARD_RTTIEXT(IntSurf_LineOn2S,Standard_Transient) |
42cf5bc1 |
88 | |
89 | protected: |
90 | |
91 | |
92 | |
93 | |
94 | private: |
95 | |
96 | |
97 | IntSurf_SequenceOfPntOn2S mySeq; |
92a55b01 |
98 | Bnd_Box2d myBuv1; |
99 | Bnd_Box2d myBuv2; |
100 | Bnd_Box myBxyz; |
42cf5bc1 |
101 | |
102 | }; |
103 | |
104 | |
105 | #include <IntSurf_LineOn2S.lxx> |
106 | |
107 | |
108 | |
109 | |
110 | |
111 | #endif // _IntSurf_LineOn2S_HeaderFile |