|
|
|||
File indexing completed on 2026-09-21 09:16:39
0001 // Created on: 1993-10-12 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1993-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 _BRepPrimAPI_MakeRevol_HeaderFile 0018 #define _BRepPrimAPI_MakeRevol_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <BRepSweep_Revol.hxx> 0025 #include <TopoDS_Shape.hxx> 0026 #include <NCollection_List.hxx> 0027 #include <BRepPrimAPI_MakeSweep.hxx> 0028 #include <BRepTools_History.hxx> 0029 class TopoDS_Shape; 0030 class gp_Ax1; 0031 0032 //! Class to make revolved sweep topologies. 0033 //! 0034 //! a revolved sweep is defined by : 0035 //! 0036 //! * A basis topology which is swept. 0037 //! 0038 //! The basis topology must not contain solids 0039 //! (neither composite solids.). 0040 //! 0041 //! The basis topology may be copied or shared in 0042 //! the result. 0043 //! 0044 //! * A rotation axis and angle : 0045 //! 0046 //! - The axis is an Ax1 from gp. 0047 //! 0048 //! - The angle is in [0, 2*Pi]. 0049 //! 0050 //! - The angle default value is 2*Pi. 0051 //! 0052 //! The result is a topology with a higher dimension : 0053 //! 0054 //! - Vertex -> Edge. 0055 //! - Edge -> Face. 0056 //! - Wire -> Shell. 0057 //! - Face -> Solid. 0058 //! - Shell -> CompSolid. 0059 //! 0060 //! Sweeping a Compound sweeps the elements of the 0061 //! compound and creates a compound with the 0062 //! results. 0063 class BRepPrimAPI_MakeRevol : public BRepPrimAPI_MakeSweep 0064 { 0065 public: 0066 DEFINE_STANDARD_ALLOC 0067 0068 //! Builds the Revol of base S, axis A and angle D. If C 0069 //! is true, S is copied. 0070 Standard_EXPORT BRepPrimAPI_MakeRevol(const TopoDS_Shape& S, 0071 const gp_Ax1& A, 0072 const double D, 0073 const bool Copy = false); 0074 0075 //! Builds the Revol of base S, axis A and angle 2*Pi. If 0076 //! C is true, S is copied. 0077 Standard_EXPORT BRepPrimAPI_MakeRevol(const TopoDS_Shape& S, 0078 const gp_Ax1& A, 0079 const bool Copy = false); 0080 0081 //! Returns the internal sweeping algorithm. 0082 Standard_EXPORT const BRepSweep_Revol& Revol() const; 0083 0084 //! Builds the resulting shape (redefined from MakeShape). 0085 Standard_EXPORT void Build( 0086 const Message_ProgressRange& theRange = Message_ProgressRange()) override; 0087 0088 //! Returns the first shape of the revol (coinciding with 0089 //! the generating shape). 0090 Standard_EXPORT TopoDS_Shape FirstShape() override; 0091 0092 //! Returns the TopoDS Shape of the end of the revol. 0093 Standard_EXPORT TopoDS_Shape LastShape() override; 0094 0095 //! Returns list of shape generated from shape S 0096 //! Warning: shape S must be shape of type VERTEX, EDGE, FACE, SOLID. 0097 //! For shapes of other types method always returns empty list 0098 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Generated(const TopoDS_Shape& S) override; 0099 0100 //! Returns true if the shape S has been deleted. 0101 Standard_EXPORT bool IsDeleted(const TopoDS_Shape& S) override; 0102 0103 //! Returns the TopoDS Shape of the beginning of the revolution, 0104 //! generated with theShape (subShape of the generating shape). 0105 Standard_EXPORT TopoDS_Shape FirstShape(const TopoDS_Shape& theShape); 0106 0107 //! Returns the TopoDS Shape of the end of the revolution, 0108 //! generated with theShape (subShape of the generating shape). 0109 Standard_EXPORT TopoDS_Shape LastShape(const TopoDS_Shape& theShape); 0110 0111 //! Check if there are degenerated edges in the result. 0112 Standard_EXPORT bool HasDegenerated() const; 0113 0114 //! Returns the list of degenerated edges 0115 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Degenerated() const; 0116 0117 protected: 0118 //! Checks possibilities of producing self-intersection surface 0119 //! returns true if all surfaces are valid 0120 Standard_EXPORT bool CheckValidity(const TopoDS_Shape& theShape, const gp_Ax1& theA); 0121 0122 private: 0123 BRepSweep_Revol myRevol; 0124 NCollection_List<TopoDS_Shape> myDegenerated; 0125 occ::handle<BRepTools_History> myHist; 0126 bool myIsBuild; 0127 }; 0128 0129 #endif // _BRepPrimAPI_MakeRevol_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|