1 // Created on: 1993-06-17
2 // Created by: Jean Yves LEBEY
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
19 static TCollection_AsciiString PRODINS("dins ");
24 #include <TopoDS_Shape.hxx>
25 #include <TopOpeBRepBuild_define.hxx>
26 #include <TopOpeBRepBuild_ShellFaceSet.hxx>
29 extern Standard_Boolean TopOpeBRepBuild_GettraceCHK();
32 //=======================================================================
33 //function : TopOpeBRepBuild_ShellFaceSet
35 //=======================================================================
37 TopOpeBRepBuild_ShellFaceSet::TopOpeBRepBuild_ShellFaceSet() :
38 TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
45 //=======================================================================
46 //function : TopOpeBRepBuild_ShellFaceSet
48 //=======================================================================
50 TopOpeBRepBuild_ShellFaceSet::TopOpeBRepBuild_ShellFaceSet
52 (const TopoDS_Shape& S,const Standard_Address A) : // DEB
54 (const TopoDS_Shape& S,const Standard_Address) : // DEB
56 TopOpeBRepBuild_ShapeSet(TopAbs_EDGE)
58 mySolid = TopoDS::Solid(S);
63 TopOpeBRepBuild_Builder* pB = ((TopOpeBRepBuild_Builder*)((void*)A));
64 myDEBNumber = pB->GdumpSHASETindex();
65 Standard_Integer iS; Standard_Boolean tSPS = pB->GtraceSPS(S,iS);
66 if(tSPS){std::cout<<"creation SFS "<<myDEBNumber<<" on ";}
67 if(tSPS){pB->GdumpSHA(S,NULL);std::cout<<std::endl;}
70 if (TopOpeBRepBuild_GettraceCHK() && !myCheckShape) {
71 DumpName(std::cout,"no checkshape in creation of ");std::cout<<std::endl;
76 //=======================================================================
79 //=======================================================================
80 void TopOpeBRepBuild_ShellFaceSet::AddShape(const TopoDS_Shape& S)
82 TopOpeBRepBuild_ShapeSet::AddShape(S);
85 //=======================================================================
86 //function : AddStartElement
88 //=======================================================================
89 void TopOpeBRepBuild_ShellFaceSet::AddStartElement(const TopoDS_Shape& S)
91 TopOpeBRepBuild_ShapeSet::ProcessAddStartElement(S);
94 //=======================================================================
95 //function : AddElement
97 //=======================================================================
98 void TopOpeBRepBuild_ShellFaceSet::AddElement(const TopoDS_Shape& S)
100 TopOpeBRepBuild_ShapeSet::AddElement(S);
103 //=======================================================================
106 //=======================================================================
108 const TopoDS_Solid& TopOpeBRepBuild_ShellFaceSet::Solid() const
113 //=======================================================================
116 //=======================================================================
118 void TopOpeBRepBuild_ShellFaceSet::DumpSS()
121 TopOpeBRepBuild_ShapeSet::DumpSS();
125 //=======================================================================
128 //=======================================================================
130 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape& S,
131 const TCollection_AsciiString& sb,
132 const TCollection_AsciiString& sa) const
134 TCollection_AsciiString str=sb;
136 str=str+TopOpeBRepBuild_ShapeSet::SName(S);
138 DBRep::Set(str.ToCString(),S);
143 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape&,
144 const TCollection_AsciiString& sb,
145 const TCollection_AsciiString&) const
147 TCollection_AsciiString str=sb;
152 //=======================================================================
153 //function : SNameori
155 //=======================================================================
157 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopoDS_Shape& S,
158 const TCollection_AsciiString& sb,
159 const TCollection_AsciiString& sa) const
161 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopoDS_Shape&,
162 const TCollection_AsciiString& sb,
163 const TCollection_AsciiString&) const
166 TCollection_AsciiString str=sb;
168 str=str+TopOpeBRepBuild_ShapeSet::SNameori(S);
169 if ( S.ShapeType() == TopAbs_FACE ) {
170 const TopoDS_Shape& F = TopoDS::Face(S);
171 DBRep::Set(str.ToCString(),S);
177 //=======================================================================
180 //=======================================================================
182 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopTools_ListOfShape& L,
183 const TCollection_AsciiString& sb,
184 const TCollection_AsciiString& sa) const
186 TCollection_AsciiString str;
188 for (TopTools_ListIteratorOfListOfShape it(L);it.More();it.Next()) str=str+sb+SName(it.Value())+sa+" ";
193 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopTools_ListOfShape&,
194 const TCollection_AsciiString&,
195 const TCollection_AsciiString&) const
197 TCollection_AsciiString str;
202 //=======================================================================
203 //function : SNameori
205 //=======================================================================
206 TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopTools_ListOfShape& /*L*/,
207 const TCollection_AsciiString& /*sb*/,
208 const TCollection_AsciiString& /*sa*/) const
210 TCollection_AsciiString str;
212 for (TopTools_ListIteratorOfListOfShape it(L);it.More();it.Next()) str=str+sb+SNameori(it.Value())+sa+" ";