Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1993-06-17
0002 // Created by: Jean Yves LEBEY
0003 // Copyright (c) 1993-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 _TopOpeBRepTool_HeaderFile
0018 #define _TopOpeBRepTool_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <TopTools_DataMapOfShapeInteger.hxx>
0026 #include <TopTools_IndexedMapOfOrientedShape.hxx>
0027 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0028 #include <Standard_OStream.hxx>
0029 #include <TopOpeBRepTool_OutCurveType.hxx>
0030 class TopoDS_Face;
0031 class TopoDS_Solid;
0032 
0033 
0034 //! This package provides services used by the TopOpeBRep
0035 //! package performing topological operations on the BRep
0036 //! data structure.
0037 class TopOpeBRepTool 
0038 {
0039 public:
0040 
0041   DEFINE_STANDARD_ALLOC
0042 
0043   
0044   //! Fuse  edges (in a   wire) of a  shape   where we have
0045   //! useless vertex.
0046   //! In case face <FF> is built on UV-non-connexed  wires
0047   //! (with the two closing edges  FORWARD and REVERSED, in
0048   //! spite of one only), we find out the faulty edge, add
0049   //! the faulty shapes (edge,wire,face) to <MshNOK>.
0050   //! <FF> is a face descendant of <F>.
0051   //! <MWisOld>(wire) = 1 if wire is wire of <F>
0052   //! 0    wire results from <F>'s wire split.
0053   //! returns false if purge fails
0054   Standard_EXPORT static Standard_Boolean PurgeClosingEdges (const TopoDS_Face& F, const TopoDS_Face& FF, const TopTools_DataMapOfShapeInteger& MWisOld, TopTools_IndexedMapOfOrientedShape& MshNOK);
0055   
0056   Standard_EXPORT static Standard_Boolean PurgeClosingEdges (const TopoDS_Face& F, const TopTools_ListOfShape& LOF, const TopTools_DataMapOfShapeInteger& MWisOld, TopTools_IndexedMapOfOrientedShape& MshNOK);
0057   
0058   Standard_EXPORT static Standard_Boolean CorrectONUVISO (const TopoDS_Face& F, TopoDS_Face& Fsp);
0059   
0060   //! Builds up the correct list of faces <LOFF> from <LOF>, using
0061   //! faulty shapes from map <MshNOK>.
0062   //! <LOF> is the list of <F>'s descendant faces.
0063   //! returns false if building fails
0064   Standard_EXPORT static Standard_Boolean MakeFaces (const TopoDS_Face& F, const TopTools_ListOfShape& LOF, const TopTools_IndexedMapOfOrientedShape& MshNOK, TopTools_ListOfShape& LOFF);
0065   
0066   //! Returns <False>  if  the  face is  valid (the UV
0067   //! representation  of  the  face is   a set   of  pcurves
0068   //! connexed by points with   connexity 2).
0069   //! Else,  splits <aFace> in order to return a list of valid
0070   //! faces.
0071   Standard_EXPORT static Standard_Boolean Regularize (const TopoDS_Face& aFace, TopTools_ListOfShape& aListOfFaces, TopTools_DataMapOfShapeListOfShape& ESplits);
0072   
0073   //! Returns <False>  if  the  face is  valid (the UV
0074   //! representation  of  the  face is   a set   of  pcurves
0075   //! connexed by points with   connexity 2).
0076   //! Else,  splits wires of the face, these are boundaries of the
0077   //! new faces to build up; <OldWiresNewWires> describes (wire,
0078   //! splits of wire); <ESplits> describes (edge, edge's splits)
0079   Standard_EXPORT static Standard_Boolean RegularizeWires (const TopoDS_Face& aFace, TopTools_DataMapOfShapeListOfShape& OldWiresNewWires, TopTools_DataMapOfShapeListOfShape& ESplits);
0080   
0081   //! Classify wire's splits of map <OldWiresnewWires> in order to
0082   //! compute <aListOfFaces>, the splits of <aFace>.
0083   Standard_EXPORT static Standard_Boolean RegularizeFace (const TopoDS_Face& aFace, const TopTools_DataMapOfShapeListOfShape& OldWiresnewWires, TopTools_ListOfShape& aListOfFaces);
0084   
0085   //! Returns <False> if the shell is valid (the solid is a set
0086   //! of faces connexed by edges with connexity 2).
0087   //! Else, splits faces of the shell; <OldFacesnewFaces> describes
0088   //! (face, splits of face).
0089   Standard_EXPORT static Standard_Boolean RegularizeShells (const TopoDS_Solid& aSolid, TopTools_DataMapOfShapeListOfShape& OldSheNewShe, TopTools_DataMapOfShapeListOfShape& FSplits);
0090   
0091   //! Prints <OCT> as string on stream <S>; returns <S>.
0092   Standard_EXPORT static Standard_OStream& Print (const TopOpeBRepTool_OutCurveType OCT, Standard_OStream& S);
0093 
0094 };
0095 
0096 #endif // _TopOpeBRepTool_HeaderFile