|
|
|||
File indexing completed on 2026-09-08 09:15:42
0001 // Created on: 1994-12-02 0002 // Created by: Jacques GOUSSARD 0003 // Copyright (c) 1994-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 _BRepBuilderAPI_ModifyShape_HeaderFile 0018 #define _BRepBuilderAPI_ModifyShape_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <BRepTools_Modifier.hxx> 0025 #include <TopoDS_Shape.hxx> 0026 #include <BRepBuilderAPI_MakeShape.hxx> 0027 #include <TopTools_ListOfShape.hxx> 0028 class BRepTools_Modification; 0029 0030 //! Implements the methods of MakeShape for the 0031 //! constant topology modifications. The methods are 0032 //! implemented when the modification uses a Modifier 0033 //! from BRepTools. Some of them have to be redefined 0034 //! if the modification is implemented with another 0035 //! tool (see Transform from BRepBuilderAPI for example). 0036 //! The BRepBuilderAPI package provides the following 0037 //! frameworks to perform modifications of this sort: 0038 //! - BRepBuilderAPI_Copy to produce the copy of a shape, 0039 //! - BRepBuilderAPI_Transform and 0040 //! BRepBuilderAPI_GTransform to apply a geometric 0041 //! transformation to a shape, 0042 //! - BRepBuilderAPI_NurbsConvert to convert the 0043 //! whole geometry of a shape into NURBS geometry, 0044 //! - BRepOffsetAPI_DraftAngle to build a tapered shape. 0045 class BRepBuilderAPI_ModifyShape : public BRepBuilderAPI_MakeShape 0046 { 0047 public: 0048 DEFINE_STANDARD_ALLOC 0049 0050 //! Returns the list of shapes modified from the shape 0051 //! <S>. 0052 Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) 0053 Standard_OVERRIDE; 0054 0055 //! Returns the modified shape corresponding to <S>. 0056 //! S can correspond to the entire initial shape or to its subshape. 0057 //! Exceptions 0058 //! Standard_NoSuchObject if S is not the initial shape or 0059 //! a subshape of the initial shape to which the 0060 //! transformation has been applied. Raises NoSuchObject from Standard 0061 //! if S is not the initial shape or a sub-shape 0062 //! of the initial shape. 0063 Standard_EXPORT virtual TopoDS_Shape ModifiedShape(const TopoDS_Shape& S) const; 0064 0065 protected: 0066 //! Empty constructor. 0067 Standard_EXPORT BRepBuilderAPI_ModifyShape(); 0068 0069 //! Initializes the modifier with the Shape <S>, and 0070 //! set the field <myInitialShape> to <S>. 0071 Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S); 0072 0073 //! Set the field <myModification> with <M>. 0074 Standard_EXPORT BRepBuilderAPI_ModifyShape(const Handle(BRepTools_Modification)& M); 0075 0076 //! Initializes the modifier with the Shape <S>, and 0077 //! set the field <myInitialShape> to <S>, and set the 0078 //! field <myModification> with <M>, the performs the 0079 //! modification. 0080 Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S, 0081 const Handle(BRepTools_Modification)& M); 0082 0083 //! Performs the previously given modification on the 0084 //! shape <S>. 0085 Standard_EXPORT void DoModif(const TopoDS_Shape& S); 0086 0087 //! Performs the modification <M> on a previously 0088 //! given shape. 0089 Standard_EXPORT void DoModif(const Handle(BRepTools_Modification)& M); 0090 0091 //! Performs the modification <M> on the shape <S>. 0092 Standard_EXPORT void DoModif(const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M); 0093 0094 BRepTools_Modifier myModifier; 0095 TopoDS_Shape myInitialShape; 0096 Handle(BRepTools_Modification) myModification; 0097 0098 private: 0099 Standard_EXPORT void DoModif(); 0100 }; 0101 0102 #endif // _BRepBuilderAPI_ModifyShape_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|