Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-30 09:05:29

0001 // Created on: 1993-06-24
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 _TopOpeBRepTool_CurveTool_HeaderFile
0018 #define _TopOpeBRepTool_CurveTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopOpeBRepTool_GeomTool.hxx>
0025 #include <TopOpeBRepTool_OutCurveType.hxx>
0026 #include <gp_Pnt.hxx>
0027 #include <NCollection_Array1.hxx>
0028 #include <gp_Pnt2d.hxx>
0029 class Geom_Curve;
0030 class Geom2d_Curve;
0031 class TopoDS_Shape;
0032 
0033 class TopOpeBRepTool_CurveTool
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   Standard_EXPORT TopOpeBRepTool_CurveTool();
0039 
0040   Standard_EXPORT TopOpeBRepTool_CurveTool(const TopOpeBRepTool_OutCurveType OCT);
0041 
0042   Standard_EXPORT TopOpeBRepTool_CurveTool(const TopOpeBRepTool_GeomTool& GT);
0043 
0044   Standard_EXPORT TopOpeBRepTool_GeomTool& ChangeGeomTool();
0045 
0046   Standard_EXPORT const TopOpeBRepTool_GeomTool& GetGeomTool() const;
0047 
0048   Standard_EXPORT void SetGeomTool(const TopOpeBRepTool_GeomTool& GT);
0049 
0050   //! Approximates curves.
0051   //! Returns False in the case of failure
0052   Standard_EXPORT bool MakeCurves(const double                     min,
0053                                   const double                     max,
0054                                   const occ::handle<Geom_Curve>&   C3D,
0055                                   const occ::handle<Geom2d_Curve>& PC1,
0056                                   const occ::handle<Geom2d_Curve>& PC2,
0057                                   const TopoDS_Shape&              S1,
0058                                   const TopoDS_Shape&              S2,
0059                                   occ::handle<Geom_Curve>&         C3DN,
0060                                   occ::handle<Geom2d_Curve>&       PC1N,
0061                                   occ::handle<Geom2d_Curve>&       PC2N,
0062                                   double&                          Tol3d,
0063                                   double&                          Tol2d) const;
0064 
0065   Standard_EXPORT static occ::handle<Geom_Curve> MakeBSpline1fromPnt(
0066     const NCollection_Array1<gp_Pnt>& P);
0067 
0068   Standard_EXPORT static occ::handle<Geom2d_Curve> MakeBSpline1fromPnt2d(
0069     const NCollection_Array1<gp_Pnt2d>& P);
0070 
0071   Standard_EXPORT static bool IsProjectable(const TopoDS_Shape&            S,
0072                                             const occ::handle<Geom_Curve>& C);
0073 
0074   Standard_EXPORT static occ::handle<Geom2d_Curve> MakePCurveOnFace(
0075     const TopoDS_Shape&            S,
0076     const occ::handle<Geom_Curve>& C,
0077     double&                        TolReached2d,
0078     const double                   first = 0.0,
0079     const double                   last  = 0.0);
0080 
0081 protected:
0082   TopOpeBRepTool_GeomTool myGeomTool;
0083 };
0084 
0085 #endif // _TopOpeBRepTool_CurveTool_HeaderFile