1 // Created on: 1996-08-30
2 // Created by: Yves FRICAUD
3 // Copyright (c) 1996-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepOffset_Inter2d_HeaderFile
18 #define _BRepOffset_Inter2d_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopTools_IndexedMapOfShape.hxx>
25 #include <Standard_Real.hxx>
26 #include <TopTools_DataMapOfShapeShape.hxx>
27 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
30 class BRepOffset_Offset;
33 //! Computes the intersections betwwen edges on a face
34 //! stores result is SD as AsDes from BRepOffset.
35 class BRepOffset_Inter2d
42 //! Computes the intersections between the edges stored
43 //! is AsDes as descendants of <F> . Intersections is computed
44 //! between two edges if one of them is bound in NewEdges.
45 //! When all faces of the shape are treated the intersection
46 //! vertices have to be fused using the FuseVertices method.
47 //! theDMVV contains the vertices that should be fused
48 Standard_EXPORT static void Compute (const Handle(BRepAlgo_AsDes)& AsDes,
50 const TopTools_IndexedMapOfShape& NewEdges,
51 const Standard_Real Tol,
52 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
54 //! Computes the intersection between the offset edges
55 //! stored in AsDes as descendatnds on <F>. All intersection
56 //! vertices will be stored in AsDes2d. When all faces of the
57 //! shape are treated the intersection vertices have to be fused
58 //! using the FuseVertices method.
59 //! theDMVV contains the vertices that should be fused.
60 Standard_EXPORT static void ConnexIntByInt (const TopoDS_Face& FI,
61 BRepOffset_Offset& OFI,
62 TopTools_DataMapOfShapeShape& MES,
63 const TopTools_DataMapOfShapeShape& Build,
64 const Handle(BRepAlgo_AsDes)& AsDes,
65 const Handle(BRepAlgo_AsDes)& AsDes2d,
66 const Standard_Real Offset,
67 const Standard_Real Tol,
68 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
70 //! Fuses the chains of vertices in the theDMVV
71 //! and updates AsDes by replacing the old vertices
72 //! with the new ones.
73 Standard_EXPORT static void FuseVertices(const TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
74 const Handle(BRepAlgo_AsDes)& theAsDes);
82 #endif // _BRepOffset_Inter2d_HeaderFile