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 <TopTools_IndexedMapOfShape.hxx>
21 #include <TopTools_DataMapOfShapeShape.hxx>
22 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
25 class BRepOffset_Analyse;
26 class BRepOffset_Offset;
30 //! Computes the intersections between edges on a face
31 //! stores result is SD as AsDes from BRepOffset.
32 class BRepOffset_Inter2d
39 //! Computes the intersections between the edges stored
40 //! is AsDes as descendants of <F> . Intersections is computed
41 //! between two edges if one of them is bound in NewEdges.
42 //! When all faces of the shape are treated the intersection
43 //! vertices have to be fused using the FuseVertices method.
44 //! theDMVV contains the vertices that should be fused
45 Standard_EXPORT static void Compute (const Handle(BRepAlgo_AsDes)& AsDes,
47 const TopTools_IndexedMapOfShape& NewEdges,
48 const Standard_Real Tol,
49 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
51 //! Computes the intersection between the offset edges of the <FI>.
52 //! All intersection vertices will be stored in AsDes2d.
53 //! When all faces of the shape are treated the intersection vertices
54 //! have to be fused using the FuseVertices method.
55 //! theDMVV contains the vertices that should be fused.
56 Standard_EXPORT static Standard_Boolean ConnexIntByInt (const TopoDS_Face& FI,
57 BRepOffset_Offset& OFI,
58 TopTools_DataMapOfShapeShape& MES,
59 const TopTools_DataMapOfShapeShape& Build,
60 const Handle(BRepAlgo_AsDes)& AsDes2d,
61 const Standard_Real Offset,
62 const Standard_Real Tol,
63 const BRepOffset_Analyse& Analyse,
64 TopTools_IndexedMapOfShape& FacesWithVerts,
65 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
67 //! Computes the intersection between the offset edges generated
68 //! from vertices and stored into AsDes as descendants of the <FI>.
69 //! All intersection vertices will be stored in AsDes2d.
70 //! When all faces of the shape are treated the intersection vertices
71 //! have to be fused using the FuseVertices method.
72 //! theDMVV contains the vertices that should be fused.
73 Standard_EXPORT static void ConnexIntByIntInVert (const TopoDS_Face& FI,
74 BRepOffset_Offset& OFI,
75 TopTools_DataMapOfShapeShape& MES,
76 const TopTools_DataMapOfShapeShape& Build,
77 const Handle(BRepAlgo_AsDes)& AsDes,
78 const Handle(BRepAlgo_AsDes)& AsDes2d,
79 const Standard_Real Tol,
80 const BRepOffset_Analyse& Analyse,
81 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
83 //! Fuses the chains of vertices in the theDMVV
84 //! and updates AsDes by replacing the old vertices
85 //! with the new ones.
86 Standard_EXPORT static Standard_Boolean FuseVertices (const TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
87 const Handle(BRepAlgo_AsDes)& theAsDes);
89 Standard_EXPORT static Standard_Boolean ExtentEdge (const TopoDS_Edge& E,
91 const Standard_Real theOffset);
95 #endif // _BRepOffset_Inter2d_HeaderFile