Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1991-06-24
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1991-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 _DrawTrSurf_HeaderFile
0018 #define _DrawTrSurf_HeaderFile
0019 
0020 #include <Draw_Interpretor.hxx>
0021 #include <Geom_Geometry.hxx>
0022 #include <Geom_Surface.hxx>
0023 #include <Geom2d_Curve.hxx>
0024 
0025 class Geom_BezierCurve;
0026 class Geom_BezierSurface;
0027 class Geom_BSplineCurve;
0028 class Geom_BSplineSurface;
0029 class Geom2d_BezierCurve;
0030 class Geom2d_BSplineCurve;
0031 class Poly_Polygon2D;
0032 class Poly_Polygon3D;
0033 class Poly_Triangulation;
0034 struct DrawTrSurf_Params;
0035 
0036 //! This package supports the display of parametric curves and surfaces.
0037 //!
0038 //! The  Drawable deferred  classes is  inherited from
0039 //! the Drawable3D  class  from  the package Draw,  it
0040 //! adds methods to  draw 3D Curves  and  Curves on 3D
0041 //! Surfaces.
0042 //!
0043 //! The classes Curve Curve2d and Surface are drawable
0044 //! and  can be  used  to  draw a   single  curve from
0045 //! packages Geom or Geom2d or a surface from Geom.
0046 //!
0047 //! The Triangulation and Polygon from the package Poly are also supported.
0048 class DrawTrSurf 
0049 {
0050 public:
0051 
0052   DEFINE_STANDARD_ALLOC
0053 
0054   //! Sets <G> in the variable <Name>.  Overwrite the
0055   //! variable if already set.
0056   Standard_EXPORT static void Set (const Standard_CString Name, const gp_Pnt& G);
0057   
0058   //! Sets <G> in the variable <Name>.  Overwrite the
0059   //! variable if already set.
0060   Standard_EXPORT static void Set (const Standard_CString Name, const gp_Pnt2d& G);
0061   
0062   //! Sets <G> in the variable <Name>.  Overwrite the
0063   //! variable if already set.
0064   //! isSenseMarker indicates whether to render the
0065   //! sense glyph (arrow) for curves or not
0066   Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Geom_Geometry)& G, const Standard_Boolean isSenseMarker = Standard_True);
0067 template <class T> static void Set (const Standard_CString Name, const Handle(T)& Arg, typename opencascade::std::enable_if<opencascade::std::is_base_of<Geom_Geometry, T>::value>::type * = 0) { Set (Name, (const Handle(Geom_Geometry)&)Arg); }
0068   
0069   //! Sets <C> in the variable <Name>.  Overwrite the
0070   //! variable if already set.
0071   //! isSenseMarker indicates whether to render the
0072   //! sense glyph (arrow) for curves or not
0073   Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Geom2d_Curve)& C, const Standard_Boolean isSenseMarker = Standard_True);
0074 template <class T> static void Set (const Standard_CString Name, const Handle(T)& Arg, typename opencascade::std::enable_if<opencascade::std::is_base_of<Geom2d_Curve, T>::value>::type * = 0) { Set (Name, (const Handle(Geom2d_Curve)&)Arg); }
0075   
0076   //! Sets <T> in the variable <Name>.  Overwrite the
0077   //! variable if already set.
0078   Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Poly_Triangulation)& T);
0079   
0080   //! Sets <P> in the variable <Name>.  Overwrite the
0081   //! variable if already set.
0082   Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Poly_Polygon3D)& P);
0083   
0084   //! Sets <P> in the variable <Name>.  Overwrite the
0085   //! variable if already set.
0086   Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Poly_Polygon2D)& P);
0087   
0088   //! Get  the variable <S>.  Returns a  null  handle if
0089   //! none, and print a warning message.
0090   Standard_EXPORT static Handle(Geom_Geometry) Get (Standard_CString& Name);
0091   
0092   //! Gets the variable. Returns False if none and print
0093   //! a warning message.
0094   Standard_EXPORT static Standard_Boolean GetPoint (Standard_CString& Name, gp_Pnt& P);
0095   
0096   //! Gets the variable. Returns False if none and print
0097   //! a warning message.
0098   Standard_EXPORT static Standard_Boolean GetPoint2d (Standard_CString& Name, gp_Pnt2d& P);
0099   
0100   //! Get  the variable <S>.  Returns a  null  handle if
0101   //! none, and print a warning message.
0102   Standard_EXPORT static Handle(Geom_Curve) GetCurve (Standard_CString& Name);
0103   
0104   //! Get  the variable <S>.  Returns a  null  handle if
0105   //! none, and print a warning message.
0106   Standard_EXPORT static Handle(Geom_BezierCurve) GetBezierCurve (Standard_CString& Name);
0107   
0108   //! Get  the variable <S>.  Returns a  null  handle if
0109   //! none, and print a warning message.
0110   Standard_EXPORT static Handle(Geom_BSplineCurve) GetBSplineCurve (Standard_CString& Name);
0111   
0112   //! Get  the variable <S>.  Returns a  null  handle if
0113   //! none, and print a warning message.
0114   Standard_EXPORT static Handle(Geom2d_Curve) GetCurve2d (Standard_CString& Name);
0115   
0116   //! Get  the variable <S>.  Returns a  null  handle if
0117   //! none, and print a warning message.
0118   Standard_EXPORT static Handle(Geom2d_BezierCurve) GetBezierCurve2d (Standard_CString& Name);
0119   
0120   //! Get  the variable <S>.  Returns a  null  handle if
0121   //! none, and print a warning message.
0122   Standard_EXPORT static Handle(Geom2d_BSplineCurve) GetBSplineCurve2d (Standard_CString& Name);
0123   
0124   //! Get  the variable <S>.  Returns a  null  handle if
0125   //! none, and print a warning message.
0126   Standard_EXPORT static Handle(Geom_Surface) GetSurface (Standard_CString& Name);
0127   
0128   //! Get  the variable <S>.  Returns a  null  handle if
0129   //! none, and print a warning message.
0130   Standard_EXPORT static Handle(Geom_BezierSurface) GetBezierSurface (Standard_CString& Name);
0131   
0132   //! Get  the variable <S>.  Returns a  null  handle if
0133   //! none, and print a warning message.
0134   Standard_EXPORT static Handle(Geom_BSplineSurface) GetBSplineSurface (Standard_CString& Name);
0135   
0136   //! Get  the variable <S>.  Returns a  null  handle if
0137   //! none, and print a warning message.
0138   Standard_EXPORT static Handle(Poly_Triangulation) GetTriangulation (Standard_CString& Name);
0139   
0140   //! Get  the variable <S>.  Returns a  null  handle if
0141   //! none, and print a warning message.
0142   Standard_EXPORT static Handle(Poly_Polygon3D) GetPolygon3D (Standard_CString& Name);
0143   
0144   //! Get  the variable <S>.  Returns a  null  handle if
0145   //! none, and print a warning message.
0146   Standard_EXPORT static Handle(Poly_Polygon2D) GetPolygon2D (Standard_CString& Name);
0147 
0148   //! Return package global parameters.
0149   Standard_EXPORT static DrawTrSurf_Params& Parameters();
0150 
0151   //! defines display commands.
0152   Standard_EXPORT static void BasicCommands (Draw_Interpretor& I);
0153 
0154 };
0155 
0156 #endif // _DrawTrSurf_HeaderFile