1 // Created on: 1992-05-21
2 // Created by: Jean Claude VAUTHIER
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _DrawTrSurf_Surface_HeaderFile
18 #define _DrawTrSurf_Surface_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Draw_Color.hxx>
24 #include <Standard_Integer.hxx>
25 #include <DrawTrSurf_Drawable.hxx>
26 #include <Standard_Real.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_OStream.hxx>
29 #include <Draw_Interpretor.hxx>
33 class Draw_Drawable3D;
36 class DrawTrSurf_Surface;
37 DEFINE_STANDARD_HANDLE(DrawTrSurf_Surface, DrawTrSurf_Drawable)
39 //! This class defines a drawable surface.
40 //! With this class you can draw a general surface from
42 class DrawTrSurf_Surface : public DrawTrSurf_Drawable
48 //! default drawing mode
49 //! Just the middle isoparametric curves are drawn.
50 //! The boundaries are yellow, the isoparametric curves are blues.
51 //! For the discretisation 50 points are computed in each parametric
53 Standard_EXPORT DrawTrSurf_Surface(const Handle(Geom_Surface)& S);
55 Standard_EXPORT DrawTrSurf_Surface(const Handle(Geom_Surface)& S, const Standard_Integer Nu, const Standard_Integer Nv, const Draw_Color& BoundsColor, const Draw_Color& IsosColor, const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode);
57 Draw_Color BoundsColor() const;
59 //! rub out all the isoparametric curves.
60 Standard_EXPORT virtual void ClearIsos();
62 Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
64 //! Iso = True : Draw the isos, the boundaries, the UVMarker.
65 //! Iso = False: Only Draw the boundary and the UVMarker.
66 Standard_EXPORT void DrawOn (Draw_Display& dis, const Standard_Boolean Iso) const;
68 Handle(Geom_Surface) GetSurface() const;
70 Draw_Color IsosColor() const;
72 void NbIsos (Standard_Integer& Nu, Standard_Integer& Nb) const;
74 void SetBoundsColor (const Draw_Color& aColor);
76 void SetIsosColor (const Draw_Color& aColor);
78 //! change the number of isoparametric curves to be drawn.
79 Standard_EXPORT virtual void ShowIsos (const Standard_Integer Nu, const Standard_Integer Nv);
81 //! For variable copy.
82 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
84 //! For variable dump.
85 Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
87 //! For variable whatis command.
88 Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
93 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Surface,DrawTrSurf_Drawable)
98 Handle(Geom_Surface) surf;
99 Draw_Color boundsLook;
101 Standard_Integer nbUIsos;
102 Standard_Integer nbVIsos;
113 #include <DrawTrSurf_Surface.lxx>
119 #endif // _DrawTrSurf_Surface_HeaderFile