Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1996-08-30
0002 // Created by: Yves FRICAUD
0003 // Copyright (c) 1996-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 _BRepOffset_Inter2d_HeaderFile
0018 #define _BRepOffset_Inter2d_HeaderFile
0019 
0020 #include <TopTools_IndexedMapOfShape.hxx>
0021 #include <TopTools_DataMapOfShapeShape.hxx>
0022 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0023 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
0024 #include <Message_ProgressRange.hxx>
0025 
0026 class BRepAlgo_AsDes;
0027 class BRepAlgo_Image;
0028 class BRepOffset_Analyse;
0029 class BRepOffset_Offset;
0030 class TopoDS_Edge;
0031 class TopoDS_Face;
0032 
0033 //! Computes the intersections between edges on a face
0034 //! stores result is SD as AsDes from BRepOffset.
0035 class BRepOffset_Inter2d 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   //! Computes the intersections between the edges stored
0043   //! is AsDes as descendants of <F> . Intersections is computed
0044   //! between two edges if one of them is bound in NewEdges.
0045   //! When all faces of the shape are treated the intersection
0046   //! vertices have to be fused using the FuseVertices method.
0047   //! theDMVV contains the vertices that should be fused
0048   Standard_EXPORT static void Compute (const Handle(BRepAlgo_AsDes)& AsDes, 
0049                                        const TopoDS_Face& F, 
0050                                        const TopTools_IndexedMapOfShape& NewEdges, 
0051                                        const Standard_Real Tol,
0052                                        const TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges,
0053                                        TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0054                                        const Message_ProgressRange& theRange);
0055 
0056   //! Computes the intersection between the offset edges of the <FI>.
0057   //! All intersection vertices will be stored in AsDes2d.
0058   //! When all faces of the shape are treated the intersection vertices
0059   //! have to be fused using the FuseVertices method.
0060   //! theDMVV contains the vertices that should be fused.
0061   Standard_EXPORT static Standard_Boolean ConnexIntByInt (const TopoDS_Face& FI,
0062                                                           BRepOffset_Offset& OFI,
0063                                                           TopTools_DataMapOfShapeShape& MES,
0064                                                           const TopTools_DataMapOfShapeShape& Build,
0065                                                           const Handle(BRepAlgo_AsDes)& theAsDes,
0066                                                           const Handle(BRepAlgo_AsDes)& AsDes2d,
0067                                                           const Standard_Real Offset,
0068                                                           const Standard_Real Tol,
0069                                                           const BRepOffset_Analyse& Analyse,
0070                                                           TopTools_IndexedMapOfShape& FacesWithVerts,
0071                                                           BRepAlgo_Image& theImageVV,
0072                                                           TopTools_DataMapOfShapeListOfShape& theEdgeIntEdges,
0073                                                           TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0074                                                           const Message_ProgressRange& theRange);
0075 
0076   //! Computes the intersection between the offset edges generated
0077   //! from vertices and stored into AsDes as descendants of the <FI>.
0078   //! All intersection vertices will be stored in AsDes2d.
0079   //! When all faces of the shape are treated the intersection vertices
0080   //! have to be fused using the FuseVertices method.
0081   //! theDMVV contains the vertices that should be fused.
0082   Standard_EXPORT static void ConnexIntByIntInVert (const TopoDS_Face& FI,
0083                                                     BRepOffset_Offset& OFI,
0084                                                     TopTools_DataMapOfShapeShape& MES,
0085                                                     const TopTools_DataMapOfShapeShape& Build,
0086                                                     const Handle(BRepAlgo_AsDes)& AsDes,
0087                                                     const Handle(BRepAlgo_AsDes)& AsDes2d,
0088                                                     const Standard_Real Tol,
0089                                                     const BRepOffset_Analyse& Analyse,
0090                                                     TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0091                                                     const Message_ProgressRange& theRange);
0092 
0093   //! Fuses the chains of vertices in the theDMVV
0094   //! and updates AsDes by replacing the old vertices
0095   //! with the new ones.
0096   Standard_EXPORT static Standard_Boolean FuseVertices (const TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0097                                                         const Handle(BRepAlgo_AsDes)& theAsDes,
0098                                                         BRepAlgo_Image&               theImageVV);
0099                                                         
0100   //! extents the edge
0101   Standard_EXPORT static Standard_Boolean ExtentEdge (const TopoDS_Edge& E,
0102                                                       TopoDS_Edge& NE,
0103                                                       const Standard_Real theOffset);
0104 
0105 };
0106 
0107 #endif // _BRepOffset_Inter2d_HeaderFile