0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / BRepOffset / BRepOffset_Offset.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-10-19
2// Created by: Bruno DUMORTIER
3// Copyright (c) 1995-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_Offset_HeaderFile
18#define _BRepOffset_Offset_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
42cf5bc1 24#include <BRepOffset_Status.hxx>
25#include <TopoDS_Face.hxx>
26#include <TopTools_DataMapOfShapeShape.hxx>
42cf5bc1 27#include <GeomAbs_JoinType.hxx>
28#include <GeomAbs_Shape.hxx>
29#include <TopTools_ListOfShape.hxx>
42cf5bc1 30class TopoDS_Edge;
31class TopoDS_Vertex;
42cf5bc1 32
9fd2d2c3 33// resolve name collisions with X11 headers
34#ifdef Status
35 #undef Status
36#endif
42cf5bc1 37
38//! This class compute elemenary offset surface.
39//! Evaluate the offset generated :
40//! 1 - from a face.
41//! 2 - from an edge.
42//! 3 - from a vertex.
43class BRepOffset_Offset
44{
45public:
46
47 DEFINE_STANDARD_ALLOC
48
49
50 Standard_EXPORT BRepOffset_Offset();
51
52 Standard_EXPORT BRepOffset_Offset(const TopoDS_Face& Face, const Standard_Real Offset, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
53
54 //! This method will be called when you want to share
55 //! the edges soon generated from an other face.
56 //! e.g. when two faces are tangents the common edge
57 //! will generate only one edge ( no pipe).
58 //!
59 //! The Map will be fill as follow:
60 //!
61 //! Created(E) = E'
62 //! with: E = an edge of <Face>
63 //! E' = the image of E in the offseting of
64 //! another face sharing E with a
65 //! continuity at least G1
66 Standard_EXPORT BRepOffset_Offset(const TopoDS_Face& Face, const Standard_Real Offset, const TopTools_DataMapOfShapeShape& Created, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
67
68 Standard_EXPORT BRepOffset_Offset(const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
69
70 Standard_EXPORT BRepOffset_Offset(const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
71
72 //! Tol and Conti are only used if Polynomial is True
73 //! (Used to perfrom the approximation)
74 Standard_EXPORT BRepOffset_Offset(const TopoDS_Vertex& Vertex, const TopTools_ListOfShape& LEdge, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
75
76 Standard_EXPORT void Init (const TopoDS_Face& Face, const Standard_Real Offset, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
77
78 Standard_EXPORT void Init (const TopoDS_Face& Face, const Standard_Real Offset, const TopTools_DataMapOfShapeShape& Created, const Standard_Boolean OffsetOutside = Standard_True, const GeomAbs_JoinType JoinType = GeomAbs_Arc);
79
80 Standard_EXPORT void Init (const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
81
82 Standard_EXPORT void Init (const TopoDS_Edge& Path, const TopoDS_Edge& Edge1, const TopoDS_Edge& Edge2, const Standard_Real Offset, const TopoDS_Edge& FirstEdge, const TopoDS_Edge& LastEdge, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
83
84 //! Tol and Conti are only used if Polynomial is True
85 //! (Used to perfrom the approximation)
86 Standard_EXPORT void Init (const TopoDS_Vertex& Vertex, const TopTools_ListOfShape& LEdge, const Standard_Real Offset, const Standard_Boolean Polynomial = Standard_False, const Standard_Real Tol = 1.0e-4, const GeomAbs_Shape Conti = GeomAbs_C1);
87
88 //! Only used in Rolling Ball. Pipe on Free Boundary
89 Standard_EXPORT void Init (const TopoDS_Edge& Edge, const Standard_Real Offset);
90
91 const TopoDS_Shape& InitialShape() const;
92
93 Standard_EXPORT const TopoDS_Face& Face() const;
94
95 Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& Shape) const;
96
97 Standard_EXPORT BRepOffset_Status Status() const;
98
99
100
101
102protected:
103
104
105
106
107
108private:
109
110
111
112 TopoDS_Shape myShape;
113 BRepOffset_Status myStatus;
114 TopoDS_Face myFace;
115 TopTools_DataMapOfShapeShape myMap;
116
117
118};
119
120
121#include <BRepOffset_Offset.lxx>
122
123
124
125
126
127#endif // _BRepOffset_Offset_HeaderFile