1 // Created on: 1993-07-23 2 // Created by: Remi LEQUETTE 3 // Copyright (c) 1993-1999 Matra Datavision 4 // Copyright (c) 1999-2014 OPEN CASCADE SAS 5 // 6 // This file is part of Open CASCADE Technology software library. 7 // 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. 13 // 14 // Alternatively, this file may be used under the terms of Open CASCADE 15 // commercial license or contractual agreement. 16 17 18 #include <BRepLib_MakeShape.hxx> 19 #include <StdFail_NotDone.hxx> 20 #include <TopoDS_Edge.hxx> 21 #include <TopoDS_Face.hxx> 22 #include <TopoDS_Shape.hxx> 23 24 //======================================================================= 25 //function : BRepLib_MakeShape 26 //purpose : 27 //======================================================================= BRepLib_MakeShape()28BRepLib_MakeShape::BRepLib_MakeShape() 29 { 30 } 31 32 //======================================================================= 33 //function : Build 34 //purpose : 35 //======================================================================= 36 Build()37void BRepLib_MakeShape::Build() 38 { 39 } 40 41 //======================================================================= 42 //function : Shape 43 //purpose : 44 //======================================================================= 45 Shape()46const TopoDS_Shape& BRepLib_MakeShape::Shape() 47 { 48 if (!IsDone()) { 49 // the following is const cast away 50 ((BRepLib_MakeShape*) (void*) this)->Build(); 51 Check(); 52 } 53 return myShape; 54 } 55 56 57 //======================================================================= 58 //function : operator 59 //purpose : 60 //======================================================================= 61 operator TopoDS_Shape()62BRepLib_MakeShape::operator TopoDS_Shape() 63 { 64 return Shape(); 65 } 66 67 68 69 //======================================================================= 70 //function : HasDescendants 71 //purpose : 72 //======================================================================= 73 HasDescendants(const TopoDS_Face &) const74Standard_Boolean BRepLib_MakeShape::HasDescendants(const TopoDS_Face&)const 75 { 76 return (Standard_True); 77 } 78 79 80 81 //======================================================================= 82 //function : FaceStatus 83 //purpose : 84 //======================================================================= 85 FaceStatus(const TopoDS_Face &) const86BRepLib_ShapeModification BRepLib_MakeShape::FaceStatus 87 (const TopoDS_Face&) const 88 { 89 BRepLib_ShapeModification myStatus = BRepLib_Trimmed; 90 return myStatus; 91 } 92 93 94 //======================================================================= 95 //function : GeneratedFaces 96 //purpose : 97 //======================================================================= 98 DescendantFaces(const TopoDS_Face &)99const TopTools_ListOfShape& BRepLib_MakeShape::DescendantFaces 100 (const TopoDS_Face&) 101 { 102 return myGenFaces; 103 } 104 105 //======================================================================= 106 //function : NbSurfaces 107 //purpose : 108 //======================================================================= 109 NbSurfaces() const110Standard_Integer BRepLib_MakeShape::NbSurfaces() const 111 { 112 return (0); 113 } 114 115 //======================================================================= 116 //function : NewFaces 117 //purpose : 118 //======================================================================= 119 NewFaces(const Standard_Integer)120const TopTools_ListOfShape& BRepLib_MakeShape::NewFaces(const Standard_Integer) 121 { 122 return myNewFaces; 123 } 124 125 126 //======================================================================= 127 //function : FacesFromEdges 128 //purpose : 129 //======================================================================= 130 FacesFromEdges(const TopoDS_Edge &)131const TopTools_ListOfShape& BRepLib_MakeShape::FacesFromEdges 132 (const TopoDS_Edge&) 133 { 134 return myEdgFaces; 135 } 136