42cf5bc1 |
1 | // Created on: 2000-10-05 |
2 | // Created by: Andrey BETENEV |
3 | // Copyright (c) 2000-2014 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 _STEPCAFControl_ActorWrite_HeaderFile |
17 | #define _STEPCAFControl_ActorWrite_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
42cf5bc1 |
20 | |
21 | #include <Standard_Boolean.hxx> |
22 | #include <TopTools_MapOfShape.hxx> |
23 | #include <STEPControl_ActorWrite.hxx> |
24 | class TopoDS_Shape; |
25 | |
26 | |
27 | class STEPCAFControl_ActorWrite; |
28 | DEFINE_STANDARD_HANDLE(STEPCAFControl_ActorWrite, STEPControl_ActorWrite) |
29 | |
30 | //! Extends ActorWrite from STEPControl by analysis of |
31 | //! whether shape is assembly (based on information from DECAF) |
32 | class STEPCAFControl_ActorWrite : public STEPControl_ActorWrite |
33 | { |
34 | |
35 | public: |
36 | |
37 | |
38 | Standard_EXPORT STEPCAFControl_ActorWrite(); |
39 | |
40 | //! Check whether shape S is assembly |
41 | //! Returns True if shape is registered in assemblies map |
b9fbc699 |
42 | Standard_EXPORT virtual Standard_Boolean IsAssembly (const Handle(StepData_StepModel)& theModel, |
43 | TopoDS_Shape& S) const Standard_OVERRIDE; |
42cf5bc1 |
44 | |
45 | //! Set standard mode of work |
46 | //! In standard mode Actor (default) behaves exactly as its |
47 | //! ancestor, also map is cleared |
48 | Standard_EXPORT void SetStdMode (const Standard_Boolean stdmode = Standard_True); |
49 | |
50 | //! Clears map of shapes registered as assemblies |
51 | Standard_EXPORT void ClearMap(); |
52 | |
53 | //! Registers shape to be written as assembly |
54 | //! The shape should be TopoDS_Compound (else does nothing) |
55 | Standard_EXPORT void RegisterAssembly (const TopoDS_Shape& S); |
56 | |
57 | |
58 | |
59 | |
92efcf78 |
60 | DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ActorWrite,STEPControl_ActorWrite) |
42cf5bc1 |
61 | |
62 | protected: |
63 | |
64 | |
65 | |
66 | |
67 | private: |
68 | |
69 | |
70 | Standard_Boolean myStdMode; |
71 | TopTools_MapOfShape myMap; |
72 | |
73 | |
74 | }; |
75 | |
76 | |
77 | |
78 | |
79 | |
80 | |
81 | |
82 | #endif // _STEPCAFControl_ActorWrite_HeaderFile |