Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:39

0001 // Created on: 1993-08-11
0002 // Created by: Remi LEQUETTE
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 _ProjLib_Projector_HeaderFile
0018 #define _ProjLib_Projector_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <GeomAbs_CurveType.hxx>
0025 #include <gp_Lin2d.hxx>
0026 #include <gp_Circ2d.hxx>
0027 #include <gp_Elips2d.hxx>
0028 #include <gp_Hypr2d.hxx>
0029 #include <gp_Parab2d.hxx>
0030 class Geom2d_BSplineCurve;
0031 class Geom2d_BezierCurve;
0032 class gp_Lin;
0033 class gp_Circ;
0034 class gp_Elips;
0035 class gp_Parab;
0036 class gp_Hypr;
0037 
0038 
0039 //! Root class for projection algorithms, stores the result.
0040 class ProjLib_Projector 
0041 {
0042 public:
0043 
0044   DEFINE_STANDARD_ALLOC
0045 
0046   
0047   //! Sets the type to OtherCurve
0048   Standard_EXPORT ProjLib_Projector();
0049   Standard_EXPORT virtual ~ProjLib_Projector();
0050   
0051   Standard_EXPORT Standard_Boolean IsDone() const;
0052   
0053   //! Set isDone = Standard_True;
0054   Standard_EXPORT void Done();
0055   
0056   Standard_EXPORT GeomAbs_CurveType GetType() const;
0057   
0058   Standard_EXPORT void SetBSpline (const Handle(Geom2d_BSplineCurve)& C);
0059   
0060   Standard_EXPORT void SetBezier (const Handle(Geom2d_BezierCurve)& C);
0061   
0062   Standard_EXPORT void SetType (const GeomAbs_CurveType Type);
0063   
0064   Standard_EXPORT Standard_Boolean IsPeriodic() const;
0065   
0066   Standard_EXPORT void SetPeriodic();
0067   
0068   Standard_EXPORT const gp_Lin2d& Line() const;
0069   
0070   Standard_EXPORT const gp_Circ2d& Circle() const;
0071   
0072   Standard_EXPORT const gp_Elips2d& Ellipse() const;
0073   
0074   Standard_EXPORT const gp_Hypr2d& Hyperbola() const;
0075   
0076   Standard_EXPORT const gp_Parab2d& Parabola() const;
0077   
0078   Standard_EXPORT Handle(Geom2d_BezierCurve) Bezier() const;
0079   
0080   Standard_EXPORT Handle(Geom2d_BSplineCurve) BSpline() const;
0081   
0082   Standard_EXPORT virtual void Project (const gp_Lin& L);
0083   
0084   Standard_EXPORT virtual void Project (const gp_Circ& C);
0085   
0086   Standard_EXPORT virtual void Project (const gp_Elips& E);
0087   
0088   Standard_EXPORT virtual void Project (const gp_Parab& P);
0089   
0090   Standard_EXPORT virtual void Project (const gp_Hypr& H);
0091   
0092   //! Translates the 2d curve
0093   //! to set the part of the curve [CFirst, CLast]
0094   //! in the range [ UFirst, UFirst + Period [
0095   Standard_EXPORT void UFrame (const Standard_Real CFirst, const Standard_Real CLast, const Standard_Real UFirst, const Standard_Real Period);
0096   
0097   //! Translates the 2d curve
0098   //! to set the part of the curve [CFirst, CLast]
0099   //! in the range [ VFirst, VFirst + Period [
0100   Standard_EXPORT void VFrame (const Standard_Real CFirst, const Standard_Real CLast, const Standard_Real VFirst, const Standard_Real Period);
0101 
0102 
0103 
0104 
0105 protected:
0106 
0107 
0108 
0109   GeomAbs_CurveType myType;
0110   gp_Lin2d myLin;
0111   gp_Circ2d myCirc;
0112   gp_Elips2d myElips;
0113   gp_Hypr2d myHypr;
0114   gp_Parab2d myParab;
0115   Handle(Geom2d_BSplineCurve) myBSpline;
0116   Handle(Geom2d_BezierCurve) myBezier;
0117   Standard_Boolean myIsPeriodic;
0118   Standard_Boolean isDone;
0119 
0120 
0121 private:
0122 
0123 
0124 
0125 
0126 
0127 };
0128 
0129 
0130 
0131 
0132 
0133 
0134 
0135 #endif // _ProjLib_Projector_HeaderFile