Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:25

0001 // Created on: 1995-12-21
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1995-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 _TopOpeBRepBuild_FaceBuilder_HeaderFile
0018 #define _TopOpeBRepBuild_FaceBuilder_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopoDS_Face.hxx>
0024 #include <TopOpeBRepBuild_LoopSet.hxx>
0025 #include <TopOpeBRepBuild_BlockIterator.hxx>
0026 #include <TopOpeBRepBuild_BlockBuilder.hxx>
0027 #include <TopOpeBRepBuild_FaceAreaBuilder.hxx>
0028 #include <TopTools_DataMapOfShapeInteger.hxx>
0029 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
0030 #include <TopTools_IndexedMapOfShape.hxx>
0031 #include <Standard_Integer.hxx>
0032 class TopOpeBRepBuild_WireEdgeSet;
0033 class TopoDS_Shape;
0034 class TopOpeBRepBuild_ShapeSet;
0035 
0036 
0037 
0038 class TopOpeBRepBuild_FaceBuilder 
0039 {
0040 public:
0041 
0042   DEFINE_STANDARD_ALLOC
0043 
0044   
0045   Standard_EXPORT TopOpeBRepBuild_FaceBuilder();
0046   
0047   //! Create a FaceBuilder to build the faces on
0048   //! the shapes (wires, blocks of edge) described by <LS>.
0049   Standard_EXPORT TopOpeBRepBuild_FaceBuilder(TopOpeBRepBuild_WireEdgeSet& ES, const TopoDS_Shape& F, const Standard_Boolean ForceClass = Standard_False);
0050   
0051   Standard_EXPORT void InitFaceBuilder (TopOpeBRepBuild_WireEdgeSet& ES, const TopoDS_Shape& F, const Standard_Boolean ForceClass);
0052   
0053   //! Removes   are  non 3d-closed  wires.
0054   //! Fills  up maps <mapVVsameG> and  <mapVon1Edge>,  in order to
0055   //! correct 3d-closed but unclosed (topologic connexity) wires.
0056   //! modifies myBlockBuilder
0057   Standard_EXPORT void DetectUnclosedWire (TopTools_IndexedDataMapOfShapeShape& mapVVsameG, TopTools_IndexedDataMapOfShapeShape& mapVon1Edge);
0058   
0059   //! Using the given maps, change the topology of the 3d-closed
0060   //! wires, in order to get closed wires.
0061   Standard_EXPORT void CorrectGclosedWire (const TopTools_IndexedDataMapOfShapeShape& mapVVref, const TopTools_IndexedDataMapOfShapeShape& mapVon1Edge);
0062   
0063   //! Removes edges appearing twice (FORWARD,REVERSED) with a bounding
0064   //! vertex not connected to any other edge.
0065   //! mapE contains edges found.
0066   //! modifies myBlockBuilder.
0067   Standard_EXPORT void DetectPseudoInternalEdge (TopTools_IndexedMapOfShape& mapE);
0068   
0069   //! return myFace
0070   Standard_EXPORT const TopoDS_Shape& Face() const;
0071   
0072   Standard_EXPORT Standard_Integer InitFace();
0073   
0074   Standard_EXPORT Standard_Boolean MoreFace() const;
0075   
0076   Standard_EXPORT void NextFace();
0077   
0078   Standard_EXPORT Standard_Integer InitWire();
0079   
0080   Standard_EXPORT Standard_Boolean MoreWire() const;
0081   
0082   Standard_EXPORT void NextWire();
0083   
0084   Standard_EXPORT Standard_Boolean IsOldWire() const;
0085   
0086   //! Returns current wire
0087   //! This wire may be :
0088   //! * an old wire OldWire(), which has not been reconstructed;
0089   //! * a new wire made of edges described by ...NewEdge() methods.
0090   Standard_EXPORT const TopoDS_Shape& OldWire() const;
0091   
0092   //! Iterates on myBlockIterator until finding a valid element
0093   Standard_EXPORT void FindNextValidElement();
0094   
0095   Standard_EXPORT Standard_Integer InitEdge();
0096   
0097   Standard_EXPORT Standard_Boolean MoreEdge() const;
0098   
0099   Standard_EXPORT void NextEdge();
0100   
0101   //! Returns current new edge of current new wire.
0102   Standard_EXPORT const TopoDS_Shape& Edge() const;
0103   
0104   Standard_EXPORT Standard_Integer EdgeConnexity (const TopoDS_Shape& E) const;
0105   
0106   Standard_EXPORT Standard_Integer AddEdgeWire (const TopoDS_Shape& E, TopoDS_Shape& W) const;
0107 
0108 
0109 
0110 
0111 protected:
0112 
0113 
0114 
0115 
0116 
0117 private:
0118 
0119   
0120   Standard_EXPORT void MakeLoops (TopOpeBRepBuild_ShapeSet& SS);
0121 
0122 
0123   TopoDS_Face myFace;
0124   TopOpeBRepBuild_LoopSet myLoopSet;
0125   TopOpeBRepBuild_BlockIterator myBlockIterator;
0126   TopOpeBRepBuild_BlockBuilder myBlockBuilder;
0127   TopOpeBRepBuild_FaceAreaBuilder myFaceAreaBuilder;
0128   TopTools_DataMapOfShapeInteger myMOSI;
0129 
0130 
0131 };
0132 
0133 
0134 
0135 
0136 
0137 
0138 
0139 #endif // _TopOpeBRepBuild_FaceBuilder_HeaderFile