Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-02-09
0002 // Created by: Jean Yves LEBEY
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 _TopOpeBRepTool_ShapeTool_HeaderFile
0018 #define _TopOpeBRepTool_ShapeTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 class TopoDS_Shape;
0025 class gp_Pnt;
0026 class Geom_Curve;
0027 class TopoDS_Edge;
0028 class Geom_Surface;
0029 class TopoDS_Face;
0030 class BRepAdaptor_Surface;
0031 class BRepAdaptor_Curve;
0032 class gp_Dir;
0033 
0034 
0035 
0036 class TopOpeBRepTool_ShapeTool 
0037 {
0038 public:
0039 
0040   DEFINE_STANDARD_ALLOC
0041 
0042   
0043   //! Returns the tolerance of the shape <S>.
0044   //! If the shape <S> is Null, returns 0.
0045   Standard_EXPORT static Standard_Real Tolerance (const TopoDS_Shape& S);
0046   
0047   //! Returns 3D point of vertex <S>.
0048   Standard_EXPORT static gp_Pnt Pnt (const TopoDS_Shape& S);
0049   
0050   Standard_EXPORT static Handle(Geom_Curve) BASISCURVE (const Handle(Geom_Curve)& C);
0051   
0052   Standard_EXPORT static Handle(Geom_Curve) BASISCURVE (const TopoDS_Edge& E);
0053   
0054   Standard_EXPORT static Handle(Geom_Surface) BASISSURFACE (const Handle(Geom_Surface)& S);
0055   
0056   Standard_EXPORT static Handle(Geom_Surface) BASISSURFACE (const TopoDS_Face& F);
0057   
0058   Standard_EXPORT static void UVBOUNDS (const Handle(Geom_Surface)& S, Standard_Boolean& UPeri, Standard_Boolean& VPeri, Standard_Real& Umin, Standard_Real& Umax, Standard_Real& Vmin, Standard_Real& Vmax);
0059   
0060   Standard_EXPORT static void UVBOUNDS (const TopoDS_Face& F, Standard_Boolean& UPeri, Standard_Boolean& VPeri, Standard_Real& Umin, Standard_Real& Umax, Standard_Real& Vmin, Standard_Real& Vmax);
0061   
0062   //! adjust u,v values in UVBounds of the domain of the
0063   //! geometric shape <S>, according to Uperiodicity and
0064   //! VPeriodicity of the domain.
0065   //! <S> is assumed to be a face.
0066   //! u and/or v is/are not modified when the domain is
0067   //! not periodic in U and/or V .
0068   Standard_EXPORT static void AdjustOnPeriodic (const TopoDS_Shape& S, Standard_Real& u, Standard_Real& v);
0069   
0070   //! indicates whether shape S1 is a closing shape on S2 or not.
0071   Standard_EXPORT static Standard_Boolean Closed (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
0072   
0073   Standard_EXPORT static Standard_Real PeriodizeParameter (const Standard_Real par, const TopoDS_Shape& EE, const TopoDS_Shape& FF);
0074   
0075   Standard_EXPORT static Standard_Boolean ShapesSameOriented (const TopoDS_Shape& S1, const TopoDS_Shape& S2);
0076   
0077   Standard_EXPORT static Standard_Boolean SurfacesSameOriented (const BRepAdaptor_Surface& S1, const BRepAdaptor_Surface& S2);
0078   
0079   Standard_EXPORT static Standard_Boolean FacesSameOriented (const TopoDS_Shape& F1, const TopoDS_Shape& F2);
0080   
0081   Standard_EXPORT static Standard_Boolean CurvesSameOriented (const BRepAdaptor_Curve& C1, const BRepAdaptor_Curve& C2);
0082   
0083   Standard_EXPORT static Standard_Boolean EdgesSameOriented (const TopoDS_Shape& E1, const TopoDS_Shape& E2);
0084   
0085 
0086   //! Compute tangent T, normal N, curvature C at point of parameter
0087   //! P on curve BRAC. Returns the tolerance indicating if T,N are null.
0088   Standard_EXPORT static Standard_Real EdgeData (const BRepAdaptor_Curve& BRAC, const Standard_Real P, gp_Dir& T, gp_Dir& N, Standard_Real& C);
0089   
0090   //! Same as previous on edge E.
0091   Standard_EXPORT static Standard_Real EdgeData (const TopoDS_Shape& E, const Standard_Real P, gp_Dir& T, gp_Dir& N, Standard_Real& C);
0092   
0093   Standard_EXPORT static Standard_Real Resolution3dU (const Handle(Geom_Surface)& SU, const Standard_Real Tol2d);
0094   
0095   Standard_EXPORT static Standard_Real Resolution3dV (const Handle(Geom_Surface)& SU, const Standard_Real Tol2d);
0096   
0097   Standard_EXPORT static Standard_Real Resolution3d (const Handle(Geom_Surface)& SU, const Standard_Real Tol2d);
0098   
0099   Standard_EXPORT static Standard_Real Resolution3d (const TopoDS_Face& F, const Standard_Real Tol2d);
0100 
0101 
0102 
0103 
0104 protected:
0105 
0106 
0107 
0108 
0109 
0110 private:
0111 
0112 
0113 
0114 
0115 
0116 };
0117 
0118 
0119 
0120 
0121 
0122 
0123 
0124 #endif // _TopOpeBRepTool_ShapeTool_HeaderFile