Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:11:53

0001 // Created on: 1993-02-05
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Contap_TheSearch_HeaderFile
0018 #define _Contap_TheSearch_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Contap_TheSegmentOfTheSearch.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <Contap_ThePathPointOfTheSearch.hxx>
0028 #include <Standard_Real.hxx>
0029 #include <Standard_Integer.hxx>
0030 class StdFail_NotDone;
0031 class Standard_OutOfRange;
0032 class Standard_ConstructionError;
0033 class Adaptor3d_HVertex;
0034 class Contap_HCurve2dTool;
0035 class Contap_HContTool;
0036 class Adaptor3d_TopolTool;
0037 class Contap_ArcFunction;
0038 class Contap_ThePathPointOfTheSearch;
0039 class Contap_TheSegmentOfTheSearch;
0040 
0041 class Contap_TheSearch
0042 {
0043 public:
0044   DEFINE_STANDARD_ALLOC
0045 
0046   //! Empty constructor.
0047   Standard_EXPORT Contap_TheSearch();
0048 
0049   //! Algorithm to find the points and parts of curves of Domain
0050   //! (domain of of restriction of a surface) which verify
0051   //! F = 0.
0052   //! TolBoundary defines if a curve is on Q.
0053   //! TolTangency defines if a point is on Q.
0054   Standard_EXPORT void Perform(Contap_ArcFunction&                     F,
0055                                const occ::handle<Adaptor3d_TopolTool>& Domain,
0056                                const double                            TolBoundary,
0057                                const double                            TolTangency,
0058                                const bool                              RecheckOnRegularity = false);
0059 
0060   //! Returns True if the calculus was successful.
0061   bool IsDone() const;
0062 
0063   //! Returns true if all arc of the Arcs are solution (inside
0064   //! the surface).
0065   //! An exception is raised if IsDone returns False.
0066   bool AllArcSolution() const;
0067 
0068   //! Returns the number of resulting points.
0069   //! An exception is raised if IsDone returns False (NotDone).
0070   int NbPoints() const;
0071 
0072   //! Returns the resulting point of range Index.
0073   //! The exception NotDone is raised if IsDone() returns
0074   //! False.
0075   //! The exception OutOfRange is raised if
0076   //! Index <= 0 or Index > NbPoints.
0077   const Contap_ThePathPointOfTheSearch& Point(const int Index) const;
0078 
0079   //! Returns the number of the resulting segments.
0080   //! An exception is raised if IsDone returns False (NotDone).
0081   int NbSegments() const;
0082 
0083   //! Returns the resulting segment of range Index.
0084   //! The exception NotDone is raised if IsDone() returns
0085   //! False.
0086   //! The exception OutOfRange is raised if
0087   //! Index <= 0 or Index > NbPoints.
0088   const Contap_TheSegmentOfTheSearch& Segment(const int Index) const;
0089 
0090 private:
0091   bool                                                 done;
0092   bool                                                 all;
0093   NCollection_Sequence<Contap_TheSegmentOfTheSearch>   sseg;
0094   NCollection_Sequence<Contap_ThePathPointOfTheSearch> spnt;
0095 };
0096 
0097 #define TheVertex occ::handle<Adaptor3d_HVertex>
0098 #define TheVertex_hxx <Adaptor3d_HVertex.hxx>
0099 #define TheArc occ::handle<Adaptor2d_Curve2d>
0100 #define TheArc_hxx <Adaptor2d_Curve2d.hxx>
0101 #define TheArcTool Contap_HCurve2dTool
0102 #define TheArcTool_hxx <Contap_HCurve2dTool.hxx>
0103 #define TheSOBTool Contap_HContTool
0104 #define TheSOBTool_hxx <Contap_HContTool.hxx>
0105 #define Handle_TheTopolTool occ::handle<Adaptor3d_TopolTool>
0106 #define TheTopolTool Adaptor3d_TopolTool
0107 #define TheTopolTool_hxx <Adaptor3d_TopolTool.hxx>
0108 #define TheFunction Contap_ArcFunction
0109 #define TheFunction_hxx <Contap_ArcFunction.hxx>
0110 #define IntStart_ThePathPoint Contap_ThePathPointOfTheSearch
0111 #define IntStart_ThePathPoint_hxx <Contap_ThePathPointOfTheSearch.hxx>
0112 #define IntStart_SequenceOfPathPoint NCollection_Sequence<Contap_ThePathPointOfTheSearch>
0113 #define IntStart_SequenceOfPathPoint_hxx <NCollection_Sequence<Contap_ThePathPointOfTheSearch>.hxx>
0114 #define IntStart_TheSegment Contap_TheSegmentOfTheSearch
0115 #define IntStart_TheSegment_hxx <Contap_TheSegmentOfTheSearch.hxx>
0116 #define IntStart_SequenceOfSegment NCollection_Sequence<Contap_TheSegmentOfTheSearch>
0117 #define IntStart_SequenceOfSegment_hxx <NCollection_Sequence<Contap_TheSegmentOfTheSearch>.hxx>
0118 #define IntStart_SearchOnBoundaries Contap_TheSearch
0119 #define IntStart_SearchOnBoundaries_hxx <Contap_TheSearch.hxx>
0120 
0121 #include <IntStart_SearchOnBoundaries.lxx>
0122 
0123 #undef TheVertex
0124 #undef TheVertex_hxx
0125 #undef TheArc
0126 #undef TheArc_hxx
0127 #undef TheArcTool
0128 #undef TheArcTool_hxx
0129 #undef TheSOBTool
0130 #undef TheSOBTool_hxx
0131 #undef Handle_TheTopolTool
0132 #undef TheTopolTool
0133 #undef TheTopolTool_hxx
0134 #undef TheFunction
0135 #undef TheFunction_hxx
0136 #undef IntStart_ThePathPoint
0137 #undef IntStart_ThePathPoint_hxx
0138 #undef IntStart_SequenceOfPathPoint
0139 #undef IntStart_SequenceOfPathPoint_hxx
0140 #undef IntStart_TheSegment
0141 #undef IntStart_TheSegment_hxx
0142 #undef IntStart_SequenceOfSegment
0143 #undef IntStart_SequenceOfSegment_hxx
0144 #undef IntStart_SearchOnBoundaries
0145 #undef IntStart_SearchOnBoundaries_hxx
0146 
0147 #endif // _Contap_TheSearch_HeaderFile