0030346: Modeling Algorithms - BRepPrimAPI_MakeRevol throws "BRepSweep_Translation...
[occt.git] / src / BRepTest / BRepTest_DrawableHistory.hxx
CommitLineData
4f7d41ea 1// Created on: 2018/03/21
2// Created by: Eugeny MALTCHIKOV
3// Copyright (c) 2018 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _BRepTest_DrawableHistory_HeaderFile
17#define _BRepTest_DrawableHistory_HeaderFile
18
19#include <Standard.hxx>
20#include <Standard_Type.hxx>
21
22#include <BRepTools_History.hxx>
23
24#include <Draw_Drawable3D.hxx>
25#include <Draw_Interpretor.hxx>
26
27#include <Standard_OStream.hxx>
28
29//! Drawable History object.
30//! Allows keeping histories of the algorithms in Draw.
31class BRepTest_DrawableHistory : public Draw_Drawable3D
32{
33 DEFINE_STANDARD_RTTIEXT(BRepTest_DrawableHistory, Draw_Drawable3D)
34
35public:
36
37 //! Creation of the Drawable history.
38 BRepTest_DrawableHistory(const Handle(BRepTools_History)& theHistory)
39 {
40 myHistory = theHistory;
41 }
42
43 //! Returns the history.
44 const Handle(BRepTools_History)& History() const
45 {
46 return myHistory;
47 }
48
49 //! Drawing is not available.
50 Standard_EXPORT virtual void DrawOn(Draw_Display&)const Standard_OVERRIDE;
51
52 //! Dumps the history.
53 Standard_EXPORT virtual void Dump(Standard_OStream& theS) const Standard_OVERRIDE;
54
55 //! Prints the type of the history object.
56 Standard_EXPORT virtual void Whatis(Draw_Interpretor& theDI) const Standard_OVERRIDE;
57
58private:
59
60 Handle(BRepTools_History) myHistory; //!< Tool for tracking History of shape's modification
61};
62
63DEFINE_STANDARD_HANDLE(BRepTest_DrawableHistory, Draw_Drawable3D)
64
65#endif