|
||||
File indexing completed on 2025-01-18 10:04:06
0001 // Created on: 1991-05-15 0002 // Created by: Isabelle GRIGNON 0003 // Copyright (c) 1991-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 _IntAna_IntQuadQuad_HeaderFile 0018 #define _IntAna_IntQuadQuad_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <IntAna_Curve.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <gp_Pnt.hxx> 0026 class gp_Cylinder; 0027 class IntAna_Quadric; 0028 class gp_Cone; 0029 0030 0031 //! This class provides the analytic intersection between a 0032 //! cylinder or a cone from gp and another quadric, as defined 0033 //! in the class Quadric from IntAna. 0034 //! This algorithm is used when the geometric intersection 0035 //! (class QuadQuadGeo from IntAna) returns no geometric 0036 //! solution. 0037 //! The result of the intersection may be 0038 //! - Curves as defined in the class Curve from IntAna 0039 //! - Points (Pnt from gp) 0040 class IntAna_IntQuadQuad 0041 { 0042 public: 0043 0044 DEFINE_STANDARD_ALLOC 0045 0046 0047 //! Empty Constructor 0048 Standard_EXPORT IntAna_IntQuadQuad(); 0049 0050 //! Creates the intersection between a cylinder and a quadric . 0051 //! Tol est a definir plus precisemment. 0052 Standard_EXPORT IntAna_IntQuadQuad(const gp_Cylinder& C, const IntAna_Quadric& Q, const Standard_Real Tol); 0053 0054 //! Creates the intersection between a cone and a quadric. 0055 //! Tol est a definir plus precisemment. 0056 Standard_EXPORT IntAna_IntQuadQuad(const gp_Cone& C, const IntAna_Quadric& Q, const Standard_Real Tol); 0057 0058 //! Intersects a cylinder and a quadric . 0059 //! Tol est a definir plus precisemment. 0060 Standard_EXPORT void Perform (const gp_Cylinder& C, const IntAna_Quadric& Q, const Standard_Real Tol); 0061 0062 //! Intersects a cone and a quadric. 0063 //! Tol est a definir plus precisemment. 0064 Standard_EXPORT void Perform (const gp_Cone& C, const IntAna_Quadric& Q, const Standard_Real Tol); 0065 0066 //! Returns True if the computation was successful. 0067 Standard_Boolean IsDone() const; 0068 0069 //! Returns TRUE if the cylinder, the cone or the sphere 0070 //! is identical to the quadric. 0071 Standard_Boolean IdenticalElements() const; 0072 0073 //! Returns the number of curves solution. 0074 Standard_Integer NbCurve() const; 0075 0076 //! Returns the curve of range N. 0077 Standard_EXPORT const IntAna_Curve& Curve (const Standard_Integer N) const; 0078 0079 //! Returns the number of contact point. 0080 Standard_Integer NbPnt() const; 0081 0082 //! Returns the point of range N. 0083 Standard_EXPORT const gp_Pnt& Point (const Standard_Integer N) const; 0084 0085 //! Returns the parameters on the "explicit quadric" 0086 //! (i.e the cylinder or the cone, the first argument given to the constructor) of the point of range N. 0087 Standard_EXPORT void Parameters (const Standard_Integer N, Standard_Real& U1, Standard_Real& U2) const; 0088 0089 //! Returns True if the Curve I shares its last bound 0090 //! with another curve. 0091 Standard_EXPORT Standard_Boolean HasNextCurve (const Standard_Integer I) const; 0092 0093 //! If HasNextCurve(I) returns True, this function 0094 //! returns the Index J of the curve which has a 0095 //! common bound with the curve I. If theOpposite == 0096 //! True , then the last parameter of the curve I, and 0097 //! the last parameter of the curve J give the same 0098 //! point. Else the last parameter of the curve I and 0099 //! the first parameter of the curve J are the same 0100 //! point. 0101 Standard_EXPORT Standard_Integer NextCurve (const Standard_Integer I, Standard_Boolean& theOpposite) const; 0102 0103 //! Returns True if the Curve I shares its first bound 0104 //! with another curve. 0105 Standard_EXPORT Standard_Boolean HasPreviousCurve (const Standard_Integer I) const; 0106 0107 //! if HasPreviousCurve(I) returns True, this function 0108 //! returns the Index J of the curve which has a 0109 //! common bound with the curve I. If theOpposite == 0110 //! True , then the first parameter of the curve I, 0111 //! and the first parameter of the curve J give the 0112 //! same point. Else the first parameter of the curve 0113 //! I and the last parameter of the curve J are the 0114 //! same point. 0115 Standard_EXPORT Standard_Integer PreviousCurve (const Standard_Integer I, Standard_Boolean& theOpposite) const; 0116 0117 protected: 0118 0119 //! Set the next and previous fields. Private method. 0120 Standard_EXPORT void InternalSetNextAndPrevious(); 0121 0122 protected: 0123 0124 Standard_Boolean done; 0125 Standard_Boolean identical; 0126 IntAna_Curve TheCurve[12]; 0127 Standard_Integer previouscurve[12]; 0128 Standard_Integer nextcurve[12]; 0129 Standard_Integer NbCurves; 0130 Standard_Integer Nbpoints; 0131 gp_Pnt Thepoints[2]; 0132 Standard_Integer myNbMaxCurves; 0133 Standard_Real myEpsilon; 0134 Standard_Real myEpsilonCoeffPolyNull; 0135 0136 }; 0137 0138 #include <IntAna_IntQuadQuad.lxx> 0139 0140 #endif // _IntAna_IntQuadQuad_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |