Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1998-07-02
0002 // Created by: Joelle CHAUVET
0003 // Copyright (c) 1998-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_CompatibleWires_HeaderFile
0018 #define _BRepFill_CompatibleWires_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <BRepFill_ThruSectionErrorStatus.hxx>
0024 #include <TopTools_SequenceOfShape.hxx>
0025 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0026 #include <TopTools_ListOfShape.hxx>
0027 class TopoDS_Edge;
0028 
0029 
0030 //! Constructs a sequence of Wires (with good orientation
0031 //! and origin) agreed each other so that the surface passing
0032 //! through these sections is not twisted
0033 class BRepFill_CompatibleWires 
0034 {
0035 public:
0036 
0037   DEFINE_STANDARD_ALLOC
0038 
0039   
0040   Standard_EXPORT BRepFill_CompatibleWires();
0041   
0042   Standard_EXPORT BRepFill_CompatibleWires(const TopTools_SequenceOfShape& Sections);
0043   
0044   Standard_EXPORT void Init (const TopTools_SequenceOfShape& Sections);
0045   
0046   Standard_EXPORT void SetPercent (const Standard_Real percent = 0.01);
0047   
0048   //! Performs  CompatibleWires According  to  the orientation
0049   //! and the origin of  each other
0050   Standard_EXPORT void Perform (const Standard_Boolean WithRotation = Standard_True);
0051   
0052   Standard_EXPORT Standard_Boolean IsDone() const;
0053 
0054   BRepFill_ThruSectionErrorStatus GetStatus() const
0055   {
0056     return myStatus;
0057   }
0058   
0059   //! returns the generated sequence.
0060   Standard_EXPORT const TopTools_SequenceOfShape& Shape() const;
0061   
0062   //! Returns   the  shapes  created  from   a  subshape
0063   //! <SubSection> of a section.
0064   Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Edge& SubSection) const;
0065   
0066   Standard_EXPORT const TopTools_DataMapOfShapeListOfShape& Generated() const;
0067 
0068   Standard_EXPORT Standard_Boolean IsDegeneratedFirstSection() const;
0069 
0070   Standard_EXPORT Standard_Boolean IsDegeneratedLastSection() const;
0071 
0072 
0073 
0074 protected:
0075 
0076 
0077 
0078 
0079 
0080 private:
0081 
0082   
0083   //! Insert cutting  points  on  closed wires to  have same
0084   //! number of edges. The sequence of shapes must
0085   //! be a sequence of wires.
0086   Standard_EXPORT void SameNumberByPolarMethod (const Standard_Boolean WithRotation = Standard_True);
0087   
0088   //! Insert cutting  points  on  open wires to  have same
0089   //! number of edges. The sequence of shapes must
0090   //! be a sequence of wires.
0091   Standard_EXPORT void SameNumberByACR (const Standard_Boolean report);
0092   
0093   //! Computes  origins and orientation  on closed wires to
0094   //! avoid twisted results. The sequence of shapes must
0095   //! be a sequence of wires. <polar> must be true
0096   //! if SameNumberByPolarMethod was used before.
0097   Standard_EXPORT void ComputeOrigin (const Standard_Boolean polar);
0098   
0099   //! Computes  origins and orientation  on open wires to
0100   //! avoid twisted results. The sequence of shapes must
0101   //! be a sequence of wires.
0102   Standard_EXPORT void SearchOrigin();
0103 
0104 
0105   TopTools_SequenceOfShape myInit;
0106   TopTools_SequenceOfShape myWork;
0107   Standard_Real myPercent;
0108   Standard_Boolean myDegen1;
0109   Standard_Boolean myDegen2;
0110   BRepFill_ThruSectionErrorStatus myStatus;
0111   TopTools_DataMapOfShapeListOfShape myMap;
0112 
0113 
0114 };
0115 
0116 
0117 
0118 
0119 
0120 
0121 
0122 #endif // _BRepFill_CompatibleWires_HeaderFile