1 // Created on: 1993-06-17
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
24 #include <TestTopOpeDraw_TTOT.hxx>
25 static TCollection_AsciiString PRODINS("dins ");
28 #include <TopOpeBRepBuild_ShellFaceSet.ixx>
29 #include <TopOpeBRepBuild_Builder.hxx>
30 #include <TopOpeBRepBuild_define.hxx>
34 extern Standard_Boolean TopOpeBRepBuild_GettraceCHK();
37 //=======================================================================
38 //function : TopOpeBRepBuild_ShellFaceSet
40 //=======================================================================
42 TopOpeBRepBuild_ShellFaceSet::TopOpeBRepBuild_ShellFaceSet() :
43 TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
50 //=======================================================================
51 //function : TopOpeBRepBuild_ShellFaceSet
53 //=======================================================================
55 TopOpeBRepBuild_ShellFaceSet::TopOpeBRepBuild_ShellFaceSet
56 (const TopoDS_Shape& S,const Standard_Address A) : // DEB
57 TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
59 mySolid = TopoDS::Solid(S);
64 TopOpeBRepBuild_Builder* pB = ((TopOpeBRepBuild_Builder*)((void*)A));
65 myDEBNumber = pB->GdumpSHASETindex();
66 Standard_Integer iS; Standard_Boolean tSPS = pB->GtraceSPS(S,iS);
67 if(tSPS){cout<<"creation SFS "<<myDEBNumber<<" on ";}
68 if(tSPS){pB->GdumpSHA(S,NULL);cout<<endl;}
71 if (TopOpeBRepBuild_GettraceCHK() && !myCheckShape) {
72 DumpName(cout,"no checkshape in creation of ");cout<<endl;
77 //=======================================================================
80 //=======================================================================
81 void TopOpeBRepBuild_ShellFaceSet::AddShape(const TopoDS_Shape& S)
83 TopOpeBRepBuild_ShapeSet::AddShape(S);
86 //=======================================================================
87 //function : AddStartElement
89 //=======================================================================
90 void TopOpeBRepBuild_ShellFaceSet::AddStartElement(const TopoDS_Shape& S)
92 TopOpeBRepBuild_ShapeSet::ProcessAddStartElement(S);
95 //=======================================================================
96 //function : AddElement
98 //=======================================================================
99 void TopOpeBRepBuild_ShellFaceSet::AddElement(const TopoDS_Shape& S)
101 TopOpeBRepBuild_ShapeSet::AddElement(S);
104 //=======================================================================
107 //=======================================================================
109 const TopoDS_Solid& TopOpeBRepBuild_ShellFaceSet::Solid() const
114 //=======================================================================
117 //=======================================================================
119 void TopOpeBRepBuild_ShellFaceSet::DumpSS()
122 TopOpeBRepBuild_ShapeSet::DumpSS();
126 //=======================================================================
129 //=======================================================================
131 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape& S,
132 const TCollection_AsciiString& sb,
133 const TCollection_AsciiString& sa) const
135 TCollection_AsciiString str=sb;
137 str=str+TopOpeBRepBuild_ShapeSet::SName(S);
139 DBRep::Set(str.ToCString(),S);
144 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape&,
145 const TCollection_AsciiString& sb,
146 const TCollection_AsciiString&) const
148 TCollection_AsciiString str=sb;
153 //=======================================================================
154 //function : SNameori
156 //=======================================================================
158 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopoDS_Shape& S,
159 const TCollection_AsciiString& sb,
160 const TCollection_AsciiString& sa) const
162 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopoDS_Shape&,
163 const TCollection_AsciiString& sb,
164 const TCollection_AsciiString&) const
167 TCollection_AsciiString str=sb;
169 str=str+TopOpeBRepBuild_ShapeSet::SNameori(S);
170 if ( S.ShapeType() == TopAbs_FACE ) {
171 const TopoDS_Shape& F = TopoDS::Face(S);
172 DBRep::Set(str.ToCString(),S);
178 //=======================================================================
181 //=======================================================================
183 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopTools_ListOfShape& L,
184 const TCollection_AsciiString& sb,
185 const TCollection_AsciiString& sa) const
187 TCollection_AsciiString str;
189 for (TopTools_ListIteratorOfListOfShape it(L);it.More();it.Next()) str=str+sb+SName(it.Value())+sa+" ";
194 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopTools_ListOfShape&,
195 const TCollection_AsciiString&,
196 const TCollection_AsciiString&) const
198 TCollection_AsciiString str;
203 //=======================================================================
204 //function : SNameori
206 //=======================================================================
207 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopTools_ListOfShape& /*L*/,
208 const TCollection_AsciiString& /*sb*/,
209 const TCollection_AsciiString& /*sa*/) const
211 TCollection_AsciiString str;
213 for (TopTools_ListIteratorOfListOfShape it(L);it.More();it.Next()) str=str+sb+SNameori(it.Value())+sa+" ";