Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-19 09:29:44

0001 // Created on: 1993-11-10
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1993-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 _TopOpeBRep_LineInter_HeaderFile
0018 #define _TopOpeBRep_LineInter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <TopOpeBRep_TypeLineCurve.hxx>
0027 #include <TopOpeBRep_WPointInter.hxx>
0028 #include <TopOpeBRep_VPointInter.hxx>
0029 #include <NCollection_Array1.hxx>
0030 #include <NCollection_HArray1.hxx>
0031 #include <TopoDS_Face.hxx>
0032 #include <TopOpeBRepDS_Transition.hxx>
0033 #include <TopoDS_Shape.hxx>
0034 #include <Standard_Real.hxx>
0035 #include <IntSurf_TypeTrans.hxx>
0036 #include <IntSurf_Situation.hxx>
0037 #include <Standard_OStream.hxx>
0038 class IntPatch_Line;
0039 class IntPatch_ALine;
0040 class IntPatch_RLine;
0041 class IntPatch_WLine;
0042 class IntPatch_GLine;
0043 class BRepAdaptor_Surface;
0044 class TopOpeBRep_VPointInter;
0045 class Geom_Curve;
0046 class TCollection_AsciiString;
0047 class TopOpeBRep_Bipoint;
0048 
0049 class TopOpeBRep_LineInter
0050 {
0051 public:
0052   DEFINE_STANDARD_ALLOC
0053 
0054   TopOpeBRep_LineInter();
0055 
0056   Standard_EXPORT void SetLine(const occ::handle<IntPatch_Line>& L,
0057                                const BRepAdaptor_Surface&        S1,
0058                                const BRepAdaptor_Surface&        S2);
0059 
0060   void SetFaces(const TopoDS_Face& F1, const TopoDS_Face& F2);
0061 
0062   TopOpeBRep_TypeLineCurve TypeLineCurve() const;
0063 
0064   int NbVPoint() const;
0065 
0066   Standard_EXPORT const TopOpeBRep_VPointInter& VPoint(const int I) const;
0067 
0068   Standard_EXPORT TopOpeBRep_VPointInter& ChangeVPoint(const int I);
0069 
0070   Standard_EXPORT void SetINL();
0071 
0072   bool INL() const;
0073 
0074   Standard_EXPORT void SetIsVClosed();
0075 
0076   bool IsVClosed() const;
0077 
0078   Standard_EXPORT void SetOK(const bool B);
0079 
0080   bool OK() const;
0081 
0082   Standard_EXPORT void SetHasVPonR();
0083 
0084   bool HasVPonR() const;
0085 
0086   Standard_EXPORT void SetVPBounds();
0087 
0088   Standard_EXPORT void VPBounds(int& f, int& l, int& n) const;
0089 
0090   Standard_EXPORT bool IsPeriodic() const;
0091 
0092   Standard_EXPORT double Period() const;
0093 
0094   Standard_EXPORT void Bounds(double& f, double& l) const;
0095 
0096   Standard_EXPORT bool HasVInternal();
0097 
0098   Standard_EXPORT int NbWPoint() const;
0099 
0100   Standard_EXPORT const TopOpeBRep_WPointInter& WPoint(const int I);
0101 
0102   IntSurf_TypeTrans TransitionOnS1() const;
0103 
0104   IntSurf_TypeTrans TransitionOnS2() const;
0105 
0106   IntSurf_Situation SituationS1() const;
0107 
0108   IntSurf_Situation SituationS2() const;
0109 
0110   Standard_EXPORT occ::handle<Geom_Curve> Curve() const;
0111 
0112   Standard_EXPORT occ::handle<Geom_Curve> Curve(const double parmin, const double parmax) const;
0113 
0114   //! returns the edge of a RESTRICTION line (or a null edge).
0115   Standard_EXPORT const TopoDS_Shape& Arc() const;
0116 
0117   //! returns true if Arc() edge (of a RESTRICTION line) is
0118   //! an edge of the original face <Index> (1 or 2).
0119   Standard_EXPORT bool ArcIsEdge(const int I) const;
0120 
0121   const occ::handle<IntPatch_WLine>& LineW() const;
0122 
0123   const occ::handle<IntPatch_GLine>& LineG() const;
0124 
0125   const occ::handle<IntPatch_RLine>& LineR() const;
0126 
0127   Standard_EXPORT bool HasFirstPoint() const;
0128 
0129   Standard_EXPORT bool HasLastPoint() const;
0130 
0131   Standard_EXPORT void ComputeFaceFaceTransition();
0132 
0133   Standard_EXPORT const TopOpeBRepDS_Transition& FaceFaceTransition(const int I) const;
0134 
0135   void Index(const int I);
0136 
0137   int Index() const;
0138 
0139   Standard_EXPORT void DumpType() const;
0140 
0141   Standard_EXPORT void DumpVPoint(const int                      I,
0142                                   const TCollection_AsciiString& s1,
0143                                   const TCollection_AsciiString& s2) const;
0144 
0145   Standard_EXPORT void DumpBipoint(const TopOpeBRep_Bipoint&      B,
0146                                    const TCollection_AsciiString& s1,
0147                                    const TCollection_AsciiString& s2) const;
0148 
0149   Standard_EXPORT void SetTraceIndex(const int exF1, const int exF2);
0150 
0151   Standard_EXPORT void GetTraceIndex(int& exF1, int& exF2) const;
0152 
0153   Standard_EXPORT Standard_OStream& DumpLineTransitions(Standard_OStream& OS) const;
0154 
0155 private:
0156   bool                                                     myOK;
0157   int                                                      myIndex;
0158   int                                                      myNbVPoint;
0159   bool                                                     myIsVClosed;
0160   bool                                                     myHasVPonR;
0161   bool                                                     myINL;
0162   bool                                                     myVPBDefined;
0163   int                                                      myVPF;
0164   int                                                      myVPL;
0165   int                                                      myVPN;
0166   TopOpeBRep_TypeLineCurve                                 myTypeLineCurve;
0167   occ::handle<IntPatch_Line>                               myIL;
0168   occ::handle<IntPatch_ALine>                              myILA;
0169   occ::handle<IntPatch_RLine>                              myILR;
0170   occ::handle<IntPatch_WLine>                              myILW;
0171   occ::handle<IntPatch_GLine>                              myILG;
0172   TopOpeBRep_WPointInter                                   myCurrentWP;
0173   occ::handle<NCollection_HArray1<TopOpeBRep_VPointInter>> myHAVP;
0174   TopoDS_Face                                              myF1;
0175   TopoDS_Face                                              myF2;
0176   TopOpeBRepDS_Transition                                  myLineTonF1;
0177   TopOpeBRepDS_Transition                                  myLineTonF2;
0178   TopoDS_Shape                                             myNullShape;
0179   int                                                      myexF1;
0180   int                                                      myexF2;
0181 };
0182 
0183 #include <TopOpeBRep_LineInter.lxx>
0184 
0185 #endif // _TopOpeBRep_LineInter_HeaderFile