1 // Created on: 1997-10-07
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1997-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 <Adaptor3d_HSurface.hxx>
19 #include <BRepAdaptor_HSurface.hxx>
20 #include <BRepTopAdaptor_Tool.hxx>
21 #include <BRepTopAdaptor_TopolTool.hxx>
22 #include <TopoDS_Face.hxx>
24 BRepTopAdaptor_Tool::BRepTopAdaptor_Tool() {
25 myTopolTool = new BRepTopAdaptor_TopolTool();
27 myloaded=Standard_False;
30 BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const TopoDS_Face& F,
31 const Standard_Real /*Tol2d*/) {
32 myTopolTool = new BRepTopAdaptor_TopolTool();
34 Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface();
35 surface->ChangeSurface().Initialize(F,Standard_True);
36 const Handle(Adaptor3d_HSurface)& aSurf = surface; // to avoid ambiguity
37 myTopolTool->Initialize(aSurf);
39 myloaded=Standard_True;
42 BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const Handle(Adaptor3d_HSurface)& surface,
43 const Standard_Real /*Tol2d*/)
45 myTopolTool = new BRepTopAdaptor_TopolTool();
46 myTopolTool->Initialize(surface);
48 myloaded=Standard_True;
51 void BRepTopAdaptor_Tool::Init(const TopoDS_Face& F,
52 const Standard_Real /*Tol2d*/)
54 Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface();
55 surface->ChangeSurface().Initialize(F);
56 const Handle(Adaptor3d_HSurface)& aSurf = surface; // to avoid ambiguity
57 myTopolTool->Initialize(aSurf);
59 myloaded=Standard_True;
62 void BRepTopAdaptor_Tool::Init(const Handle(Adaptor3d_HSurface)& surface,
63 const Standard_Real /*Tol2d*/)
65 myTopolTool->Initialize(surface);
67 myloaded=Standard_True;
70 Handle(BRepTopAdaptor_TopolTool) BRepTopAdaptor_Tool::GetTopolTool() {
76 cout<<"\n*** Error ds Handle(BRepTopAdaptor_TopolTool) BRepTopAdaptor_Tool::GetTopolTool()\n"<<endl;
82 Handle(Adaptor3d_HSurface) BRepTopAdaptor_Tool::GetSurface() {
88 cout<<"\n*** Error ds Handle(BRepTopAdaptor_TopolTool) BRepTopAdaptor_Tool::GetSurface()\n"<<endl;
94 void BRepTopAdaptor_Tool::SetTopolTool(const Handle(BRepTopAdaptor_TopolTool)& TT) {
98 void BRepTopAdaptor_Tool::Destroy() {