Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-22 08:57:11

0001 // Created on: 1994-03-07
0002 // Created by: Joelle CHAUVET
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 _BRepFill_Generator_HeaderFile
0018 #define _BRepFill_Generator_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <BRepFill_ThruSectionErrorStatus.hxx>
0024 #include <TopoDS_Shape.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 #include <TopoDS_Shell.hxx>
0027 #include <NCollection_List.hxx>
0028 #include <TopTools_ShapeMapHasher.hxx>
0029 #include <NCollection_DataMap.hxx>
0030 #include <BRepTools_ReShape.hxx>
0031 class TopoDS_Wire;
0032 class TopoDS_Shape;
0033 
0034 //! Compute a topological surface (a shell) using
0035 //! generating wires. The face of the shell will be
0036 //! ruled surfaces passing by the wires.
0037 //! The wires must have the same number of edges.
0038 class BRepFill_Generator
0039 {
0040 public:
0041   DEFINE_STANDARD_ALLOC
0042 
0043   Standard_EXPORT BRepFill_Generator();
0044 
0045   Standard_EXPORT void AddWire(const TopoDS_Wire& Wire);
0046 
0047   //! Compute the shell.
0048   Standard_EXPORT void Perform();
0049 
0050   const TopoDS_Shell& Shell() const;
0051 
0052   //! Returns all the shapes created
0053   Standard_EXPORT const NCollection_DataMap<TopoDS_Shape,
0054                                             NCollection_List<TopoDS_Shape>,
0055                                             TopTools_ShapeMapHasher>&
0056                         Generated() const;
0057 
0058   //! Returns the shapes created from a subshape
0059   //! <SSection> of a section.
0060   Standard_EXPORT const NCollection_List<TopoDS_Shape>& GeneratedShapes(
0061     const TopoDS_Shape& SSection) const;
0062 
0063   //! Returns a modified shape in the constructed shell,
0064   //! If shape is not changed (replaced) during operation => returns the same shape
0065   Standard_EXPORT TopoDS_Shape ResultShape(const TopoDS_Shape& theShape) const;
0066 
0067   //! Sets the mutable input state
0068   //! If true then the input profile can be modified
0069   //! inside the operation. Default value is true.
0070   Standard_EXPORT void SetMutableInput(const bool theIsMutableInput);
0071 
0072   //! Returns the current mutable input state
0073   Standard_EXPORT bool IsMutableInput() const;
0074 
0075   //! Returns status of the operation
0076   BRepFill_ThruSectionErrorStatus GetStatus() const { return myStatus; }
0077 
0078 private:
0079   NCollection_Sequence<TopoDS_Shape> myWires;
0080   TopoDS_Shell                       myShell;
0081   NCollection_DataMap<TopoDS_Shape, NCollection_List<TopoDS_Shape>, TopTools_ShapeMapHasher> myMap;
0082   NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myOldNewShapes;
0083   BRepTools_ReShape                                                        myReshaper;
0084   bool                                                                     myMutableInput;
0085   BRepFill_ThruSectionErrorStatus                                          myStatus;
0086 };
0087 
0088 #include <BRepFill_Generator.lxx>
0089 
0090 #endif // _BRepFill_Generator_HeaderFile