|
||||
File indexing completed on 2025-01-18 10:03:11
0001 // Created on: 1995-06-13 0002 // Created by: Jacques GOUSSARD 0003 // Copyright (c) 1995-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_MakeCylindricalHole_HeaderFile 0018 #define _BRepFeat_MakeCylindricalHole_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <gp_Ax1.hxx> 0024 #include <BRepFeat_Status.hxx> 0025 #include <TopoDS_Face.hxx> 0026 #include <BRepFeat_Builder.hxx> 0027 0028 // resolve name collisions with X11 headers 0029 #ifdef Status 0030 #undef Status 0031 #endif 0032 0033 //! Provides a tool to make cylindrical holes on a shape. 0034 class BRepFeat_MakeCylindricalHole : public BRepFeat_Builder 0035 { 0036 public: 0037 0038 DEFINE_STANDARD_ALLOC 0039 0040 0041 //! Empty constructor. 0042 BRepFeat_MakeCylindricalHole(); 0043 0044 //! Sets the axis of the hole(s). 0045 void Init (const gp_Ax1& Axis); 0046 0047 //! Sets the shape and axis on which hole(s) will be 0048 //! performed. 0049 void Init (const TopoDS_Shape& S, const gp_Ax1& Axis); 0050 0051 //! Performs every holes of radius <Radius>. This 0052 //! command has the same effect as a cut operation 0053 //! with an infinite cylinder defined by the given 0054 //! axis and <Radius>. 0055 Standard_EXPORT void Perform (const Standard_Real Radius); 0056 0057 //! Performs evry hole of radius <Radius> located 0058 //! between PFrom and PTo on the given axis. If 0059 //! <WithControl> is set to Standard_False no control 0060 //! are done on the resulting shape after the 0061 //! operation is performed. 0062 Standard_EXPORT void Perform (const Standard_Real Radius, const Standard_Real PFrom, const Standard_Real PTo, const Standard_Boolean WithControl = Standard_True); 0063 0064 //! Performs the first hole of radius <Radius>, in the 0065 //! direction of the defined axis. First hole signify 0066 //! first encountered after the origin of the axis. If 0067 //! <WithControl> is set to Standard_False no control 0068 //! are done on the resulting shape after the 0069 //! operation is performed. 0070 Standard_EXPORT void PerformThruNext (const Standard_Real Radius, const Standard_Boolean WithControl = Standard_True); 0071 0072 //! Performs evry holes of radius <Radius> located 0073 //! after the origin of the given axis. If 0074 //! <WithControl> is set to Standard_False no control 0075 //! are done on the resulting shape after the 0076 //! operation is performed. 0077 Standard_EXPORT void PerformUntilEnd (const Standard_Real Radius, const Standard_Boolean WithControl = Standard_True); 0078 0079 //! Performs a blind hole of radius <Radius> and 0080 //! length <Length>. The length is measured from the 0081 //! origin of the given axis. If <WithControl> is set 0082 //! to Standard_False no control are done after the 0083 //! operation is performed. 0084 Standard_EXPORT void PerformBlind (const Standard_Real Radius, const Standard_Real Length, const Standard_Boolean WithControl = Standard_True); 0085 0086 //! Returns the status after a hole is performed. 0087 BRepFeat_Status Status() const; 0088 0089 //! Builds the resulting shape (redefined from 0090 //! MakeShape). Invalidates the given parts of tools 0091 //! if any, and performs the result of the local 0092 //! operation. 0093 Standard_EXPORT void Build(); 0094 0095 0096 0097 0098 protected: 0099 0100 //! Unhide the base class member to avoid Clang warnings 0101 using BRepFeat_Builder::Perform; 0102 0103 0104 private: 0105 0106 0107 Standard_EXPORT BRepFeat_Status Validate(); 0108 0109 0110 gp_Ax1 myAxis; 0111 Standard_Boolean myAxDef; 0112 BRepFeat_Status myStatus; 0113 Standard_Boolean myIsBlind; 0114 Standard_Boolean myValidate; 0115 TopoDS_Face myTopFace; 0116 TopoDS_Face myBotFace; 0117 0118 0119 }; 0120 0121 0122 #include <BRepFeat_MakeCylindricalHole.lxx> 0123 0124 0125 0126 0127 0128 #endif // _BRepFeat_MakeCylindricalHole_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |