|
|
|||
File indexing completed on 2026-07-21 08:34:06
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 DEFINE_STANDARD_ALLOC 0033 0034 enum IntStatus 0035 { 0036 //! OK. Good intersection result. 0037 IntStatus_OK, 0038 0039 //! Intersection curve is too long (e.g. as in the bug #26894). 0040 //! We cannot provide precise computation of value and 0041 //! derivatives of this curve having used floating-point model 0042 //! determined by IEEE 754 standard. As result, OCCT algorithms 0043 //! cannot work with that curve correctly. 0044 IntStatus_InfiniteSectionCurve, 0045 0046 //! Algorithm cannot finish correctly. 0047 IntStatus_Fail 0048 }; 0049 0050 Standard_EXPORT IntPatch_ImpImpIntersection(); 0051 0052 //! Flag theIsReqToKeepRLine has been entered only for 0053 //! compatibility with TopOpeBRep package. It shall be deleted 0054 //! after deleting TopOpeBRep. 0055 //! When intersection result returns IntPatch_RLine and another 0056 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) 0057 //! will always keep both lines even if they are coincided. 0058 Standard_EXPORT IntPatch_ImpImpIntersection( 0059 const Handle(Adaptor3d_Surface)& S1, 0060 const Handle(Adaptor3d_TopolTool)& D1, 0061 const Handle(Adaptor3d_Surface)& S2, 0062 const Handle(Adaptor3d_TopolTool)& D2, 0063 const Standard_Real TolArc, 0064 const Standard_Real TolTang, 0065 const Standard_Boolean theIsReqToKeepRLine = Standard_False); 0066 0067 //! Flag theIsReqToKeepRLine has been entered only for 0068 //! compatibility with TopOpeBRep package. It shall be deleted 0069 //! after deleting TopOpeBRep. 0070 //! When intersection result returns IntPatch_RLine and another 0071 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE) 0072 //! will always keep both lines even if they are coincided. 0073 Standard_EXPORT void Perform(const Handle(Adaptor3d_Surface)& S1, 0074 const Handle(Adaptor3d_TopolTool)& D1, 0075 const Handle(Adaptor3d_Surface)& S2, 0076 const Handle(Adaptor3d_TopolTool)& D2, 0077 const Standard_Real TolArc, 0078 const Standard_Real TolTang, 0079 const Standard_Boolean theIsReqToKeepRLine = Standard_False); 0080 0081 //! Returns True if the calculus was successful. 0082 Standard_Boolean IsDone() const; 0083 0084 //! Returns status 0085 IntStatus GetStatus() const; 0086 0087 //! Returns true if the is no intersection. 0088 Standard_Boolean IsEmpty() const; 0089 0090 //! Returns True if the two patches are considered as 0091 //! entirely tangent, i.e every restriction arc of one 0092 //! patch is inside the geometric base of the other patch. 0093 Standard_Boolean TangentFaces() const; 0094 0095 //! Returns True when the TangentFaces returns True and the 0096 //! normal vectors evaluated at a point on the first and the 0097 //! second surface are opposite. 0098 //! The exception DomainError is raised if TangentFaces 0099 //! returns False. 0100 Standard_Boolean OppositeFaces() const; 0101 0102 //! Returns the number of "single" points. 0103 Standard_Integer NbPnts() const; 0104 0105 //! Returns the point of range Index. 0106 //! An exception is raised if Index<=0 or Index>NbPnt. 0107 const IntPatch_Point& Point(const Standard_Integer Index) const; 0108 0109 //! Returns the number of intersection lines. 0110 Standard_Integer NbLines() const; 0111 0112 //! Returns the line of range Index. 0113 //! An exception is raised if Index<=0 or Index>NbLine. 0114 const Handle(IntPatch_Line)& Line(const Standard_Integer Index) const; 0115 0116 protected: 0117 private: 0118 IntStatus myDone; 0119 Standard_Boolean empt; 0120 Standard_Boolean tgte; 0121 Standard_Boolean oppo; 0122 IntPatch_SequenceOfPoint spnt; 0123 IntPatch_SequenceOfLine slin; 0124 IntPatch_TheSOnBounds solrst; 0125 }; 0126 0127 #include <IntPatch_ImpImpIntersection.lxx> 0128 0129 #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 |
|