0026555: Modeling Algorithms - Exception-safe status reporting in BRepOffset_MakeOffset
[occt.git] / src / BRepOffset / BRepOffset_Inter2d.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepOffset_Inter2d_HeaderFile
18#define _BRepOffset_Inter2d_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TopTools_IndexedMapOfShape.hxx>
25#include <Standard_Real.hxx>
26#include <TopTools_DataMapOfShapeShape.hxx>
b0fbc579 27#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
42cf5bc1 28class BRepAlgo_AsDes;
29class TopoDS_Face;
420b38fd 30class BRepOffset_Analyse;
42cf5bc1 31class BRepOffset_Offset;
32
33
34//! Computes the intersections betwwen edges on a face
35//! stores result is SD as AsDes from BRepOffset.
36class BRepOffset_Inter2d
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
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.
b0fbc579 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
9b7f3f83 49 Standard_EXPORT static void Compute (const Handle(BRepAlgo_AsDes)& AsDes,
50 const TopoDS_Face& F,
51 const TopTools_IndexedMapOfShape& NewEdges,
b0fbc579 52 const Standard_Real Tol,
53 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
54
ecf4f17c 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.
b0fbc579 59 //! theDMVV contains the vertices that should be fused.
3e85dfc5 60 Standard_EXPORT static Standard_Boolean ConnexIntByInt (const TopoDS_Face& FI,
ecf4f17c 61 BRepOffset_Offset& OFI,
62 TopTools_DataMapOfShapeShape& MES,
63 const TopTools_DataMapOfShapeShape& Build,
64 const Handle(BRepAlgo_AsDes)& AsDes2d,
65 const Standard_Real Offset,
b0fbc579 66 const Standard_Real Tol,
420b38fd 67 const BRepOffset_Analyse& Analyse,
ecf4f17c 68 TopTools_IndexedMapOfShape& FacesWithVerts,
b0fbc579 69 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
42cf5bc1 70
ecf4f17c 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,
420b38fd 84 const BRepOffset_Analyse& Analyse,
ecf4f17c 85 TopTools_IndexedDataMapOfShapeListOfShape& theDMVV);
86
b0fbc579 87 //! Fuses the chains of vertices in the theDMVV
88 //! and updates AsDes by replacing the old vertices
89 //! with the new ones.
3e85dfc5 90 Standard_EXPORT static Standard_Boolean FuseVertices (const TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
91 const Handle(BRepAlgo_AsDes)& theAsDes);
ecf4f17c 92 //! extents the edge
3e85dfc5 93 Standard_EXPORT static Standard_Boolean ExtentEdge (const TopoDS_Edge& E,
94 TopoDS_Edge& NE,
95 const Standard_Real theOffset);
42cf5bc1 96
97protected:
98
42cf5bc1 99private:
100
42cf5bc1 101};
102
42cf5bc1 103#endif // _BRepOffset_Inter2d_HeaderFile