Back to home page

EIC code displayed by LXR

 
 

    


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_Line_HeaderFile
0018 #define _IntPatch_Line_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IntPatch_IType.hxx>
0024 #include <IntSurf_TypeTrans.hxx>
0025 #include <IntSurf_Situation.hxx>
0026 #include <Standard_Transient.hxx>
0027 
0028 
0029 class IntPatch_Line;
0030 DEFINE_STANDARD_HANDLE(IntPatch_Line, Standard_Transient)
0031 
0032 //! Definition of an intersection line between two
0033 //! surfaces.
0034 //! A line may be either geometric : line, circle, ellipse,
0035 //! parabola, hyperbola, as defined in the class GLine,
0036 //! or analytic, as defined in the class ALine, or defined
0037 //! by a set of points (coming from a walking algorithm) as
0038 //! defined in the class WLine.
0039 class IntPatch_Line : public Standard_Transient
0040 {
0041 
0042 public:
0043 
0044   
0045   //! To set the values returned by IsUIsoS1,....
0046   //! The default values are False.
0047     void SetValue (const Standard_Boolean Uiso1, const Standard_Boolean Viso1, const Standard_Boolean Uiso2, const Standard_Boolean Viso2);
0048   
0049   //! Returns the type of geometry 3d (Line, Circle, Parabola,
0050   //! Hyperbola, Ellipse, Analytic, Walking, Restriction)
0051     IntPatch_IType ArcType() const;
0052   
0053   //! Returns TRUE if the intersection is a line of tangency
0054   //! between the 2 patches.
0055     Standard_Boolean IsTangent() const;
0056   
0057   //! Returns the type of the transition of the line
0058   //! for the first surface. The transition is "constant"
0059   //! along the line.
0060   //! The transition is IN if the line is oriented in such
0061   //! a way that the system of vector (N1,N2,T) is right-handed,
0062   //! where N1 is the normal to the first surface at a point P,
0063   //! N2 is the normal to the second surface at a point P,
0064   //! T  is the tangent to the intersection line at P.
0065   //! If the system of vector is left-handed, the transition
0066   //! is OUT.
0067   //! When N1 and N2 are colinear all along the intersection
0068   //! line, the transition will be
0069   //! - TOUCH, if it is possible to use the 2nd derivatives
0070   //! to determine the position of one surafce compared
0071   //! to the other (see Situation)
0072   //! - UNDECIDED otherwise.
0073   //!
0074   //! If one of the transition is TOUCH or UNDECIDED, the other
0075   //! one has got the same value.
0076     IntSurf_TypeTrans TransitionOnS1() const;
0077   
0078   //! Returns the type of the transition of the line
0079   //! for the second surface. The transition is "constant"
0080   //! along the line.
0081     IntSurf_TypeTrans TransitionOnS2() const;
0082   
0083   //! Returns the situation (INSIDE/OUTSIDE/UNKNOWN) of
0084   //! the first patch compared to the second one, when
0085   //! TransitionOnS1 or TransitionOnS2 returns TOUCH.
0086   //! Otherwise, an exception is raised.
0087     IntSurf_Situation SituationS1() const;
0088   
0089   //! Returns the situation (INSIDE/OUTSIDE/UNKNOWN) of
0090   //! the second patch compared to the first one, when
0091   //! TransitionOnS1 or TransitionOnS2 returns TOUCH.
0092   //! Otherwise, an exception is raised.
0093     IntSurf_Situation SituationS2() const;
0094   
0095   //! Returns TRUE if the intersection is a U isoparametric curve
0096   //! on the first patch.
0097     Standard_Boolean IsUIsoOnS1() const;
0098   
0099   //! Returns TRUE if the intersection is a V isoparametric curve
0100   //! on the first patch.
0101     Standard_Boolean IsVIsoOnS1() const;
0102   
0103   //! Returns TRUE if the intersection is a U isoparametric curve
0104   //! on the second patch.
0105     Standard_Boolean IsUIsoOnS2() const;
0106   
0107   //! Returns TRUE if the intersection is a V isoparametric curve
0108   //! on the second patch.
0109     Standard_Boolean IsVIsoOnS2() const;
0110 
0111 
0112 
0113 
0114   DEFINE_STANDARD_RTTIEXT(IntPatch_Line,Standard_Transient)
0115 
0116 protected:
0117 
0118   
0119   //! To initialize the fields, when the transitions
0120   //! are In or Out.
0121   Standard_EXPORT IntPatch_Line(const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0122   
0123   //! To initialize the fields, when the transitions
0124   //! are Touch.
0125   Standard_EXPORT IntPatch_Line(const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0126   
0127   //! To initialize the fields, when the transitions
0128   //! are Undecided.
0129   Standard_EXPORT IntPatch_Line(const Standard_Boolean Tang);
0130 
0131   IntPatch_IType typ;
0132 
0133 
0134 private:
0135 
0136 
0137   Standard_Boolean tg;
0138   IntSurf_TypeTrans tS1;
0139   IntSurf_TypeTrans tS2;
0140   IntSurf_Situation sit1;
0141   IntSurf_Situation sit2;
0142   Standard_Boolean uS1;
0143   Standard_Boolean vS1;
0144   Standard_Boolean uS2;
0145   Standard_Boolean vS2;
0146 
0147 
0148 };
0149 
0150 
0151 #include <IntPatch_Line.lxx>
0152 
0153 
0154 
0155 
0156 
0157 #endif // _IntPatch_Line_HeaderFile