Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 09:19:30

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