Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:16:29

0001 // Created on: 1996-02-13
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1996-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 _BRepFeat_MakeRevol_HeaderFile
0018 #define _BRepFeat_MakeRevol_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopoDS_Shape.hxx>
0025 #include <NCollection_List.hxx>
0026 #include <TopTools_ShapeMapHasher.hxx>
0027 #include <NCollection_DataMap.hxx>
0028 #include <gp_Ax1.hxx>
0029 #include <BRepFeat_StatusError.hxx>
0030 #include <BRepFeat_Form.hxx>
0031 #include <Standard_Integer.hxx>
0032 class Geom_Curve;
0033 class TopoDS_Face;
0034 class TopoDS_Edge;
0035 
0036 //! Describes functions to build revolved shells from basis shapes.
0037 class BRepFeat_MakeRevol : public BRepFeat_Form
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   //! initializes the revolved shell class.
0043   BRepFeat_MakeRevol();
0044 
0045   //! a face Pbase is selected in the
0046   //! shape Sbase to serve as the basis for the
0047   //! revolved shell. The revolution will be defined
0048   //! by the axis Axis and Fuse offers a choice between:
0049   //! -   removing matter with a Boolean cut using the setting 0
0050   //! -   adding matter with Boolean fusion using the setting 1.
0051   //! The sketch face Skface serves to determine
0052   //! the type of operation. If it is inside the basis
0053   //! shape, a local operation such as glueing can be performed.
0054   BRepFeat_MakeRevol(const TopoDS_Shape& Sbase,
0055                      const TopoDS_Shape& Pbase,
0056                      const TopoDS_Face&  Skface,
0057                      const gp_Ax1&       Axis,
0058                      const int           Fuse,
0059                      const bool          Modify);
0060 
0061   Standard_EXPORT void Init(const TopoDS_Shape& Sbase,
0062                             const TopoDS_Shape& Pbase,
0063                             const TopoDS_Face&  Skface,
0064                             const gp_Ax1&       Axis,
0065                             const int           Fuse,
0066                             const bool          Modify);
0067 
0068   //! Indicates that the edge <E> will slide on the face
0069   //! <OnFace>. Raises ConstructionError if the face does not belong to the
0070   //! basis shape, or the edge to the prismed shape.
0071   Standard_EXPORT void Add(const TopoDS_Edge& E, const TopoDS_Face& OnFace);
0072 
0073   Standard_EXPORT void Perform(const double Angle);
0074 
0075   Standard_EXPORT void Perform(const TopoDS_Shape& Until);
0076 
0077   //! Reconstructs the feature topologically.
0078   Standard_EXPORT void Perform(const TopoDS_Shape& From, const TopoDS_Shape& Until);
0079 
0080   //! Builds an infinite shell. The infinite descendants
0081   //! will not be kept in the result.
0082   Standard_EXPORT void PerformThruAll();
0083 
0084   //! Assigns both a limiting shape, Until from
0085   //! TopoDS_Shape, and an angle, Angle at
0086   //! which to stop generation of the revolved shell feature.
0087   Standard_EXPORT void PerformUntilAngle(const TopoDS_Shape& Until, const double Angle);
0088 
0089   Standard_EXPORT void Curves(NCollection_Sequence<occ::handle<Geom_Curve>>& S) override;
0090 
0091   Standard_EXPORT occ::handle<Geom_Curve> BarycCurve() override;
0092 
0093 private:
0094   TopoDS_Shape myPbase;
0095   NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher>
0096                                                 mySlface;
0097   gp_Ax1                                        myAxis;
0098   NCollection_Sequence<occ::handle<Geom_Curve>> myCurves;
0099   occ::handle<Geom_Curve>                       myBCurve;
0100   BRepFeat_StatusError                          myStatusError;
0101 };
0102 
0103 #include <BRepFeat_MakeRevol.lxx>
0104 
0105 #endif // _BRepFeat_MakeRevol_HeaderFile