1 // Created on: 1995-09-18
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1995-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 <BRepFill.hxx>
19 #include <BRepFill_Evolved.hxx>
20 #include <BRepOffsetAPI_MakeEvolved.hxx>
22 #include <TopoDS_Face.hxx>
23 #include <TopoDS_Shape.hxx>
24 #include <TopoDS_Wire.hxx>
26 //=======================================================================
27 //function : BRepOffsetAPI_MakeEvolved
29 //=======================================================================
30 BRepOffsetAPI_MakeEvolved::BRepOffsetAPI_MakeEvolved()
35 //=======================================================================
36 //function : BRepOffsetAPI_MakeEvolved
38 //=======================================================================
40 BRepOffsetAPI_MakeEvolved::BRepOffsetAPI_MakeEvolved(const TopoDS_Wire& Spine,
41 const TopoDS_Wire& Profil,
42 const GeomAbs_JoinType Join,
43 const Standard_Boolean AxeProf,
44 const Standard_Boolean Solid,
45 const Standard_Boolean ProfOnSpine,
46 const Standard_Real Tol)
48 gp_Ax3 Axis(gp_Pnt(0.,0.,0.),
54 BRepFill::Axe(Spine,Profil,Axis,POS,Tol);
55 if (ProfOnSpine && !POS) return;
58 myEvolved.Perform(Spine,Profil,Axis,Join,Solid);
64 //=======================================================================
65 //function : BRepOffsetAPI_MakeEvolved
67 //=======================================================================
69 BRepOffsetAPI_MakeEvolved::BRepOffsetAPI_MakeEvolved(const TopoDS_Face& Spine,
70 const TopoDS_Wire& Profil,
71 const GeomAbs_JoinType Join,
72 const Standard_Boolean AxeProf,
73 const Standard_Boolean Solid,
74 const Standard_Boolean ProfOnSpine,
75 const Standard_Real Tol)
77 gp_Ax3 Axis(gp_Pnt(0.,0.,0.),
83 BRepFill::Axe(Spine,Profil,Axis,POS,Tol);
84 if (ProfOnSpine && !POS) return;
87 myEvolved.Perform(Spine,Profil,Axis,Join,Solid);
92 //=======================================================================
93 //function : BRepFill_Evolved&
95 //=======================================================================
97 const BRepFill_Evolved& BRepOffsetAPI_MakeEvolved::Evolved() const
103 //=======================================================================
106 //=======================================================================
108 void BRepOffsetAPI_MakeEvolved::Build()
110 myShape = myEvolved.Shape();
111 if (myEvolved.IsDone()) Done();
115 //=======================================================================
118 //=======================================================================
120 const TopoDS_Shape& BRepOffsetAPI_MakeEvolved::Top() const
122 return myEvolved.Top();
125 //=======================================================================
128 //=======================================================================
130 const TopoDS_Shape& BRepOffsetAPI_MakeEvolved::Bottom() const
132 return myEvolved.Bottom();
135 //=======================================================================
136 //function : GeneratedShapes
138 //=======================================================================
140 const TopTools_ListOfShape& BRepOffsetAPI_MakeEvolved::GeneratedShapes (
141 const TopoDS_Shape& SpineShape,
142 const TopoDS_Shape& ProfShape )
145 return myEvolved.GeneratedShapes(SpineShape,ProfShape);