0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepLib / BRepLib_MakeShape.cxx
CommitLineData
b311480e 1// Created on: 1993-07-23
2// Created by: Remi LEQUETTE
3// Copyright (c) 1993-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#include <BRepLib_MakeShape.ixx>
18
19//=======================================================================
20//function : BRepLib_MakeShape
21//purpose :
22//=======================================================================
23
24BRepLib_MakeShape::BRepLib_MakeShape()
25{
26}
27
28//=======================================================================
29//function : Build
30//purpose :
31//=======================================================================
32
33void BRepLib_MakeShape::Build()
34{
35}
36
37//=======================================================================
38//function : Shape
39//purpose :
40//=======================================================================
41
42const TopoDS_Shape& BRepLib_MakeShape::Shape() const
43{
44 if (!IsDone()) {
45 // the following is const cast away
46 ((BRepLib_MakeShape*) (void*) this)->Build();
47 Check();
48 }
49 return myShape;
50}
51
52
53//=======================================================================
54//function : operator
55//purpose :
56//=======================================================================
57
58BRepLib_MakeShape::operator TopoDS_Shape() const
59{
60 return Shape();
61}
62
63
64
65//=======================================================================
66//function : HasDescendants
67//purpose :
68//=======================================================================
69
70Standard_Boolean BRepLib_MakeShape::HasDescendants(const TopoDS_Face&)const
71{
72 return (Standard_True);
73}
74
75
76
77//=======================================================================
78//function : FaceStatus
79//purpose :
80//=======================================================================
81
82BRepLib_ShapeModification BRepLib_MakeShape::FaceStatus
83 (const TopoDS_Face&) const
84{
85 BRepLib_ShapeModification myStatus = BRepLib_Trimmed;
86 return myStatus;
87}
88
89
90//=======================================================================
91//function : GeneratedFaces
92//purpose :
93//=======================================================================
94
95const TopTools_ListOfShape& BRepLib_MakeShape::DescendantFaces
96 (const TopoDS_Face&)
97{
98 return myGenFaces;
99}
100
101//=======================================================================
102//function : NbSurfaces
103//purpose :
104//=======================================================================
105
106Standard_Integer BRepLib_MakeShape::NbSurfaces() const
107{
108 return (0);
109}
110
111//=======================================================================
112//function : NewFaces
113//purpose :
114//=======================================================================
115
116const TopTools_ListOfShape& BRepLib_MakeShape::NewFaces(const Standard_Integer)
117{
118 return myNewFaces;
119}
120
121
122//=======================================================================
123//function : FacesFromEdges
124//purpose :
125//=======================================================================
126
127const TopTools_ListOfShape& BRepLib_MakeShape::FacesFromEdges
128 (const TopoDS_Edge&)
129{
130 return myEdgFaces;
131}