|
||||
File indexing completed on 2025-01-18 10:04:09
0001 // Created on: 1992-05-06 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_Point_HeaderFile 0018 #define _IntPatch_Point_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <IntSurf_PntOn2S.hxx> 0025 #include <IntSurf_Transition.hxx> 0026 #include <Adaptor2d_Curve2d.hxx> 0027 0028 class Adaptor3d_HVertex; 0029 class gp_Pnt; 0030 0031 0032 //! Definition of an intersection point between two surfaces. 0033 //! Such a point is contains geometrical information (see 0034 //! the Value method) and logical information. 0035 class IntPatch_Point 0036 { 0037 public: 0038 0039 DEFINE_STANDARD_ALLOC 0040 0041 0042 //! Empty constructor. 0043 IntPatch_Point(); 0044 0045 //! Sets the values of a point which is on no domain, 0046 //! when both surfaces are implicit ones. 0047 //! If Tangent is True, the point is a point of tangency 0048 //! between the surfaces. 0049 Standard_EXPORT void SetValue (const gp_Pnt& Pt, const Standard_Real Tol, const Standard_Boolean Tangent); 0050 0051 void SetValue (const gp_Pnt& Pt); 0052 0053 //! Sets the value of <pt> member 0054 void SetValue (const IntSurf_PntOn2S& thePOn2S); 0055 0056 0057 void SetTolerance (const Standard_Real Tol); 0058 0059 //! Sets the values of the parameters of the point 0060 //! on each surface. 0061 void SetParameters (const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); 0062 0063 //! Set the value of the parameter on the intersection line. 0064 void SetParameter (const Standard_Real Para); 0065 0066 //! Sets the values of a point which is a vertex on 0067 //! the initial facet of restriction of one 0068 //! of the surface. 0069 //! If OnFirst is True, the point is on the domain of the 0070 //! first patch, otherwise the point is on the domain of the 0071 //! second surface. 0072 Standard_EXPORT void SetVertex (const Standard_Boolean OnFirst, const Handle(Adaptor3d_HVertex)& V); 0073 0074 //! Sets the values of a point which is on one of the domain, 0075 //! when both surfaces are implicit ones. 0076 //! If OnFirst is True, the point is on the domain of the 0077 //! first patch, otherwise the point is on the domain of the 0078 //! second surface. 0079 Standard_EXPORT void SetArc (const Standard_Boolean OnFirst, const Handle(Adaptor2d_Curve2d)& A, const Standard_Real Param, const IntSurf_Transition& TLine, const IntSurf_Transition& TArc); 0080 0081 //! Sets (or unsets) the point as a point on several 0082 //! intersection line. 0083 void SetMultiple (const Standard_Boolean IsMult); 0084 0085 //! Returns the intersection point (geometric information). 0086 const gp_Pnt& Value() const; 0087 0088 //! This method returns the parameter of the point 0089 //! on the intersection line. 0090 //! If the points does not belong to an intersection line, 0091 //! the value returned does not have any sens. 0092 Standard_Real ParameterOnLine() const; 0093 0094 //! This method returns the fuzziness on the point. 0095 Standard_Real Tolerance() const; 0096 0097 //! Returns True if the Point is a tangency point between 0098 //! the surfaces. 0099 //! If the Point is on one of the domain (IsOnDomS1 returns 0100 //! True or IsOnDomS2 returns True), an exception is raised. 0101 Standard_Boolean IsTangencyPoint() const; 0102 0103 //! Returns the parameters on the first surface of the point. 0104 void ParametersOnS1 (Standard_Real& U1, Standard_Real& V1) const; 0105 0106 //! Returns the parameters on the second surface of the point. 0107 void ParametersOnS2 (Standard_Real& U2, Standard_Real& V2) const; 0108 0109 //! Returns True if the point belongs to several intersection 0110 //! lines. 0111 Standard_Boolean IsMultiple() const; 0112 0113 //! Returns TRUE if the point is on a boundary of the domain 0114 //! of the first patch. 0115 Standard_Boolean IsOnDomS1() const; 0116 0117 //! Returns TRUE if the point is a vertex on the initial 0118 //! restriction facet of the first surface. 0119 Standard_Boolean IsVertexOnS1() const; 0120 0121 //! Returns the information about the point when it is 0122 //! on the domain of the first patch, i-e when the function 0123 //! IsVertexOnS1 returns True. 0124 //! Otherwise, an exception is raised. 0125 const Handle(Adaptor3d_HVertex)& VertexOnS1() const; 0126 0127 //! Returns the arc of restriction containing the 0128 //! vertex. 0129 //! The exception DomainError is raised if 0130 //! IsOnDomS1 returns False. 0131 const Handle(Adaptor2d_Curve2d)& ArcOnS1() const; 0132 0133 //! Returns the transition of the point on the 0134 //! intersection line with the arc on S1. 0135 //! The exception DomainError is raised if IsOnDomS1 0136 //! returns False. 0137 const IntSurf_Transition& TransitionLineArc1() const; 0138 0139 //! Returns the transition between the intersection line 0140 //! returned by the method Line and the arc on S1 returned 0141 //! by ArcOnS1(). 0142 //! The exception DomainError is raised if 0143 //! IsOnDomS1 returns False. 0144 const IntSurf_Transition& TransitionOnS1() const; 0145 0146 //! Returns the parameter of the point on the 0147 //! arc returned by the method ArcOnS2. 0148 //! The exception DomainError is raised if 0149 //! IsOnDomS1 returns False. 0150 Standard_Real ParameterOnArc1() const; 0151 0152 //! Returns TRUE if the point is on a boundary of the domain 0153 //! of the second patch. 0154 Standard_Boolean IsOnDomS2() const; 0155 0156 //! Returns TRUE if the point is a vertex on the initial 0157 //! restriction facet of the first surface. 0158 Standard_Boolean IsVertexOnS2() const; 0159 0160 //! Returns the information about the point when it is 0161 //! on the domain of the second patch, i-e when the function 0162 //! IsVertexOnS2 returns True. 0163 //! Otherwise, an exception is raised. 0164 const Handle(Adaptor3d_HVertex)& VertexOnS2() const; 0165 0166 //! Returns the arc of restriction containing the 0167 //! vertex. 0168 //! The exception DomainError is raised if 0169 //! IsOnDomS2 returns False. 0170 const Handle(Adaptor2d_Curve2d)& ArcOnS2() const; 0171 0172 //! Returns the transition of the point on the 0173 //! intersection line with the arc on S2. 0174 //! The exception DomainError is raised if IsOnDomS2 0175 //! returns False. 0176 const IntSurf_Transition& TransitionLineArc2() const; 0177 0178 //! Returns the transition between the intersection line 0179 //! returned by the method Line and the arc on S2 returned 0180 //! by ArcOnS2. 0181 //! The exception DomainError is raised if 0182 //! IsOnDomS2 returns False. 0183 const IntSurf_Transition& TransitionOnS2() const; 0184 0185 //! Returns the parameter of the point on the 0186 //! arc returned by the method ArcOnS2. 0187 //! The exception DomainError is raised if 0188 //! IsOnDomS2 returns False. 0189 Standard_Real ParameterOnArc2() const; 0190 0191 //! Returns the PntOn2S 0192 //! (geometric Point and the parameters) 0193 const IntSurf_PntOn2S& PntOn2S() const; 0194 0195 //! Returns the parameters on the first and on the 0196 //! second surface of the point. 0197 void Parameters (Standard_Real& U1, Standard_Real& V1, Standard_Real& U2, Standard_Real& V2) const; 0198 0199 Standard_EXPORT void ReverseTransition(); 0200 0201 Standard_EXPORT void Dump() const; 0202 0203 0204 0205 0206 protected: 0207 0208 0209 0210 0211 0212 private: 0213 0214 0215 0216 IntSurf_PntOn2S pt; 0217 Standard_Real para; 0218 Standard_Real tol; 0219 Standard_Boolean tgt; 0220 0221 //TRUE if the point is in several intersection lines 0222 Standard_Boolean mult; 0223 0224 Standard_Boolean onS1; 0225 Standard_Boolean vtxonS1; 0226 Handle(Adaptor3d_HVertex) vS1; 0227 Handle(Adaptor2d_Curve2d) arcS1; 0228 IntSurf_Transition traline1; 0229 IntSurf_Transition tra1; 0230 Standard_Real prm1; 0231 Standard_Boolean onS2; 0232 Standard_Boolean vtxonS2; 0233 Handle(Adaptor3d_HVertex) vS2; 0234 Handle(Adaptor2d_Curve2d) arcS2; 0235 IntSurf_Transition traline2; 0236 IntSurf_Transition tra2; 0237 Standard_Real prm2; 0238 0239 0240 }; 0241 0242 0243 #include <IntPatch_Point.lxx> 0244 0245 0246 0247 0248 0249 #endif // _IntPatch_Point_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |