7e1c1e48 |
1 | // Created on: 2020-01-25 |
2 | // Created by: Natalia ERMOLAEVA |
3 | // Copyright (c) 2020 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 Convert_Tools_H |
17 | #define Convert_Tools_H |
18 | |
19 | #include <NCollection_List.hxx> |
20 | #include <Quantity_Color.hxx> |
21 | #include <Standard.hxx> |
22 | #include <Standard_Macro.hxx> |
23 | #include <Standard_SStream.hxx> |
24 | #include <TCollection_AsciiString.hxx> |
25 | #include <TopoDS_Shape.hxx> |
26 | |
27 | //! \class Convert_Tools |
28 | //! \brief The tool that gives auxiliary methods converting. |
29 | class Convert_Tools |
30 | { |
31 | public: |
32 | //! Reads Shape using BREP reader |
33 | //! \param theFileName a file name |
34 | //! \return shape or NULL |
35 | Standard_EXPORT static TopoDS_Shape ReadShape (const TCollection_AsciiString& theFileName); |
36 | |
37 | |
38 | //! Creates shape presentations on the stream if possible. Tries to init some OCCT base for a new presentation |
39 | //! \param theStream source of presentation |
40 | //! \param thePresentations container to collect new presentations |
41 | Standard_EXPORT static void ConvertStreamToPresentations (const Standard_SStream& theSStream, |
42 | const Standard_Integer theStartPos, |
43 | const Standard_Integer theLastPos, |
44 | NCollection_List<Handle(Standard_Transient)>& thePresentations); |
45 | |
46 | //! Converts stream to color if possible. It processes Quantity_Color, Quantity_ColorRGBA |
47 | //! \param theStream source of presentation |
48 | //! \param theColor [out] converted color |
49 | //! \returns true if done |
50 | Standard_EXPORT static Standard_Boolean ConvertStreamToColor (const Standard_SStream& theSStream, |
51 | Quantity_Color& theColor); |
52 | }; |
53 | |
54 | #endif |