Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:16:09

0001 // Created on: 1997-07-22
0002 // Created by: Laurent PAINNOT
0003 // Copyright (c) 1997-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_Triangulation2D_HeaderFile
0018 #define _DrawTrSurf_Triangulation2D_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.hxx>
0025 #include <Draw_Drawable2D.hxx>
0026 #include <Standard_OStream.hxx>
0027 #include <Draw_Interpretor.hxx>
0028 class Poly_Triangulation;
0029 class Draw_Display;
0030 class Draw_Drawable3D;
0031 
0032 //! Used to display a 2d triangulation.
0033 //!
0034 //! Display internal edges in blue
0035 //! Display boundary edges in red
0036 //! Optional display of triangles and nodes indices.
0037 class DrawTrSurf_Triangulation2D : public Draw_Drawable2D
0038 {
0039 
0040 public:
0041   Standard_EXPORT DrawTrSurf_Triangulation2D(const occ::handle<Poly_Triangulation>& T);
0042 
0043   Standard_EXPORT occ::handle<Poly_Triangulation> Triangulation() const;
0044 
0045   Standard_EXPORT void DrawOn(Draw_Display& dis) const override;
0046 
0047   //! For variable copy.
0048   Standard_EXPORT occ::handle<Draw_Drawable3D> Copy() const override;
0049 
0050   //! For variable dump.
0051   Standard_EXPORT void Dump(Standard_OStream& S) const override;
0052 
0053   //! For variable whatis command. Set as a result the
0054   //! type of the variable.
0055   Standard_EXPORT void Whatis(Draw_Interpretor& I) const override;
0056 
0057   DEFINE_STANDARD_RTTIEXT(DrawTrSurf_Triangulation2D, Draw_Drawable2D)
0058 
0059 private:
0060   occ::handle<Poly_Triangulation>       myTriangulation;
0061   occ::handle<NCollection_HArray1<int>> myInternals;
0062   occ::handle<NCollection_HArray1<int>> myFree;
0063 };
0064 
0065 #endif // _DrawTrSurf_Triangulation2D_HeaderFile