7fd59977 |
1 | // SplitShape_Presentation.h: interface for the SplitShape_Presentation class. |
2 | // Split shape by wire |
3 | ////////////////////////////////////////////////////////////////////// |
4 | |
5 | #if !defined(AFX_SplitShape_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) |
6 | #define AFX_SplitShape_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_ |
7 | |
8 | #if _MSC_VER > 1000 |
9 | #pragma once |
10 | #endif // _MSC_VER > 1000 |
11 | |
12 | #include <OCCDemo_Presentation.h> |
13 | class BRepAlgoAPI_Section; |
14 | class TopoDS_Wire; |
15 | class TopoDS_Shell; |
16 | |
17 | class SplitShape_Presentation : public OCCDemo_Presentation |
18 | { |
19 | public: |
20 | // Construction |
21 | SplitShape_Presentation(); |
22 | |
23 | public: |
24 | // Iteration on samples |
25 | virtual void DoSample(); |
26 | // one phase of iterations |
27 | |
28 | private: |
29 | // Sample functions |
30 | void sample1(); |
31 | void sample2(); |
32 | |
33 | Standard_Boolean readShell (TCollection_AsciiString& theText); |
34 | Standard_Boolean computeSection (BRepAlgoAPI_Section& aSecAlgo, |
35 | TopoDS_Wire& aSecWire, TCollection_AsciiString& theText); |
36 | Standard_Boolean splitAndComposeLeft (const BRepAlgoAPI_Section& aSecAlgo, |
37 | const TopoDS_Wire& aSecWire, TopoDS_Shell& aNewShell, TCollection_AsciiString& theText); |
38 | |
39 | private: |
40 | // Array of pointers to sample functions |
41 | typedef void (SplitShape_Presentation::*PSampleFuncType)(); |
42 | static const PSampleFuncType SampleFuncs[]; |
43 | |
44 | TopoDS_Shape myShell; |
45 | |
46 | }; |
47 | |
48 | #endif // !defined(AFX_SplitShape_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_) |