Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0031 //! Implements   the  methods   of MakeShape for   the
0032 //! constant  topology modifications.  The methods are
0033 //! implemented  when the modification uses a Modifier
0034 //! from BRepTools. Some of  them have to be redefined
0035 //! if  the  modification is  implemented with another
0036 //! tool (see Transform from BRepBuilderAPI for example).
0037 //! The BRepBuilderAPI package provides the following
0038 //! frameworks to perform modifications of this sort:
0039 //! -   BRepBuilderAPI_Copy to produce the copy of a shape,
0040 //! -   BRepBuilderAPI_Transform and
0041 //! BRepBuilderAPI_GTransform to apply a geometric
0042 //! transformation to a shape,
0043 //! -   BRepBuilderAPI_NurbsConvert to convert the
0044 //! whole geometry of a shape into NURBS geometry,
0045 //! -   BRepOffsetAPI_DraftAngle to build a tapered shape.
0046 class BRepBuilderAPI_ModifyShape  : public BRepBuilderAPI_MakeShape
0047 {
0048 public:
0049 
0050   DEFINE_STANDARD_ALLOC
0051 
0052   
0053   //! Returns the list  of shapes modified from the shape
0054   //! <S>.
0055   Standard_EXPORT virtual const TopTools_ListOfShape& Modified (const TopoDS_Shape& S) Standard_OVERRIDE;
0056   
0057   //! Returns the modified shape corresponding to <S>.
0058   //! S can correspond to the entire initial shape or to its subshape.
0059   //! Exceptions
0060   //! Standard_NoSuchObject if S is not the initial shape or
0061   //! a subshape of the initial shape to which the
0062   //! transformation has been applied. Raises NoSuchObject from Standard
0063   //! if S is not the initial shape or a sub-shape
0064   //! of the initial shape.
0065   Standard_EXPORT virtual TopoDS_Shape ModifiedShape (const TopoDS_Shape& S) const;
0066 
0067 
0068 
0069 
0070 protected:
0071 
0072   
0073   //! Empty constructor.
0074   Standard_EXPORT BRepBuilderAPI_ModifyShape();
0075   
0076   //! Initializes the modifier with  the Shape  <S>, and
0077   //! set the field <myInitialShape> to <S>.
0078   Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S);
0079   
0080   //! Set the field <myModification> with <M>.
0081   Standard_EXPORT BRepBuilderAPI_ModifyShape(const Handle(BRepTools_Modification)& M);
0082   
0083   //! Initializes the modifier with  the Shape  <S>, and
0084   //! set the field <myInitialShape> to <S>, and set the
0085   //! field <myModification> with  <M>, the performs the
0086   //! modification.
0087   Standard_EXPORT BRepBuilderAPI_ModifyShape(const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M);
0088   
0089   //! Performs the previously  given modification on the
0090   //! shape <S>.
0091   Standard_EXPORT void DoModif (const TopoDS_Shape& S);
0092   
0093   //! Performs the  modification   <M> on a   previously
0094   //! given shape.
0095   Standard_EXPORT void DoModif (const Handle(BRepTools_Modification)& M);
0096   
0097   //! Performs the  modification <M> on the shape <S>.
0098   Standard_EXPORT void DoModif (const TopoDS_Shape& S, const Handle(BRepTools_Modification)& M);
0099 
0100 
0101   BRepTools_Modifier myModifier;
0102   TopoDS_Shape myInitialShape;
0103   Handle(BRepTools_Modification) myModification;
0104 
0105 
0106 private:
0107 
0108   
0109   Standard_EXPORT void DoModif();
0110 
0111 
0112 
0113 
0114 };
0115 
0116 
0117 
0118 
0119 
0120 
0121 
0122 #endif // _BRepBuilderAPI_ModifyShape_HeaderFile