b311480e |
1 | // Created on: 1996-02-05 |
2 | // Created by: Jean Yves LEBEY |
3 | // Copyright (c) 1996-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | #ifndef _TestTopOpe_BOOP_HeaderFile |
18 | #define _TestTopOpe_BOOP_HeaderFile |
19 | |
20 | #include <TestTopOpe_VarsTopo.hxx> |
21 | #include <TopOpeBRep_DSFiller.hxx> |
22 | #include <TopoDS_Compound.hxx> |
23 | #include <TopOpeBRep_DSFiller.hxx> |
24 | #include <TopOpeBRep_define.hxx> |
25 | #include <TopOpeBRepBuild_define.hxx> |
26 | |
27 | #define TESTTOPOPE_NKEYS 8 |
28 | enum Operation_t {BOOP_UND = -1,BOOP_TOPX = 0,BOOP_SECC = 1,BOOP_SECE = 2,BOOP_SEC = 3, |
29 | BOOP_COM = 4,BOOP_C12 = 5,BOOP_C21 = 6,BOOP_FUS = 7} ; |
30 | |
31 | #define TESTTOPOPE_NTKEYS 20 |
32 | |
33 | class TestTopOpe_BOOP { |
34 | |
35 | public: |
36 | |
37 | TestTopOpe_BOOP(const char*[],const char* resnamdef); |
38 | Operation_t Operation(const char* key) const; |
39 | Standard_Boolean IsBooope(const char* key) const; |
40 | |
41 | void Tinit(); |
42 | const TCollection_AsciiString& Tkeys(const Standard_Integer ik) const; |
43 | const TCollection_AsciiString& Thelp(const Standard_Integer ik) const; |
44 | Standard_Integer Tstep(const TCollection_AsciiString& s) const; |
45 | Standard_Integer Tnb() const; |
46 | Standard_Boolean Tadd(const TCollection_AsciiString& k,const Standard_Integer ic,const TCollection_AsciiString& h); |
47 | |
48 | VarsTopo& ChangeVarsTopo(); |
49 | void SetCurrentHB(const Handle(TopOpeBRepBuild_HBuilder)& HB); |
50 | void SetCurrentHDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS); |
51 | void SetShape1(const TopoDS_Shape& S); |
52 | void SetShape2(const TopoDS_Shape& S); |
53 | Handle(TopOpeBRepBuild_HBuilder)& ChangeCurrentHB(); |
54 | Handle(TopOpeBRepDS_HDataStructure)& ChangeCurrentDS(); |
55 | TopoDS_Shape& ChangeShape1(); |
56 | TopoDS_Shape& ChangeShape2(); |
57 | const TCollection_AsciiString& nameS1() const; |
58 | const TCollection_AsciiString& nameS2() const; |
59 | // |
60 | Standard_Integer Prepare(const char* ns1,const char* ns2); |
61 | Standard_Integer LoadShapes(const char* ns1,const char* ns2); |
62 | Standard_Integer LoadnewDS(); |
63 | Standard_Integer DSF_SetInterTolerances(TopOpeBRep_DSFiller& DSF); // |
64 | Standard_Integer DSF_Insert(); // |
65 | Standard_Integer DSF_Insert(TopOpeBRep_DSFiller& DSF); |
66 | Standard_Integer DSF_Insert_InsertIntersection(TopOpeBRep_DSFiller& DSF); |
67 | Standard_Integer DSF_Insert_Complete_GapFiller(TopOpeBRep_DSFiller& DSF); |
68 | Standard_Integer DSF_Insert_Complete_CompleteDS(TopOpeBRep_DSFiller& DSF); |
69 | Standard_Integer DSF_Insert_Complete_Filter(TopOpeBRep_DSFiller& DSF); |
70 | Standard_Integer DSF_Insert_Complete_Reducer(TopOpeBRep_DSFiller& DSF); |
71 | Standard_Integer DSF_Insert_Complete_RemoveUnsharedGeometry(TopOpeBRep_DSFiller& DSF); |
72 | Standard_Integer DSF_Insert_Complete_Checker(TopOpeBRep_DSFiller& DSF); |
73 | Standard_Integer LoadnewHB(); |
74 | Standard_Integer Builder_Perform(); |
75 | Standard_Integer FaceFilter(); |
76 | Standard_Integer FaceReducer(); |
77 | // |
78 | void SetTol(const TopOpeBRepDS_Kind K,const Standard_Integer index,const Standard_Real tol); |
79 | void SetTol(const Standard_Integer index,const Standard_Real tol); |
80 | void SetPnt(const Standard_Integer index,const Standard_Real x,const Standard_Real y,const Standard_Real z); |
81 | |
82 | void Booope(const char* key, const char* namres); |
83 | void GetSplit(const TopAbs_ShapeEnum Typ,const TopAbs_State sta); |
84 | void GetSplit(const TopAbs_ShapeEnum Typ,const TopAbs_State sta,const Standard_Integer is); |
85 | void GetSplit(const TopAbs_State sta,const Standard_Integer is); |
86 | void GetSplit(const TopAbs_State sta); |
87 | void GetSplit(const Standard_Integer is); |
88 | |
89 | void GetMerged(const TopAbs_ShapeEnum Typ,const TopAbs_State sta); |
90 | void GetMerged(const TopAbs_ShapeEnum Typ,const TopAbs_State sta,const Standard_Integer is); |
91 | void GetMerged(const TopAbs_State sta,const Standard_Integer is); |
92 | void GetMerged(const TopAbs_State sta); |
93 | void GetMerged(const Standard_Integer is); |
94 | |
95 | void ClearResult(); |
96 | void AddResult(const TopTools_ListOfShape& L); |
97 | void MakeResult(const TopTools_ListOfShape& L); |
98 | void StoreResult(const char* key, const char* namres, char* extent=NULL) const; |
99 | const Handle(TopOpeBRepBuild_HBuilder)& HBuilder() const; |
100 | void SetMode(const Standard_Integer mode); |
101 | Standard_Integer GetMode() const; |
102 | Standard_Boolean CheckBooope(const char* key); |
103 | Standard_Integer FindShape(const TCollection_AsciiString& str); |
104 | Standard_Integer FindShape(const Standard_Integer ids,const TopoDS_Shape& Sref); |
105 | Standard_Integer FindShape(const TopoDS_Shape& S,const TopoDS_Shape& Sref); |
106 | |
107 | Standard_Integer mylastPREP; |
108 | Standard_Integer mytodoPREP; |
109 | Standard_Integer mymet[100]; |
110 | Standard_Integer mynmet; |
111 | TopOpeBRep_DSFiller* myPDSF; |
112 | |
113 | private: |
114 | |
115 | const char* mykeys[TESTTOPOPE_NKEYS]; |
116 | const char* myresnamdef; |
117 | VarsTopo myVarsTopo; |
857ffd5e |
118 | Handle(TopOpeBRepDS_HDataStructure) myHDS; |
119 | Handle(TopOpeBRepBuild_HBuilder) myHB; |
7fd59977 |
120 | TCollection_AsciiString mynameS1,mynameS2; |
121 | TopoDS_Shape myS1,myS2; |
122 | TopAbs_ShapeEnum myS1type,myS2type; |
123 | Standard_Boolean myESP; |
124 | Standard_Boolean myPREPdone; |
125 | TopoDS_Compound myCresult; |
126 | Standard_Integer myNresult; |
127 | Standard_Boolean myBOOdone; |
128 | |
129 | Standard_Integer mycomn; |
130 | TCollection_AsciiString mycomk[TESTTOPOPE_NTKEYS]; |
131 | TCollection_AsciiString mycomh[TESTTOPOPE_NTKEYS]; |
132 | Standard_Integer mycomi[TESTTOPOPE_NTKEYS]; |
133 | }; |
134 | |
135 | #define ISINTEGER(Mstr) ((strspn((Mstr),"0123456789")==strlen((Mstr)))) |
136 | |
137 | #endif |