|
||||
File indexing completed on 2025-01-18 10:04:09
0001 // Created on: 1992-05-07 0002 // Created by: Jacques GOUSSARD 0003 // Copyright (c) 1992-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 _IntPatch_ImpImpIntersection_HeaderFile 0018 #define _IntPatch_ImpImpIntersection_HeaderFile 0019 0020 #include <Adaptor3d_Surface.hxx> 0021 #include <IntPatch_SequenceOfPoint.hxx> 0022 #include <IntPatch_SequenceOfLine.hxx> 0023 #include <IntPatch_TheSOnBounds.hxx> 0024 0025 class Adaptor3d_TopolTool; 0026 0027 //! Implementation of the intersection between two 0028 //! quadric patches : Plane, Cone, Cylinder or Sphere. 0029 class IntPatch_ImpImpIntersection 0030 { 0031 public: 0032 0033 DEFINE_STANDARD_ALLOC 0034 0035 enum IntStatus 0036 { 0037 //! OK. Good intersection result. 0038 IntStatus_OK, 0039 0040 //! Intersection curve is too long (e.g. as in the bug #26894). 0041 //! We cannot provide precise computation of value and 0042 //! derivatives of this curve having used floating-point model 0043 //! determined by IEEE 754 standard. As result, OCCT algorithms 0044 //! cannot work with that curve correctly. 0045 IntStatus_InfiniteSectionCurve, 0046 0047 //! Algorithm cannot finish correctly. 0048 IntStatus_Fail 0049 }; 0050 0051 Standard_EXPORT IntPatch_ImpImpIntersection(); 0052 0053 //! Flag theIsReqToKeepRLine has been entered only for 0054 //! compatibility with TopOpeBRep package. It shall be deleted 0055 //! after deleting TopOpeBRep. 0056 //! When intersection result returns IntPatch_RLine and another 0057 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) 0058 //! will always keep both lines even if they are coincided. 0059 Standard_EXPORT IntPatch_ImpImpIntersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean theIsReqToKeepRLine = Standard_False); 0060 0061 //! Flag theIsReqToKeepRLine has been entered only for 0062 //! compatibility with TopOpeBRep package. It shall be deleted 0063 //! after deleting TopOpeBRep. 0064 //! When intersection result returns IntPatch_RLine and another 0065 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) 0066 //! will always keep both lines even if they are coincided. 0067 Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, 0068 const Handle(Adaptor3d_TopolTool)& D1, 0069 const Handle(Adaptor3d_Surface)& S2, 0070 const Handle(Adaptor3d_TopolTool)& D2, 0071 const Standard_Real TolArc, 0072 const Standard_Real TolTang, 0073 const Standard_Boolean theIsReqToKeepRLine = 0074 Standard_False); 0075 0076 //! Returns True if the calculus was successful. 0077 Standard_Boolean IsDone() const; 0078 0079 //! Returns status 0080 IntStatus GetStatus() const; 0081 0082 //! Returns true if the is no intersection. 0083 Standard_Boolean IsEmpty() const; 0084 0085 //! Returns True if the two patches are considered as 0086 //! entirely tangent, i.e every restriction arc of one 0087 //! patch is inside the geometric base of the other patch. 0088 Standard_Boolean TangentFaces() const; 0089 0090 //! Returns True when the TangentFaces returns True and the 0091 //! normal vectors evaluated at a point on the first and the 0092 //! second surface are opposite. 0093 //! The exception DomainError is raised if TangentFaces 0094 //! returns False. 0095 Standard_Boolean OppositeFaces() const; 0096 0097 //! Returns the number of "single" points. 0098 Standard_Integer NbPnts() const; 0099 0100 //! Returns the point of range Index. 0101 //! An exception is raised if Index<=0 or Index>NbPnt. 0102 const IntPatch_Point& Point (const Standard_Integer Index) const; 0103 0104 //! Returns the number of intersection lines. 0105 Standard_Integer NbLines() const; 0106 0107 //! Returns the line of range Index. 0108 //! An exception is raised if Index<=0 or Index>NbLine. 0109 const Handle(IntPatch_Line)& Line (const Standard_Integer Index) const; 0110 0111 0112 0113 0114 protected: 0115 0116 0117 0118 0119 0120 private: 0121 0122 0123 0124 IntStatus myDone; 0125 Standard_Boolean empt; 0126 Standard_Boolean tgte; 0127 Standard_Boolean oppo; 0128 IntPatch_SequenceOfPoint spnt; 0129 IntPatch_SequenceOfLine slin; 0130 IntPatch_TheSOnBounds solrst; 0131 0132 0133 }; 0134 0135 0136 #include <IntPatch_ImpImpIntersection.lxx> 0137 0138 0139 0140 0141 0142 #endif // _IntPatch_ImpImpIntersection_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |