|
||||
File indexing completed on 2025-01-18 10:04:09
0001 //! Created on: 2016-06-03 0002 //! Created by: NIKOLAI BUKHALOV 0003 //! Copyright (c) 2016 OPEN CASCADE SAS 0004 //! 0005 //! This file is part of Open CASCADE Technology software library. 0006 //! 0007 //! This library is free software; you can redistribute it and/or modify it under 0008 //! the terms of the GNU Lesser General Public License version 2.1 as published 0009 //! by the Free Software Foundation, with special exception defined in the file 0010 //! OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0011 //! distribution for complete text of the license and disclaimer of any warranty. 0012 //! 0013 //! Alternatively, this file may be used under the terms of Open CASCADE 0014 //! commercial license or contractual agreement. 0015 0016 #ifndef _IntPatch_SpecialPoints_HeaderFile 0017 #define _IntPatch_SpecialPoints_HeaderFile 0018 0019 //! Contains methods to add some special points 0020 //! (such as apex of cone, pole of sphere, 0021 //! point on surface boundary etc.) in the intersection line. 0022 0023 #include <Adaptor3d_Surface.hxx> 0024 #include <IntPatch_SpecPntType.hxx> 0025 0026 class gp_Cone; 0027 class gp_Vec; 0028 class gp_XYZ; 0029 class IntPatch_Point; 0030 class IntSurf_PntOn2S; 0031 0032 template<typename T> class math_VectorBase; 0033 using math_Vector = math_VectorBase<double>; 0034 0035 class IntPatch_SpecialPoints 0036 { 0037 public: 0038 //! Adds the point defined as intersection 0039 //! of two isolines (U = 0 and V = 0) on theQSurf in theLine. 0040 //! theRefPt is used to correct adjusting parameters. 0041 //! If theIsReversed is TRUE then theQSurf correspond to the 0042 //! second (otherwise, the first) surface while forming 0043 //! intersection point IntSurf_PntOn2S. 0044 Standard_EXPORT static Standard_Boolean 0045 AddCrossUVIsoPoint(const Handle(Adaptor3d_Surface)& theQSurf, 0046 const Handle(Adaptor3d_Surface)& thePSurf, 0047 const IntSurf_PntOn2S& theRefPt, 0048 const Standard_Real theTol3d, 0049 IntSurf_PntOn2S& theAddedPoint, 0050 const Standard_Boolean theIsReversed 0051 = Standard_False); 0052 0053 //! Adds the point lain strictly in the isoline U = 0 or V = 0 of theQSurf, 0054 //! in theLine. 0055 //! theRefPt is used to correct adjusting parameters. 0056 //! If theIsReversed is TRUE then theQSurf corresponds to the 0057 //! second (otherwise, the first) surface while forming 0058 //! intersection point IntSurf_PntOn2S. 0059 //! All math_Vector-objects must be filled as follows: 0060 //! [1] - U-parameter of thePSurf; 0061 //! [2] - V-parameter of thePSurf; 0062 //! [3] - U- (if V-isoline is considered) or V-parameter 0063 //! (if U-isoline is considered) of theQSurf. 0064 Standard_EXPORT static Standard_Boolean 0065 AddPointOnUorVIso(const Handle(Adaptor3d_Surface)& theQSurf, 0066 const Handle(Adaptor3d_Surface)& thePSurf, 0067 const IntSurf_PntOn2S& theRefPt, 0068 const Standard_Boolean theIsU, 0069 const Standard_Real theIsoParameter, 0070 const math_Vector& theToler, 0071 const math_Vector& theInitPoint, 0072 const math_Vector& theInfBound, 0073 const math_Vector& theSupBound, 0074 IntSurf_PntOn2S& theAddedPoint, 0075 const Standard_Boolean theIsReversed 0076 = Standard_False); 0077 0078 //! Computes the pole of sphere to add it in the intersection line. 0079 //! Stores the result in theAddedPoint variable (does not add in the line). 0080 //! At that, cone and sphere (with singularity) must be set in theQSurf parameter. 0081 //! By default (if theIsReversed == FALSE), theQSurf is the first surface of the 0082 //! Walking line. If it is not, theIsReversed parameter must be set to TRUE. 0083 //! theIsReqRefCheck is TRUE if and only if 3D-point of theRefPt must be pole or apex 0084 //! for check (e.g. if it is vertex). 0085 //! thePtIso is the reference point for obtaining isoline where must be placed the Apex/Pole. 0086 //! 0087 //! ATTENTION!!! 0088 //! theVertex must be initialized before calling the method . 0089 Standard_EXPORT static Standard_Boolean 0090 AddSingularPole(const Handle(Adaptor3d_Surface)& theQSurf, 0091 const Handle(Adaptor3d_Surface)& thePSurf, 0092 const IntSurf_PntOn2S& thePtIso, 0093 IntPatch_Point& theVertex, 0094 IntSurf_PntOn2S& theAddedPoint, 0095 const Standard_Boolean theIsReversed = 0096 Standard_False, 0097 const Standard_Boolean theIsReqRefCheck = 0098 Standard_False); 0099 0100 //! Special point has already been added in the line. Now, we need in correct 0101 //! prolongation of the line or in start new line. This function returns new point. 0102 //! 0103 //! ATTENTION!!! 0104 //! theNewPoint is not only Output parameter. It is Input/Output one. I.e. 0105 //! theNewPoint is reference point together with theRefPt. 0106 Standard_EXPORT static Standard_Boolean 0107 ContinueAfterSpecialPoint(const Handle(Adaptor3d_Surface)& theQSurf, 0108 const Handle(Adaptor3d_Surface)& thePSurf, 0109 const IntSurf_PntOn2S& theRefPt, 0110 const IntPatch_SpecPntType theSPType, 0111 const Standard_Real theTol2D, 0112 IntSurf_PntOn2S& theNewPoint, 0113 const Standard_Boolean theIsReversed 0114 = Standard_False); 0115 0116 //! Sets theNewPoint parameters in 2D-space the closest to 0117 //! theRefPoint with help of adding/subtracting corresponding periods. 0118 //! theArrPeriods must be filled as follows: 0119 //! {<U-period of 1st surface>, <V-period of 1st surface>, 0120 //! <U-period of 2nd surface>, <V-period of 2nd surface>}. 0121 //! If theVertex != 0 then its parameters will be filled as 0122 //! corresponding parameters of theNewPoint. 0123 //! 0124 //! ATTENTION!!! 0125 //! theNewPoint is not only Output parameter. It is Input/Output one. I.e. 0126 //! theNewPoint is reference point together with theRefPt. 0127 Standard_EXPORT static void 0128 AdjustPointAndVertex(const IntSurf_PntOn2S &theRefPoint, 0129 const Standard_Real theArrPeriods[4], 0130 IntSurf_PntOn2S &theNewPoint, 0131 IntPatch_Point* const theVertex = 0); 0132 0133 protected: 0134 //! Computes "special point" in the sphere 0135 //! The parameter will be found in the range [0, 2*PI]. 0136 //! Therefore it must be adjusted to valid range by 0137 //! the high-level algorithm 0138 static Standard_EXPORT Standard_Boolean ProcessSphere(const IntSurf_PntOn2S& thePtIso, 0139 const gp_Vec& theDUofPSurf, 0140 const gp_Vec& theDVofPSurf, 0141 const Standard_Boolean theIsReversed, 0142 const Standard_Real theVquad, 0143 Standard_Real& theUquad, 0144 Standard_Boolean& theIsIsoChoosen); 0145 0146 //! Computes "special point" in the cone. 0147 //! The parameter will be found in the range [0, 2*PI]. 0148 //! Therefore it must be adjusted to valid range by 0149 //! the high-level algorithm. 0150 static Standard_EXPORT Standard_Boolean ProcessCone(const IntSurf_PntOn2S& thePtIso, 0151 const gp_Vec& theDUofPSurf, 0152 const gp_Vec& theDVofPSurf, 0153 const gp_Cone& theCone, 0154 const Standard_Boolean theIsReversed, 0155 Standard_Real& theUquad, 0156 Standard_Boolean& theIsIsoChoosen); 0157 0158 //! Computes vector tangent to the intersection line in cone apex. 0159 //! There exist not more than 2 tangent. They will be stores in theResult vector. 0160 //! Returns the number of found tangents. 0161 //! thePlnNormal is the normalized vector of the normal to the plane intersected the cone. 0162 static Standard_EXPORT Standard_Integer GetTangentToIntLineForCone(const Standard_Real theConeSemiAngle, 0163 const gp_XYZ& thePlnNormal, 0164 gp_XYZ theResult[2]); 0165 }; 0166 0167 #endif // _IntPatch_AddSpecialPoints_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |