Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-26 08:29:49

0001 // Created on: 1998-11-25
0002 // Created by: Xuan PHAM PHU
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 _TopOpeBRepTool_CORRISO_HeaderFile
0018 #define _TopOpeBRepTool_CORRISO_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopoDS_Face.hxx>
0024 #include <GeomAdaptor_Surface.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <TopTools_ListOfShape.hxx>
0027 #include <TopOpeBRepTool_DataMapOfOrientedShapeC2DF.hxx>
0028 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0029 #include <TopTools_DataMapOfOrientedShapeInteger.hxx>
0030 class TopoDS_Edge;
0031 class TopOpeBRepTool_C2DF;
0032 class TopoDS_Vertex;
0033 
0034 //! Fref is built on x-periodic surface (x=u,v).
0035 //! S built on Fref's geometry, should be UVClosed.
0036 //!
0037 //! Give us E, an edge of S. 2drep(E) is not UV connexed.
0038 //! We translate 2drep(E) in xdir*xperiod if necessary.
0039 //!
0040 //! call : TopOpeBRepTool_CORRISO Tool(Fref);
0041 //! Tool.Init(S);
0042 //! if (!Tool.UVClosed()) {
0043 //! // initialize EdsToCheck,nfybounds,stopatfirst
0044 //!
0045 //! Tool.EdgeWithFaultyUV(EdsToCheck,nfybounds,FyEds,stopatfirst);
0046 //! if (Tool.SetUVClosed()) S = Tool.GetnewS();
0047 //! }
0048 class TopOpeBRepTool_CORRISO
0049 {
0050 public:
0051   DEFINE_STANDARD_ALLOC
0052 
0053   Standard_EXPORT TopOpeBRepTool_CORRISO();
0054 
0055   Standard_EXPORT TopOpeBRepTool_CORRISO(const TopoDS_Face& FRef);
0056 
0057   Standard_EXPORT const TopoDS_Face& Fref() const;
0058 
0059   Standard_EXPORT const GeomAdaptor_Surface& GASref() const;
0060 
0061   Standard_EXPORT Standard_Boolean Refclosed(const Standard_Integer x,
0062                                              Standard_Real&         xperiod) const;
0063 
0064   Standard_EXPORT Standard_Boolean Init(const TopoDS_Shape& S);
0065 
0066   Standard_EXPORT const TopoDS_Shape& S() const;
0067 
0068   Standard_EXPORT const TopTools_ListOfShape& Eds() const;
0069 
0070   Standard_EXPORT Standard_Boolean UVClosed() const;
0071 
0072   Standard_EXPORT Standard_Real Tol(const Standard_Integer I, const Standard_Real tol3d) const;
0073 
0074   Standard_EXPORT Standard_Boolean PurgeFyClosingE(const TopTools_ListOfShape& ClEds,
0075                                                    TopTools_ListOfShape&       fyClEds) const;
0076 
0077   Standard_EXPORT Standard_Integer EdgeOUTofBoundsUV(const TopoDS_Edge&     E,
0078                                                      const Standard_Boolean onU,
0079                                                      const Standard_Real    tolx,
0080                                                      Standard_Real&         parspE) const;
0081 
0082   Standard_EXPORT Standard_Boolean
0083     EdgesOUTofBoundsUV(const TopTools_ListOfShape&             EdsToCheck,
0084                        const Standard_Boolean                  onU,
0085                        const Standard_Real                     tolx,
0086                        TopTools_DataMapOfOrientedShapeInteger& FyEds) const;
0087 
0088   Standard_EXPORT Standard_Boolean EdgeWithFaultyUV(const TopoDS_Edge& E,
0089                                                     Standard_Integer&  Ivfaulty) const;
0090 
0091   Standard_EXPORT Standard_Boolean
0092     EdgesWithFaultyUV(const TopTools_ListOfShape&             EdsToCheck,
0093                       const Standard_Integer                  nfybounds,
0094                       TopTools_DataMapOfOrientedShapeInteger& FyEds,
0095                       const Standard_Boolean                  stopatfirst = Standard_False) const;
0096 
0097   Standard_EXPORT Standard_Boolean EdgeWithFaultyUV(const TopTools_ListOfShape& EdsToCheck,
0098                                                     const Standard_Integer      nfybounds,
0099                                                     TopoDS_Shape&               fyE,
0100                                                     Standard_Integer&           Ifaulty) const;
0101 
0102   Standard_EXPORT Standard_Boolean TrslUV(const Standard_Boolean                        onU,
0103                                           const TopTools_DataMapOfOrientedShapeInteger& FyEds);
0104 
0105   Standard_EXPORT Standard_Boolean GetnewS(TopoDS_Face& newS) const;
0106 
0107   Standard_EXPORT Standard_Boolean UVRep(const TopoDS_Edge& E, TopOpeBRepTool_C2DF& C2DF) const;
0108 
0109   Standard_EXPORT Standard_Boolean SetUVRep(const TopoDS_Edge& E, const TopOpeBRepTool_C2DF& C2DF);
0110 
0111   Standard_EXPORT Standard_Boolean Connexity(const TopoDS_Vertex&  V,
0112                                              TopTools_ListOfShape& Eds) const;
0113 
0114   Standard_EXPORT Standard_Boolean SetConnexity(const TopoDS_Vertex&        V,
0115                                                 const TopTools_ListOfShape& Eds);
0116 
0117   Standard_EXPORT Standard_Boolean AddNewConnexity(const TopoDS_Vertex& V, const TopoDS_Edge& E);
0118 
0119   Standard_EXPORT Standard_Boolean RemoveOldConnexity(const TopoDS_Vertex& V, const TopoDS_Edge& E);
0120 
0121 protected:
0122 private:
0123   TopoDS_Face                               myFref;
0124   GeomAdaptor_Surface                       myGAS;
0125   Standard_Boolean                          myUclosed;
0126   Standard_Boolean                          myVclosed;
0127   Standard_Real                             myUper;
0128   Standard_Real                             myVper;
0129   TopoDS_Shape                              myS;
0130   TopTools_ListOfShape                      myEds;
0131   TopOpeBRepTool_DataMapOfOrientedShapeC2DF myERep2d;
0132   TopTools_DataMapOfShapeListOfShape        myVEds;
0133 };
0134 
0135 #endif // _TopOpeBRepTool_CORRISO_HeaderFile