Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:16

0001 // Created on: 1998-11-13
0002 // Created by: Jean-Michel BOULCOURT
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepProj_Projection_HeaderFile
0018 #define _BRepProj_Projection_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopoDS_Shape.hxx>
0025 #include <TopoDS_Compound.hxx>
0026 #include <TopTools_HSequenceOfShape.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <TopoDS_Wire.hxx>
0029 class gp_Dir;
0030 class gp_Pnt;
0031 
0032 
0033 //! The  Projection   class provides  conical  and
0034 //! cylindrical projections of  Edge  or  Wire  on
0035 //! a Shape from TopoDS. The result will be a Edge
0036 //! or  Wire  from  TopoDS.
0037 class BRepProj_Projection 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   //! Makes a Cylindrical projection of Wire om Shape
0045   Standard_EXPORT BRepProj_Projection(const TopoDS_Shape& Wire, const TopoDS_Shape& Shape, const gp_Dir& D);
0046   
0047   //! Makes a Conical projection of Wire om Shape
0048   Standard_EXPORT BRepProj_Projection(const TopoDS_Shape& Wire, const TopoDS_Shape& Shape, const gp_Pnt& P);
0049   
0050   //! returns False if the section failed
0051     Standard_Boolean IsDone() const;
0052   
0053   //! Resets the iterator by resulting wires.
0054     void Init();
0055   
0056   //! Returns True if there is a current result wire
0057     Standard_Boolean More() const;
0058   
0059   //! Move to the next result wire.
0060     void Next();
0061   
0062   //! Returns the current result wire.
0063     TopoDS_Wire Current() const;
0064   
0065   //! Returns the complete result as compound of wires.
0066     TopoDS_Compound Shape() const;
0067 
0068 
0069 
0070 
0071 protected:
0072 
0073 
0074 
0075 
0076 
0077 private:
0078 
0079   
0080   //! Performs section of theShape by theTool
0081   //! and stores result in the fields.
0082   Standard_EXPORT void BuildSection (const TopoDS_Shape& Shape, const TopoDS_Shape& Tool);
0083 
0084 
0085   Standard_Boolean myIsDone;
0086   TopoDS_Shape myLsh;
0087   TopoDS_Compound myShape;
0088   Handle(TopTools_HSequenceOfShape) mySection;
0089   Standard_Integer myItr;
0090 
0091 
0092 };
0093 
0094 
0095 #include <BRepProj_Projection.lxx>
0096 
0097 
0098 
0099 
0100 
0101 #endif // _BRepProj_Projection_HeaderFile