0026850: Replace nested instantiations of TCollection generic classes by NCollection...
[occt.git] / src / Contap / Contap_TheSearch.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-02-05
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 _Contap_TheSearch_HeaderFile
18#define _Contap_TheSearch_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <Contap_SequenceOfSegmentOfTheSearch.hxx>
26#include <Contap_SequenceOfPathPointOfTheSearch.hxx>
27#include <Standard_Real.hxx>
28#include <Standard_Integer.hxx>
29class StdFail_NotDone;
30class Standard_OutOfRange;
31class Standard_ConstructionError;
32class Adaptor3d_HVertex;
33class Adaptor2d_HCurve2d;
34class Contap_HCurve2dTool;
35class Contap_HContTool;
36class Adaptor3d_TopolTool;
37class Contap_ArcFunction;
38class Contap_ThePathPointOfTheSearch;
42cf5bc1 39class Contap_TheSegmentOfTheSearch;
42cf5bc1 40
41class Contap_TheSearch
42{
43public:
44
45 DEFINE_STANDARD_ALLOC
46
47
36b9ff75 48 //! Empty constructor.
42cf5bc1 49 Standard_EXPORT Contap_TheSearch();
50
36b9ff75 51 //! Algorithm to find the points and parts of curves of Domain
52 //! (domain of of restriction of a surface) which verify
53 //! F = 0.
54 //! TolBoundary defines if a curve is on Q.
55 //! TolTangency defines if a point is on Q.
42cf5bc1 56 Standard_EXPORT void Perform (Contap_ArcFunction& F, const Handle(Adaptor3d_TopolTool)& Domain, const Standard_Real TolBoundary, const Standard_Real TolTangency, const Standard_Boolean RecheckOnRegularity = Standard_False);
57
36b9ff75 58 //! Returns True if the calculus was successful.
42cf5bc1 59 Standard_Boolean IsDone() const;
60
36b9ff75 61 //! Returns true if all arc of the Arcs are solution (inside
62 //! the surface).
63 //! An exception is raised if IsDone returns False.
42cf5bc1 64 Standard_Boolean AllArcSolution() const;
65
36b9ff75 66 //! Returns the number of resulting points.
67 //! An exception is raised if IsDone returns False (NotDone).
42cf5bc1 68 Standard_Integer NbPoints() const;
69
36b9ff75 70 //! Returns the resulting point of range Index.
71 //! The exception NotDone is raised if IsDone() returns
72 //! False.
73 //! The exception OutOfRange is raised if
74 //! Index <= 0 or Index > NbPoints.
42cf5bc1 75 const Contap_ThePathPointOfTheSearch& Point (const Standard_Integer Index) const;
76
36b9ff75 77 //! Returns the number of the resulting segments.
78 //! An exception is raised if IsDone returns False (NotDone).
42cf5bc1 79 Standard_Integer NbSegments() const;
80
36b9ff75 81 //! Returns the resulting segment of range Index.
82 //! The exception NotDone is raised if IsDone() returns
83 //! False.
84 //! The exception OutOfRange is raised if
85 //! Index <= 0 or Index > NbPoints.
42cf5bc1 86 const Contap_TheSegmentOfTheSearch& Segment (const Standard_Integer Index) const;
87
88
89
90
91protected:
92
93
94
95
96
97private:
98
99
100
101 Standard_Boolean done;
102 Standard_Boolean all;
103 Contap_SequenceOfSegmentOfTheSearch sseg;
104 Contap_SequenceOfPathPointOfTheSearch spnt;
105
106
107};
108
109#define TheVertex Handle(Adaptor3d_HVertex)
110#define TheVertex_hxx <Adaptor3d_HVertex.hxx>
111#define TheArc Handle(Adaptor2d_HCurve2d)
112#define TheArc_hxx <Adaptor2d_HCurve2d.hxx>
113#define TheArcTool Contap_HCurve2dTool
114#define TheArcTool_hxx <Contap_HCurve2dTool.hxx>
115#define TheSOBTool Contap_HContTool
116#define TheSOBTool_hxx <Contap_HContTool.hxx>
117#define Handle_TheTopolTool Handle(Adaptor3d_TopolTool)
118#define TheTopolTool Adaptor3d_TopolTool
119#define TheTopolTool_hxx <Adaptor3d_TopolTool.hxx>
120#define TheFunction Contap_ArcFunction
121#define TheFunction_hxx <Contap_ArcFunction.hxx>
122#define IntStart_ThePathPoint Contap_ThePathPointOfTheSearch
123#define IntStart_ThePathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
124#define IntStart_SequenceOfPathPoint Contap_SequenceOfPathPointOfTheSearch
125#define IntStart_SequenceOfPathPoint_hxx <Contap_SequenceOfPathPointOfTheSearch.hxx>
42cf5bc1 126#define IntStart_TheSegment Contap_TheSegmentOfTheSearch
127#define IntStart_TheSegment_hxx <Contap_TheSegmentOfTheSearch.hxx>
128#define IntStart_SequenceOfSegment Contap_SequenceOfSegmentOfTheSearch
129#define IntStart_SequenceOfSegment_hxx <Contap_SequenceOfSegmentOfTheSearch.hxx>
42cf5bc1 130#define IntStart_SearchOnBoundaries Contap_TheSearch
131#define IntStart_SearchOnBoundaries_hxx <Contap_TheSearch.hxx>
132
133#include <IntStart_SearchOnBoundaries.lxx>
134
135#undef TheVertex
136#undef TheVertex_hxx
137#undef TheArc
138#undef TheArc_hxx
139#undef TheArcTool
140#undef TheArcTool_hxx
141#undef TheSOBTool
142#undef TheSOBTool_hxx
143#undef Handle_TheTopolTool
144#undef TheTopolTool
145#undef TheTopolTool_hxx
146#undef TheFunction
147#undef TheFunction_hxx
148#undef IntStart_ThePathPoint
149#undef IntStart_ThePathPoint_hxx
150#undef IntStart_SequenceOfPathPoint
151#undef IntStart_SequenceOfPathPoint_hxx
42cf5bc1 152#undef IntStart_TheSegment
153#undef IntStart_TheSegment_hxx
154#undef IntStart_SequenceOfSegment
155#undef IntStart_SequenceOfSegment_hxx
42cf5bc1 156#undef IntStart_SearchOnBoundaries
157#undef IntStart_SearchOnBoundaries_hxx
158
159
160
161
162#endif // _Contap_TheSearch_HeaderFile