Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:09

0001 // Created on: 1992-04-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_GLine_HeaderFile
0018 #define _IntPatch_GLine_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_Ax2.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <IntPatch_SequenceOfPoint.hxx>
0026 #include <IntPatch_Line.hxx>
0027 #include <IntSurf_TypeTrans.hxx>
0028 #include <IntSurf_Situation.hxx>
0029 #include <gp_Circ.hxx>
0030 class gp_Lin;
0031 class gp_Circ;
0032 class gp_Elips;
0033 class gp_Parab;
0034 class gp_Hypr;
0035 class IntPatch_Point;
0036 
0037 
0038 class IntPatch_GLine;
0039 DEFINE_STANDARD_HANDLE(IntPatch_GLine, IntPatch_Line)
0040 
0041 //! Implementation of an intersection line represented
0042 //! by a conic.
0043 class IntPatch_GLine : public IntPatch_Line
0044 {
0045 
0046 public:
0047 
0048   
0049   //! Creates a Line as intersection line
0050   //! when the transitions are In or Out.
0051   Standard_EXPORT IntPatch_GLine(const gp_Lin& L, const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0052   
0053   //! Creates a Line as intersection line
0054   //! when the transitions are Touch.
0055   Standard_EXPORT IntPatch_GLine(const gp_Lin& L, const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0056   
0057   //! Creates a Line as intersection line
0058   //! when the transitions are Undecided.
0059   Standard_EXPORT IntPatch_GLine(const gp_Lin& L, const Standard_Boolean Tang);
0060   
0061   //! Creates a circle as intersection line
0062   //! when the transitions are In or Out.
0063   Standard_EXPORT IntPatch_GLine(const gp_Circ& C, const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0064   
0065   //! Creates a circle as intersection line
0066   //! when the transitions are Touch.
0067   Standard_EXPORT IntPatch_GLine(const gp_Circ& C, const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0068   
0069   //! Creates a circle as intersection line
0070   //! when the transitions are Undecided.
0071   Standard_EXPORT IntPatch_GLine(const gp_Circ& C, const Standard_Boolean Tang);
0072   
0073   //! Creates an ellipse as intersection line
0074   //! when the transitions are In or Out.
0075   Standard_EXPORT IntPatch_GLine(const gp_Elips& E, const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0076   
0077   //! Creates an ellispe as intersection line
0078   //! when the transitions are Touch.
0079   Standard_EXPORT IntPatch_GLine(const gp_Elips& E, const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0080   
0081   //! Creates an ellipse as intersection line
0082   //! when the transitions are Undecided.
0083   Standard_EXPORT IntPatch_GLine(const gp_Elips& E, const Standard_Boolean Tang);
0084   
0085   //! Creates a parabola as intersection line
0086   //! when the transitions are In or Out.
0087   Standard_EXPORT IntPatch_GLine(const gp_Parab& P, const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0088   
0089   //! Creates a parabola as intersection line
0090   //! when the transitions are Touch.
0091   Standard_EXPORT IntPatch_GLine(const gp_Parab& P, const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0092   
0093   //! Creates a parabola as intersection line
0094   //! when the transitions are Undecided.
0095   Standard_EXPORT IntPatch_GLine(const gp_Parab& P, const Standard_Boolean Tang);
0096   
0097   //! Creates an hyperbola as intersection line
0098   //! when the transitions are In or Out.
0099   Standard_EXPORT IntPatch_GLine(const gp_Hypr& H, const Standard_Boolean Tang, const IntSurf_TypeTrans Trans1, const IntSurf_TypeTrans Trans2);
0100   
0101   //! Creates an hyperbola as intersection line
0102   //! when the transitions are Touch.
0103   Standard_EXPORT IntPatch_GLine(const gp_Hypr& H, const Standard_Boolean Tang, const IntSurf_Situation Situ1, const IntSurf_Situation Situ2);
0104   
0105   //! Creates an hyperbola as  intersection line
0106   //! when the transitions are Undecided.
0107   Standard_EXPORT IntPatch_GLine(const gp_Hypr& H, const Standard_Boolean Tang);
0108   
0109   //! To add a vertex in the list.
0110   Standard_EXPORT void AddVertex (const IntPatch_Point& Pnt);
0111   
0112   //! To replace the element of range Index in the list
0113   //! of points.
0114   Standard_EXPORT void Replace (const Standard_Integer Index, const IntPatch_Point& Pnt);
0115   
0116     void SetFirstPoint (const Standard_Integer IndFirst);
0117   
0118     void SetLastPoint (const Standard_Integer IndLast);
0119   
0120   //! Returns the Lin from gp corresponding to the intersection
0121   //! when ArcType returns IntPatch_Line.
0122     gp_Lin Line() const;
0123   
0124   //! Returns the Circ from gp corresponding to the intersection
0125   //! when ArcType returns IntPatch_Circle.
0126     gp_Circ Circle() const;
0127   
0128   //! Returns the Elips from gp corresponding to the intersection
0129   //! when ArcType returns IntPatch_Ellipse.
0130     gp_Elips Ellipse() const;
0131   
0132   //! Returns the Parab from gp corresponding to the intersection
0133   //! when ArcType returns IntPatch_Parabola.
0134     gp_Parab Parabola() const;
0135   
0136   //! Returns the Hypr from gp corresponding to the intersection
0137   //! when ArcType returns IntPatch_Hyperbola.
0138     gp_Hypr Hyperbola() const;
0139   
0140   //! Returns True if the line has a known First point.
0141   //! This point is given by the method FirstPoint().
0142     Standard_Boolean HasFirstPoint() const;
0143   
0144   //! Returns True if the line has a known Last point.
0145   //! This point is given by the method LastPoint().
0146     Standard_Boolean HasLastPoint() const;
0147   
0148   //! Returns the IntPoint corresponding to the FirstPoint.
0149   //! An exception is raised when HasFirstPoint returns False.
0150     const IntPatch_Point& FirstPoint() const;
0151   
0152   //! Returns the IntPoint corresponding to the LastPoint.
0153   //! An exception is raised when HasLastPoint returns False.
0154     const IntPatch_Point& LastPoint() const;
0155   
0156     Standard_Integer NbVertex() const;
0157   
0158   //! Returns the vertex of range Index on the line.
0159     const IntPatch_Point& Vertex (const Standard_Integer Index) const;
0160   
0161   //! Set the parameters of all the vertex on the line.
0162   //! if a vertex is already in the line,
0163   //! its parameter is modified
0164   //! else a new point in the line is inserted.
0165   Standard_EXPORT void ComputeVertexParameters (const Standard_Real Tol);
0166 
0167 
0168 
0169 
0170   DEFINE_STANDARD_RTTIEXT(IntPatch_GLine,IntPatch_Line)
0171 
0172 protected:
0173 
0174 
0175 
0176 
0177 private:
0178 
0179 
0180   gp_Ax2 pos;
0181   Standard_Real par1;
0182   Standard_Real par2;
0183   Standard_Boolean fipt;
0184   Standard_Boolean lapt;
0185   Standard_Integer indf;
0186   Standard_Integer indl;
0187   IntPatch_SequenceOfPoint svtx;
0188 
0189 
0190 };
0191 
0192 
0193 #include <IntPatch_GLine.lxx>
0194 
0195 
0196 
0197 
0198 
0199 #endif // _IntPatch_GLine_HeaderFile