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.
17 #include <BRepTopAdaptor_Tool.ixx>
19 #include <BRepTopAdaptor_TopolTool.hxx>
20 #include <BRepAdaptor_HSurface.hxx>
21 #include <Adaptor3d_HSurface.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 myTopolTool->Initialize(surface);
38 myloaded=Standard_True;
41 BRepTopAdaptor_Tool::BRepTopAdaptor_Tool(const Handle(Adaptor3d_HSurface)& surface,
42 const Standard_Real /*Tol2d*/)
44 myTopolTool = new BRepTopAdaptor_TopolTool();
45 myTopolTool->Initialize(surface);
47 myloaded=Standard_True;
50 void BRepTopAdaptor_Tool::Init(const TopoDS_Face& F,
51 const Standard_Real /*Tol2d*/)
53 Handle(BRepAdaptor_HSurface) surface = new BRepAdaptor_HSurface();
54 surface->ChangeSurface().Initialize(F);
55 myTopolTool->Initialize(surface);
57 myloaded=Standard_True;
60 void BRepTopAdaptor_Tool::Init(const Handle(Adaptor3d_HSurface)& surface,
61 const Standard_Real /*Tol2d*/)
63 myTopolTool->Initialize(surface);
65 myloaded=Standard_True;
68 Handle_BRepTopAdaptor_TopolTool BRepTopAdaptor_Tool::GetTopolTool() {
73 cout<<"\n*** Error ds Handle_BRepTopAdaptor_TopolTool BRepTopAdaptor_Tool::GetTopolTool()\n"<<endl;
78 Handle_Adaptor3d_HSurface BRepTopAdaptor_Tool::GetSurface() {
83 cout<<"\n*** Error ds Handle_BRepTopAdaptor_TopolTool BRepTopAdaptor_Tool::GetSurface()\n"<<endl;
88 void BRepTopAdaptor_Tool::SetTopolTool(const Handle(BRepTopAdaptor_TopolTool)& TT) {
92 void BRepTopAdaptor_Tool::Destroy() {