Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:17

0001 // Created on: 1994-04-01
0002 // Created by: Modelistation
0003 // Copyright (c) 1994-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 _BRepTopAdaptor_TopolTool_HeaderFile
0018 #define _BRepTopAdaptor_TopolTool_HeaderFile
0019 
0020 #include <Adaptor2d_Curve2d.hxx>
0021 #include <Adaptor3d_Surface.hxx>
0022 #include <BRepAdaptor_Curve2d.hxx>
0023 #include <TopExp_Explorer.hxx>
0024 #include <TopoDS_Face.hxx>
0025 #include <TColStd_ListIteratorOfListOfTransient.hxx>
0026 #include <Adaptor3d_TopolTool.hxx>
0027 #include <TopAbs_State.hxx>
0028 #include <TopAbs_Orientation.hxx>
0029 
0030 class Adaptor3d_HVertex;
0031 class gp_Pnt2d;
0032 class gp_Pnt;
0033 
0034 class BRepTopAdaptor_TopolTool;
0035 DEFINE_STANDARD_HANDLE(BRepTopAdaptor_TopolTool, Adaptor3d_TopolTool)
0036 
0037 
0038 class BRepTopAdaptor_TopolTool : public Adaptor3d_TopolTool
0039 {
0040 
0041 public:
0042 
0043   
0044   Standard_EXPORT BRepTopAdaptor_TopolTool();
0045   
0046   Standard_EXPORT BRepTopAdaptor_TopolTool(const Handle(Adaptor3d_Surface)& Surface);
0047   
0048   Standard_EXPORT virtual void Initialize() Standard_OVERRIDE;
0049   
0050   Standard_EXPORT virtual void Initialize (const Handle(Adaptor3d_Surface)& S) Standard_OVERRIDE;
0051   
0052   Standard_EXPORT virtual void Initialize (const Handle(Adaptor2d_Curve2d)& Curve) Standard_OVERRIDE;
0053   
0054   Standard_EXPORT virtual void Init() Standard_OVERRIDE;
0055   
0056   Standard_EXPORT virtual Standard_Boolean More() Standard_OVERRIDE;
0057   
0058   Standard_EXPORT virtual Handle(Adaptor2d_Curve2d) Value() Standard_OVERRIDE;
0059   
0060   Standard_EXPORT virtual void Next() Standard_OVERRIDE;
0061   
0062   Standard_EXPORT virtual Standard_Address Edge() const Standard_OVERRIDE;
0063   
0064   Standard_EXPORT virtual void InitVertexIterator() Standard_OVERRIDE;
0065   
0066   Standard_EXPORT virtual Standard_Boolean MoreVertex() Standard_OVERRIDE;
0067   
0068   Standard_EXPORT virtual Handle(Adaptor3d_HVertex) Vertex() Standard_OVERRIDE;
0069   
0070   Standard_EXPORT virtual void NextVertex() Standard_OVERRIDE;
0071   
0072   Standard_EXPORT virtual TopAbs_State Classify (const gp_Pnt2d& P2d, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) Standard_OVERRIDE;
0073   
0074   //! see the code for specifications)
0075   Standard_EXPORT virtual Standard_Boolean IsThePointOn (const gp_Pnt2d& P2d, const Standard_Real Tol, const Standard_Boolean RecadreOnPeriodic = Standard_True) Standard_OVERRIDE;
0076   
0077   //! If the function returns the orientation of the arc.
0078   //! If the orientation is FORWARD or REVERSED, the arc is
0079   //! a "real" limit of the surface.
0080   //! If the orientation is INTERNAL or EXTERNAL, the arc is
0081   //! considered as an arc on the surface.
0082   Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor2d_Curve2d)& C) Standard_OVERRIDE;
0083   
0084   //! If the function returns the orientation of the arc.
0085   //! If the orientation is FORWARD or REVERSED, the arc is
0086   //! a "real" limit of the surface.
0087   //! If the orientation is INTERNAL or EXTERNAL, the arc is
0088   //! considered as an arc on the surface.
0089   Standard_EXPORT virtual TopAbs_Orientation Orientation (const Handle(Adaptor3d_HVertex)& C) Standard_OVERRIDE;
0090   
0091   Standard_EXPORT void Destroy();
0092 ~BRepTopAdaptor_TopolTool()
0093 {
0094   Destroy();
0095 }
0096   
0097   //! answers if arcs and vertices may have 3d representations,
0098   //! so that we could use Tol3d and Pnt methods.
0099   Standard_EXPORT virtual Standard_Boolean Has3d() const Standard_OVERRIDE;
0100   
0101   //! returns 3d tolerance of the arc C
0102   Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor2d_Curve2d)& C) const Standard_OVERRIDE;
0103   
0104   //! returns 3d tolerance of the vertex V
0105   Standard_EXPORT virtual Standard_Real Tol3d (const Handle(Adaptor3d_HVertex)& V) const Standard_OVERRIDE;
0106   
0107   //! returns 3d point of the vertex V
0108   Standard_EXPORT virtual gp_Pnt Pnt (const Handle(Adaptor3d_HVertex)& V) const Standard_OVERRIDE;
0109   
0110   Standard_EXPORT virtual void ComputeSamplePoints() Standard_OVERRIDE;
0111   
0112   //! compute the sample-points for the intersections algorithms
0113   Standard_EXPORT virtual Standard_Integer NbSamplesU() Standard_OVERRIDE;
0114   
0115   //! compute the sample-points for the intersections algorithms
0116   Standard_EXPORT virtual Standard_Integer NbSamplesV() Standard_OVERRIDE;
0117   
0118   //! compute the sample-points for the intersections algorithms
0119   Standard_EXPORT virtual Standard_Integer NbSamples() Standard_OVERRIDE;
0120   
0121   Standard_EXPORT virtual void SamplePoint (const Standard_Integer Index, gp_Pnt2d& P2d, gp_Pnt& P3d) Standard_OVERRIDE;
0122   
0123   Standard_EXPORT virtual Standard_Boolean DomainIsInfinite() Standard_OVERRIDE;
0124 
0125 
0126 
0127   DEFINE_STANDARD_RTTIEXT(BRepTopAdaptor_TopolTool,Adaptor3d_TopolTool)
0128 
0129 protected:
0130 
0131 
0132 
0133 
0134 private:
0135 
0136 
0137   TopExp_Explorer myVIterator;
0138   TopoDS_Face myFace;
0139   Standard_Address myFClass2d;
0140   Handle(BRepAdaptor_Curve2d) myCurve;
0141   TColStd_ListOfTransient myCurves;
0142   TColStd_ListIteratorOfListOfTransient myCIterator;
0143   Standard_Real myU0;
0144   Standard_Real myV0;
0145   Standard_Real myDU;
0146   Standard_Real myDV;
0147 
0148 
0149 };
0150 
0151 
0152 
0153 
0154 
0155 
0156 
0157 #endif // _BRepTopAdaptor_TopolTool_HeaderFile