0022904: Clean up sccsid variables
[occt.git] / src / QANewBRepNaming / QANewBRepNaming_Fuse.cxx
CommitLineData
7fd59977 1// File: QANewBRepNaming_Fuse.cdl
2// Created: Tue Oct 31 14:38:18 2000
3// Author: Sergey ZARITCHNY
4// <szy@opencascade.com>
5// Copyright: Open CASCADE 2003
6
7fd59977 7// Lastly modified by :
8// +---------------------------------------------------------------------------+
9// ! szy ! Adopted ! 9-06-2003! 3.0-00-%L%!
10// +---------------------------------------------------------------------------+
11
12#include <QANewBRepNaming_Fuse.ixx>
13#include <TNaming_Builder.hxx>
14#include <QANewBRepNaming_Loader.hxx>
15#include <TopExp_Explorer.hxx>
16#include <TopTools_ListIteratorOfListOfShape.hxx>
17#include <TNaming_NamedShape.hxx>
18#include <TopoDS_Iterator.hxx>
19#include <TNaming_Tool.hxx>
20
21//=======================================================================
22//function : QANewBRepNaming_Fuse
23//purpose :
24//=======================================================================
25
26QANewBRepNaming_Fuse::QANewBRepNaming_Fuse() {}
27
28//=======================================================================
29//function : QANewBRepNaming_Fuse
30//purpose :
31//=======================================================================
32
33QANewBRepNaming_Fuse::QANewBRepNaming_Fuse(const TDF_Label& ResultLabel)
34 :QANewBRepNaming_BooleanOperationFeat(ResultLabel) {}
35
36
37//=======================================================================
38//function : Load
39//purpose :
40//=======================================================================
41
42void QANewBRepNaming_Fuse::Load(BRepAlgoAPI_BooleanOperation& MS) const {
43 const TopoDS_Shape& ResSh = MS.Shape();
44 const TopoDS_Shape& ObjSh = MS.Shape1();
45 const TopoDS_Shape& ToolSh = MS.Shape2();
46
47 if (ResSh.IsNull()) {
48#ifdef MDTV_DEB
49 cout<<"QANewBRepNaming_Fuse::Load(): The result of the boolean operation is null"<<endl;
50#endif
51 return;
52 }
53
54 // Naming of the result:
55 LoadResult(MS);
56
57 // Naming of modified faces:
58 TNaming_Builder ModBuilder(ModifiedFaces());
59 QANewBRepNaming_Loader::LoadModifiedShapes (MS, ObjSh, TopAbs_FACE, ModBuilder, Standard_True);
60 QANewBRepNaming_Loader::LoadModifiedShapes (MS, ToolSh, TopAbs_FACE, ModBuilder, Standard_True);
61
62 // Naming of deleted faces:
63 if(MS.HasDeleted()){
64 TNaming_Builder DelBuilder(DeletedFaces());
65 QANewBRepNaming_Loader::LoadDeletedShapes (MS, ObjSh, TopAbs_FACE, DelBuilder);
66 QANewBRepNaming_Loader::LoadDeletedShapes (MS, ToolSh, TopAbs_FACE, DelBuilder);
67 }
68
69 // Naming of the content of the result:
70 LoadContent(MS);
71}
72
73// @@SDM: begin
74
75// File history synopsis (creation,modification,correction)
76// +---------------------------------------------------------------------------+
77// ! Developer ! Comments ! Date ! Version !
78// +-----------!-----------------------------------------!----------!----------+
79// ! vro ! Creation !31-10-2000!3.0-00-3!
80// ! vro ! Redesign !13-12-2000! 3.0-00-3!
81// ! vro ! Result may be null !19-03-2001! 3.0-00-3!
82// ! szy ! Modified Load ! 8-05-2003! 3.0-00-%L%!
83// ! szy ! Redesigned Load !21-05-2003! 3.0-00-%L%!
84// ! szy ! Adopted ! 9-06-2003! 3.0-00-%L%!
85// +---------------------------------------------------------------------------+
86// Lastly modified by : szy Date : 9-06-2003
87
88// @@SDM: end