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