1 // Created on: 1998-11-13
2 // Created by: Jean-Michel BOULCOURT
3 // Copyright (c) 1998-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 #ifndef _BRepProj_Projection_HeaderFile
18 #define _BRepProj_Projection_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <TopoDS_Shape.hxx>
26 #include <TopoDS_Compound.hxx>
27 #include <TopTools_HSequenceOfShape.hxx>
28 #include <Standard_Integer.hxx>
29 #include <TopoDS_Wire.hxx>
30 class Standard_NoSuchObject;
31 class Standard_ConstructionError;
32 class Standard_NullObject;
38 //! The Projection class provides conical and
39 //! cylindrical projections of Edge or Wire on
40 //! a Shape from TopoDS. The result will be a Edge
41 //! or Wire from TopoDS.
42 class BRepProj_Projection
49 //! Makes a Cylindrical projection of Wire om Shape
50 Standard_EXPORT BRepProj_Projection(const TopoDS_Shape& Wire, const TopoDS_Shape& Shape, const gp_Dir& D);
52 //! Makes a Conical projection of Wire om Shape
53 Standard_EXPORT BRepProj_Projection(const TopoDS_Shape& Wire, const TopoDS_Shape& Shape, const gp_Pnt& P);
55 //! returns False if the section failed
56 Standard_Boolean IsDone() const;
58 //! Resets the iterator by resulting wires.
61 //! Returns True if there is a current result wire
62 Standard_Boolean More() const;
64 //! Move to the next result wire.
67 //! Returns the current result wire.
68 TopoDS_Wire Current() const;
70 //! Returns the complete result as compound of wires.
71 TopoDS_Compound Shape() const;
85 //! Performs section of theShape by theTool
86 //! and stores result in the fields.
87 Standard_EXPORT void BuildSection (const TopoDS_Shape& Shape, const TopoDS_Shape& Tool);
90 Standard_Boolean myIsDone;
92 TopoDS_Compound myShape;
93 Handle(TopTools_HSequenceOfShape) mySection;
94 Standard_Integer myItr;
100 #include <BRepProj_Projection.lxx>
106 #endif // _BRepProj_Projection_HeaderFile