|
||||
File indexing completed on 2025-01-18 10:04:13
0001 // Created on: 1995-05-29 0002 // Created by: Jacques GOUSSARD 0003 // Copyright (c) 1995-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 _LocOpe_CurveShapeIntersector_HeaderFile 0018 #define _LocOpe_CurveShapeIntersector_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <LocOpe_SequenceOfPntFace.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <TopAbs_Orientation.hxx> 0026 class gp_Ax1; 0027 class TopoDS_Shape; 0028 class gp_Circ; 0029 class LocOpe_PntFace; 0030 0031 0032 //! This class provides the intersection between an 0033 //! axis or a circle and the faces of a shape. The 0034 //! intersection points are sorted in increasing 0035 //! parameter along the axis. 0036 class LocOpe_CurveShapeIntersector 0037 { 0038 public: 0039 0040 DEFINE_STANDARD_ALLOC 0041 0042 0043 //! Empty constructor. 0044 LocOpe_CurveShapeIntersector(); 0045 0046 //! Creates and performs the intersection betwwen 0047 //! <Ax1> and <S>. 0048 LocOpe_CurveShapeIntersector(const gp_Ax1& Axis, const TopoDS_Shape& S); 0049 0050 //! Creates and performs yte intersection betwwen 0051 //! <C> and <S>. 0052 LocOpe_CurveShapeIntersector(const gp_Circ& C, const TopoDS_Shape& S); 0053 0054 //! Performs the intersection between <Ax1 and <S>. 0055 Standard_EXPORT void Init (const gp_Ax1& Axis, const TopoDS_Shape& S); 0056 0057 //! Performs the intersection between <Ax1 and <S>. 0058 Standard_EXPORT void Init (const gp_Circ& C, const TopoDS_Shape& S); 0059 0060 //! Returns <Standard_True> if the intersection has 0061 //! been done. 0062 Standard_Boolean IsDone() const; 0063 0064 //! Returns the number of intersection point. 0065 Standard_Integer NbPoints() const; 0066 0067 //! Returns the intersection point of range <Index>. 0068 //! The points are sorted in increasing order of 0069 //! parameter along the axis. 0070 const LocOpe_PntFace& Point (const Standard_Integer Index) const; 0071 0072 //! Searches the first intersection point located 0073 //! after the parameter <From>, which orientation is 0074 //! not TopAbs_EXTERNAL. If found, returns 0075 //! <Standard_True>. <Or> contains the orientation of 0076 //! the point, <IndFrom> and <IndTo> represents the 0077 //! interval of index in the sequence of intersection 0078 //! point corresponding to the point. (IndFrom <= 0079 //! IndTo). 0080 //! 0081 //! Otherwise, returns <Standard_False>. 0082 Standard_EXPORT Standard_Boolean LocalizeAfter (const Standard_Real From, TopAbs_Orientation& Or, Standard_Integer& IndFrom, Standard_Integer& IndTo) const; 0083 0084 //! Searches the first intersection point located 0085 //! before the parameter <From>, which orientation is 0086 //! not TopAbs_EXTERNAL. If found, returns 0087 //! <Standard_True>. <Or> contains the orientation of 0088 //! the point, <IndFrom> and <IndTo> represents the 0089 //! interval of index in the sequence of intersection 0090 //! point corresponding to the point (IndFrom <= 0091 //! IndTo). 0092 //! 0093 //! Otherwise, returns <Standard_False>. 0094 Standard_EXPORT Standard_Boolean LocalizeBefore (const Standard_Real From, TopAbs_Orientation& Or, Standard_Integer& IndFrom, Standard_Integer& IndTo) const; 0095 0096 //! Searches the first intersection point located 0097 //! after the index <FromInd> ( >= FromInd + 1), which 0098 //! orientation is not TopAbs_EXTERNAL. If found, 0099 //! returns <Standard_True>. <Or> contains the 0100 //! orientation of the point, <IndFrom> and <IndTo> 0101 //! represents the interval of index in the sequence 0102 //! of intersection point corresponding to the 0103 //! point. (IndFrom <= IndTo). 0104 //! 0105 //! Otherwise, returns <Standard_False>. 0106 Standard_EXPORT Standard_Boolean LocalizeAfter (const Standard_Integer FromInd, TopAbs_Orientation& Or, Standard_Integer& IndFrom, Standard_Integer& IndTo) const; 0107 0108 //! Searches the first intersection point located 0109 //! before the index <FromInd> ( <= FromInd -1), which 0110 //! orientation is not TopAbs_EXTERNAL. If found, 0111 //! returns <Standard_True>. <Or> contains the 0112 //! orientation of the point, <IndFrom> and <IndTo> 0113 //! represents the interval of index in the sequence 0114 //! of intersection point corresponding to the point 0115 //! (IndFrom <= IndTo). 0116 //! 0117 //! Otherwise, returns <Standard_False>. 0118 Standard_EXPORT Standard_Boolean LocalizeBefore (const Standard_Integer FromInd, TopAbs_Orientation& Or, Standard_Integer& IndFrom, Standard_Integer& IndTo) const; 0119 0120 0121 0122 0123 protected: 0124 0125 0126 0127 0128 0129 private: 0130 0131 0132 0133 Standard_Boolean myDone; 0134 LocOpe_SequenceOfPntFace myPoints; 0135 0136 0137 }; 0138 0139 0140 #include <LocOpe_CurveShapeIntersector.lxx> 0141 0142 0143 0144 0145 0146 #endif // _LocOpe_CurveShapeIntersector_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |