|
||||
File indexing completed on 2025-01-18 10:03:31
0001 // Created on: 1991-04-03 0002 // Created by: Remi GILET 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 _GccAna_Lin2dBisec_HeaderFile 0018 #define _GccAna_Lin2dBisec_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <Standard_Integer.hxx> 0024 #include <TColgp_Array1OfLin2d.hxx> 0025 #include <TColgp_Array1OfPnt2d.hxx> 0026 #include <TColStd_Array1OfReal.hxx> 0027 class gp_Lin2d; 0028 class gp_Pnt2d; 0029 0030 0031 //! Describes functions for building bisecting lines between two 2D lines. 0032 //! A bisecting line between two lines is such that each of its 0033 //! points is at the same distance from the two lines. 0034 //! If the two lines are secant, there are two orthogonal 0035 //! bisecting lines which share the angles made by the two 0036 //! straight lines in two equal parts. If D1 and D2 are the 0037 //! unit vectors of the two straight lines, those of the two 0038 //! bisecting lines are collinear with the following vectors: 0039 //! - D1 + D2 for the "internal" bisecting line, 0040 //! - D1 - D2 for the "external" bisecting line. 0041 //! If the two lines are parallel, the (unique) bisecting line is 0042 //! the straight line equidistant from the two straight lines. If 0043 //! the two straight lines are coincident, the algorithm 0044 //! returns the first straight line as the solution. 0045 //! A Lin2dTanObl object provides a framework for: 0046 //! - defining the construction of the bisecting lines, 0047 //! - implementing the construction algorithm, and 0048 //! - consulting the result. 0049 class GccAna_Lin2dBisec 0050 { 0051 public: 0052 0053 DEFINE_STANDARD_ALLOC 0054 0055 0056 //! Constructs bisecting lines between the two lines Lin1 and Lin2. 0057 Standard_EXPORT GccAna_Lin2dBisec(const gp_Lin2d& Lin1, const gp_Lin2d& Lin2); 0058 0059 //! Returns True when the algorithm succeeded. 0060 Standard_EXPORT Standard_Boolean IsDone() const; 0061 0062 //! Returns the number of solutions and raise NotDone if 0063 //! the constructor wasn't called before. 0064 Standard_EXPORT Standard_Integer NbSolutions() const; 0065 0066 //! Returns the solution number Index . 0067 //! The first solution is the inside one and the second is the 0068 //! outside one. 0069 //! For the first solution the direction is D1+D2 (D1 is 0070 //! the direction of the first argument and D2 the 0071 //! direction of the second argument). 0072 //! For the second solution the direction is D1-D2. 0073 //! Raises NotDone if the construction algorithm 0074 //! didn't succeed. 0075 //! It raises OutOfRange if Index is greater than the 0076 //! number of solutions. 0077 Standard_EXPORT gp_Lin2d ThisSolution (const Standard_Integer Index) const; 0078 0079 //! Returns information about the intersection point between 0080 //! the result number Index and the first argument. 0081 //! Raises NotDone if the construction algorithm didn't succeed. 0082 //! It raises OutOfRange if Index is greater than the 0083 //! number of solutions. 0084 Standard_EXPORT void Intersection1 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0085 0086 //! Returns information about the intersection point between 0087 //! the result number Index and the second argument. 0088 //! Raises NotDone if the construction algorithm 0089 //! didn't succeed. 0090 //! It raises OutOfRange if Index is greater than the 0091 //! number of solutions. 0092 Standard_EXPORT void Intersection2 (const Standard_Integer Index, Standard_Real& ParSol, Standard_Real& ParArg, gp_Pnt2d& PntSol) const; 0093 0094 0095 0096 0097 protected: 0098 0099 0100 0101 0102 0103 private: 0104 0105 0106 0107 Standard_Boolean WellDone; 0108 Standard_Integer NbrSol; 0109 TColgp_Array1OfLin2d linsol; 0110 TColgp_Array1OfPnt2d pntint1sol; 0111 TColgp_Array1OfPnt2d pntint2sol; 0112 TColStd_Array1OfReal par1sol; 0113 TColStd_Array1OfReal par2sol; 0114 TColStd_Array1OfReal pararg1; 0115 TColStd_Array1OfReal pararg2; 0116 0117 0118 }; 0119 0120 0121 0122 0123 0124 0125 0126 #endif // _GccAna_Lin2dBisec_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |