Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-23 10:18:48

0001 // Created on: 2012-08-06
0002 // Created by: jgv@ROLEX
0003 // Copyright (c) 2012-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BRepOffsetAPI_MiddlePath_HeaderFile
0017 #define _BRepOffsetAPI_MiddlePath_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 
0022 #include <TopoDS_Shape.hxx>
0023 #include <TopoDS_Wire.hxx>
0024 #include <TopTools_ShapeMapHasher.hxx>
0025 #include <NCollection_Map.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <BRepBuilderAPI_MakeShape.hxx>
0028 
0029 //! Describes functions to build a middle path of a
0030 //! pipe-like shape
0031 class BRepOffsetAPI_MiddlePath : public BRepBuilderAPI_MakeShape
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   //! General constructor.
0037   //! StartShape and EndShape may be
0038   //! a wire or a face
0039   Standard_EXPORT BRepOffsetAPI_MiddlePath(const TopoDS_Shape& aShape,
0040                                            const TopoDS_Shape& StartShape,
0041                                            const TopoDS_Shape& EndShape);
0042 
0043   Standard_EXPORT void Build(
0044     const Message_ProgressRange& theRange = Message_ProgressRange()) override;
0045 
0046 private:
0047   TopoDS_Shape                                             myInitialShape;
0048   TopoDS_Wire                                              myStartWire;
0049   TopoDS_Wire                                              myEndWire;
0050   bool                                                     myClosedSection;
0051   bool                                                     myClosedRing;
0052   NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>   myStartWireEdges;
0053   NCollection_Map<TopoDS_Shape, TopTools_ShapeMapHasher>   myEndWireEdges;
0054   NCollection_Sequence<NCollection_Sequence<TopoDS_Shape>> myPaths;
0055 };
0056 
0057 #endif // _BRepOffsetAPI_MiddlePath_HeaderFile