Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:24

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_VPointInter_HeaderFile
0018 #define _TopOpeBRep_VPointInter_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopOpeBRep_PThePointOfIntersection.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <TopAbs_State.hxx>
0026 #include <TopoDS_Shape.hxx>
0027 #include <IntSurf_Transition.hxx>
0028 #include <Standard_OStream.hxx>
0029 class gp_Pnt;
0030 class gp_Pnt2d;
0031 class TopoDS_Edge;
0032 class TopoDS_Face;
0033 
0034 
0035 
0036 class TopOpeBRep_VPointInter 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043     TopOpeBRep_VPointInter();
0044   
0045   Standard_EXPORT void SetPoint (const IntPatch_Point& P);
0046   
0047     void SetShapes (const Standard_Integer I1, const Standard_Integer I2);
0048   
0049     void GetShapes (Standard_Integer& I1, Standard_Integer& I2) const;
0050   
0051     IntSurf_Transition TransitionOnS1() const;
0052   
0053     IntSurf_Transition TransitionOnS2() const;
0054   
0055     IntSurf_Transition TransitionLineArc1() const;
0056   
0057     IntSurf_Transition TransitionLineArc2() const;
0058   
0059     Standard_Boolean IsOnDomS1() const;
0060   
0061     Standard_Boolean IsOnDomS2() const;
0062   
0063     void ParametersOnS1 (Standard_Real& u, Standard_Real& v) const;
0064   
0065     void ParametersOnS2 (Standard_Real& u, Standard_Real& v) const;
0066   
0067     const gp_Pnt& Value() const;
0068   
0069     Standard_Real Tolerance() const;
0070   
0071   Standard_EXPORT const TopoDS_Shape& ArcOnS1() const;
0072   
0073   Standard_EXPORT const TopoDS_Shape& ArcOnS2() const;
0074   
0075     Standard_Real ParameterOnLine() const;
0076   
0077     Standard_Real ParameterOnArc1() const;
0078   
0079   //! Returns TRUE if the point is a vertex on the initial
0080   //! restriction facet of the first surface.
0081     Standard_Boolean IsVertexOnS1() const;
0082   
0083   //! Returns the information about the point when it is
0084   //! on the domain of the first patch, i-e when the function
0085   //! IsVertexOnS1 returns True.
0086   //! Otherwise, an exception is raised.
0087   Standard_EXPORT const TopoDS_Shape& VertexOnS1() const;
0088   
0089     Standard_Real ParameterOnArc2() const;
0090   
0091   //! Returns TRUE if the point is a vertex on the initial
0092   //! restriction facet of the second surface.
0093     Standard_Boolean IsVertexOnS2() const;
0094   
0095   //! Returns the information about the point when it is
0096   //! on the domain of the second patch, i-e when the function
0097   //! IsVertexOnS2 returns True.
0098   //! Otherwise, an exception is raised.
0099   Standard_EXPORT const TopoDS_Shape& VertexOnS2() const;
0100   
0101     Standard_Boolean IsInternal() const;
0102   
0103   //! Returns True if the point belongs to several intersection
0104   //! lines.
0105     Standard_Boolean IsMultiple() const;
0106   
0107   //! get state of VPoint within the domain of geometric shape
0108   //! domain <I> (= 1 or 2).
0109   Standard_EXPORT TopAbs_State State (const Standard_Integer I) const;
0110   
0111   //! Set the state of VPoint within the  domain of
0112   //! the geometric shape <I> (= 1 or 2).
0113   Standard_EXPORT void State (const TopAbs_State S, const Standard_Integer I);
0114   
0115   //! set the shape Eon of shape I (1,2) containing the point,
0116   //! and parameter <Par> of point on <Eon>.
0117   Standard_EXPORT void EdgeON (const TopoDS_Shape& Eon, const Standard_Real Par, const Standard_Integer I);
0118   
0119   //! get the edge of shape I (1,2) containing the point.
0120   Standard_EXPORT const TopoDS_Shape& EdgeON (const Standard_Integer I) const;
0121   
0122   //! get the parameter on edge of shape I (1,2) containing the point.
0123   Standard_EXPORT Standard_Real EdgeONParameter (const Standard_Integer I) const;
0124   
0125   //! returns value of filed myShapeIndex = 0,1,2,3
0126   //! 0 means the VPoint is on no restriction
0127   //! 1 means the VPoint is on the restriction 1
0128   //! 2 means the VPoint is on the restriction 2
0129   //! 3 means the VPoint is on the restrictions 1 and 2
0130     Standard_Integer ShapeIndex() const;
0131   
0132   //! set value of shape supporting me (0,1,2,3).
0133     void ShapeIndex (const Standard_Integer I);
0134   
0135   //! get the edge of shape I (1,2) containing the point.
0136   //! Returned shape is null if the VPoint is not on an edge
0137   //! of shape I (1,2).
0138   Standard_EXPORT const TopoDS_Shape& Edge (const Standard_Integer I) const;
0139   
0140   //! get the parameter on edge of shape I (1,2) containing the point
0141   Standard_EXPORT Standard_Real EdgeParameter (const Standard_Integer I) const;
0142   
0143   //! get the parameter on surface of shape I (1,2) containing the point
0144   Standard_EXPORT gp_Pnt2d SurfaceParameters (const Standard_Integer I) const;
0145   
0146   Standard_EXPORT Standard_Boolean IsVertex (const Standard_Integer I) const;
0147   
0148   Standard_EXPORT const TopoDS_Shape& Vertex (const Standard_Integer I) const;
0149   
0150   //! set myKeep value according to current states.
0151   Standard_EXPORT void UpdateKeep();
0152   
0153 
0154   //! Returns value of myKeep (does not evaluate states)
0155   //! False at creation of VPoint.
0156   //! Updated by State(State from TopAbs,Integer from Standard)
0157     Standard_Boolean Keep() const;
0158   
0159   //! updates VPointInter flag "keep" with <keep>.
0160     void ChangeKeep (const Standard_Boolean keep);
0161   
0162   //! returns <True> if the 3d points and the parameters of the
0163   //! VPoints are same
0164   Standard_EXPORT Standard_Boolean EqualpP (const TopOpeBRep_VPointInter& VP) const;
0165   
0166   //! returns <false> if the vpoint is not given on arc <E>,
0167   //! else returns <par> parameter on <E>
0168   Standard_EXPORT Standard_Boolean ParonE (const TopoDS_Edge& E, Standard_Real& par) const;
0169   
0170     void Index (const Standard_Integer I);
0171   
0172     Standard_Integer Index() const;
0173   
0174   Standard_EXPORT Standard_OStream& Dump (const Standard_Integer I, const TopoDS_Face& F, Standard_OStream& OS) const;
0175   
0176   Standard_EXPORT Standard_OStream& Dump (const TopoDS_Face& F1, const TopoDS_Face& F2, Standard_OStream& OS) const;
0177   
0178   Standard_EXPORT TopOpeBRep_PThePointOfIntersection PThePointOfIntersectionDummy() const;
0179 
0180 
0181 
0182 
0183 protected:
0184 
0185 
0186 
0187 
0188 
0189 private:
0190 
0191 
0192 
0193   TopOpeBRep_PThePointOfIntersection myPPOI;
0194   Standard_Integer myShapeIndex;
0195   TopAbs_State myState1;
0196   TopAbs_State myState2;
0197   Standard_Boolean myKeep;
0198   TopoDS_Shape myEdgeON1;
0199   TopoDS_Shape myEdgeON2;
0200   Standard_Real myEdgeONPar1;
0201   Standard_Real myEdgeONPar2;
0202   Standard_Integer myIndex;
0203   TopoDS_Shape myNullShape;
0204   Standard_Integer myS1;
0205   Standard_Integer myS2;
0206 
0207 
0208 };
0209 
0210 
0211 #include <TopOpeBRep_VPointInter.lxx>
0212 
0213 
0214 
0215 
0216 
0217 #endif // _TopOpeBRep_VPointInter_HeaderFile