Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 09:19:23

0001 // Created on: 1996-12-16
0002 // Created by: Remi Lequette
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 _TNaming_Builder_HeaderFile
0018 #define _TNaming_Builder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 class TNaming_UsedShapes;
0025 class TNaming_NamedShape;
0026 class Standard_ConstructionError;
0027 class TDF_Label;
0028 class TopoDS_Shape;
0029 
0030 //! A tool to create and maintain topological attributes.
0031 //! Constructor creates an empty
0032 //! TNaming_NamedShape attribute at the given
0033 //! label. It allows adding "old shape" and "new
0034 //! shape" pairs with the specified evolution to this
0035 //! named shape. One evolution type per one
0036 //! builder must be used.
0037 class TNaming_Builder
0038 {
0039 public:
0040   DEFINE_STANDARD_ALLOC
0041 
0042   //! Create a Builder.
0043   //! Warning: Before Addition copies the current Value, and clear
0044   Standard_EXPORT TNaming_Builder(const TDF_Label& aLabel);
0045 
0046   //! Records the shape newShape which was
0047   //! generated during a topological construction.
0048   //! As an example, consider the case of a face
0049   //! generated in construction of a box.
0050   Standard_EXPORT void Generated(const TopoDS_Shape& newShape);
0051 
0052   //! Records the shape newShape which was
0053   //! generated from the shape oldShape during a topological construction.
0054   //! As an example, consider the case of a face
0055   //! generated from an edge in construction of a prism.
0056   Standard_EXPORT void Generated(const TopoDS_Shape& oldShape, const TopoDS_Shape& newShape);
0057 
0058   //! Records the shape oldShape which was deleted from the current label.
0059   //! As an example, consider the case of a face removed by a Boolean operation.
0060   Standard_EXPORT void Delete(const TopoDS_Shape& oldShape);
0061 
0062   //! Records the shape newShape which is a
0063   //! modification of the shape oldShape.
0064   //! As an example, consider the case of a face split
0065   //! or merged in a Boolean operation.
0066   Standard_EXPORT void Modify(const TopoDS_Shape& oldShape, const TopoDS_Shape& newShape);
0067 
0068   //! Add a Shape to the current label, This Shape is
0069   //! unmodified. Used for example to define a set
0070   //! of shapes under a label.
0071   Standard_EXPORT void Select(const TopoDS_Shape& aShape, const TopoDS_Shape& inShape);
0072 
0073   //! Returns the NamedShape which has been built or is under construction.
0074   Standard_EXPORT occ::handle<TNaming_NamedShape> NamedShape() const;
0075 
0076 private:
0077   occ::handle<TNaming_UsedShapes> myShapes;
0078   occ::handle<TNaming_NamedShape> myAtt;
0079 };
0080 
0081 #endif // _TNaming_Builder_HeaderFile