1 // Created on: 1994-08-31
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1994-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.
18 #include <Draft_FaceInfo.hxx>
19 #include <Geom_Curve.hxx>
20 #include <Geom_RectangularTrimmedSurface.hxx>
21 #include <Geom_Surface.hxx>
22 #include <Standard_DomainError.hxx>
23 #include <TopoDS_Face.hxx>
25 //=======================================================================
26 //function : Draft_FaceInfo
28 //=======================================================================
29 Draft_FaceInfo::Draft_FaceInfo ()
33 //=======================================================================
34 //function : Draft_FaceInfo
36 //=======================================================================
38 Draft_FaceInfo::Draft_FaceInfo (const Handle(Geom_Surface)& S,\
39 const Standard_Boolean HasNewGeometry):
40 myNewGeom(HasNewGeometry)
42 Handle(Geom_RectangularTrimmedSurface) T = Handle(Geom_RectangularTrimmedSurface)::DownCast(S);
43 if (!T.IsNull()) myGeom = T->BasisSurface();
48 //=======================================================================
51 //=======================================================================
53 void Draft_FaceInfo::RootFace(const TopoDS_Face& F)
60 //=======================================================================
63 //=======================================================================
65 void Draft_FaceInfo::Add(const TopoDS_Face& F)
70 else if (myF2.IsNull()) {
76 //=======================================================================
77 //function : FirstFace
79 //=======================================================================
81 const TopoDS_Face& Draft_FaceInfo::FirstFace () const
87 //=======================================================================
88 //function : SecondFace
90 //=======================================================================
92 const TopoDS_Face& Draft_FaceInfo::SecondFace () const
98 //=======================================================================
99 //function : NewGeometry
101 //=======================================================================
103 Standard_Boolean Draft_FaceInfo::NewGeometry() const
108 //=======================================================================
109 //function : Geometry
111 //=======================================================================
113 const Handle(Geom_Surface)& Draft_FaceInfo::Geometry() const
118 //=======================================================================
119 //function : ChangeGeometry
121 //=======================================================================
123 Handle(Geom_Surface)& Draft_FaceInfo::ChangeGeometry()
128 //=======================================================================
131 //=======================================================================
133 const Handle(Geom_Curve)& Draft_FaceInfo::Curve() const
138 //=======================================================================
139 //function : ChangeCurve
141 //=======================================================================
143 Handle(Geom_Curve)& Draft_FaceInfo::ChangeCurve()
148 //=======================================================================
149 //function : RootFace
151 //=======================================================================
153 const TopoDS_Face & Draft_FaceInfo::RootFace() const