0026897: BRepBuilderAPI_Copy does not copy polygons
[occt.git] / src / BRepTools / BRepTools_Modification.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-08-25
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1994-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 _BRepTools_Modification_HeaderFile
18#define _BRepTools_Modification_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <MMgt_TShared.hxx>
24#include <Standard_Boolean.hxx>
25#include <Standard_Real.hxx>
26#include <GeomAbs_Shape.hxx>
27class TopoDS_Face;
28class Geom_Surface;
29class TopLoc_Location;
30class TopoDS_Edge;
31class Geom_Curve;
32class TopoDS_Vertex;
33class gp_Pnt;
34class Geom2d_Curve;
55e738d2 35class Poly_Triangulation;
42cf5bc1 36
8156dddd 37class Poly_Polygon3D;
38class Poly_PolygonOnTriangulation;
39
42cf5bc1 40
41class BRepTools_Modification;
42DEFINE_STANDARD_HANDLE(BRepTools_Modification, MMgt_TShared)
43
44//! Defines geometric modifications to a shape, i.e.
45//! changes to faces, edges and vertices.
46class BRepTools_Modification : public MMgt_TShared
47{
48
49public:
50
51
52 //! Returns true if the face, F, has been modified.
53 //! If the face has been modified:
54 //! - S is the new geometry of the face,
55 //! - L is its new location, and
56 //! - Tol is the new tolerance.
57 //! The flag, RevWires, is set to true when the
58 //! modification reverses the normal of the surface, (i.e.
59 //! the wires have to be reversed).
60 //! The flag, RevFace, is set to true if the orientation of
61 //! the modified face changes in the shells which contain it.
62 //! If the face has not been modified this function returns
63 //! false, and the values of S, L, Tol, RevWires and
64 //! RevFace are not significant.
65 Standard_EXPORT virtual Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L, Standard_Real& Tol, Standard_Boolean& RevWires, Standard_Boolean& RevFace) = 0;
55e738d2 66
67 //! Returns true if the face has been modified according to changed triangulation.
68 //! If the face has been modified:
69 //! - T is a new triangulation on the face
70 Standard_EXPORT virtual Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T);
71
42cf5bc1 72 //! Returns true if the edge, E, has been modified.
73 //! If the edge has been modified:
74 //! - C is the new geometry associated with the edge,
75 //! - L is its new location, and
76 //! - Tol is the new tolerance.
77 //! If the edge has not been modified, this function
78 //! returns false, and the values of C, L and Tol are not significant.
79 Standard_EXPORT virtual Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) = 0;
8156dddd 80
81 //! Returns true if the edge has been modified according to changed polygon.
82 //! If the edge has been modified:
83 //! - P is a new polygon
84 Standard_EXPORT virtual Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P);
85
86 //! Returns true if the edge has been modified according to changed polygon on triangulation.
87 //! If the edge has been modified:
88 //! - P is a new polygon on triangulation
89 Standard_EXPORT virtual Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F, Handle(Poly_PolygonOnTriangulation)& P);
42cf5bc1 90
91 //! Returns true if the vertex V has been modified.
92 //! If V has been modified:
93 //! - P is the new geometry of the vertex, and
94 //! - Tol is the new tolerance.
95 //! If the vertex has not been modified this function
96 //! returns false, and the values of P and Tol are not significant.
97 Standard_EXPORT virtual Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) = 0;
98
99 //! Returns true if the edge, E, has a new curve on
100 //! surface on the face, F.
101 //! If a new curve exists:
102 //! - C is the new geometry of the edge,
103 //! - L is the new location, and
104 //! - Tol is the new tolerance.
105 //! NewE is the new edge created from E, and NewF is
106 //! the new face created from F.
107 //! If there is no new curve on the face, this function
108 //! returns false, and the values of C, L and Tol are not significant.
109 Standard_EXPORT virtual Standard_Boolean NewCurve2d (const TopoDS_Edge& E, const TopoDS_Face& F, const TopoDS_Edge& NewE, const TopoDS_Face& NewF, Handle(Geom2d_Curve)& C, Standard_Real& Tol) = 0;
110
111 //! Returns true if the vertex V has a new parameter on the edge E.
112 //! If a new parameter exists:
113 //! - P is the parameter, and
114 //! - Tol is the new tolerance.
115 //! If there is no new parameter this function returns
116 //! false, and the values of P and Tol are not significant.
117 Standard_EXPORT virtual Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) = 0;
118
119 //! Returns the continuity of <NewE> between <NewF1>
120 //! and <NewF2>.
121 //! <NewE> is the new edge created from <E>. <NewF1>
122 //! (resp. <NewF2>) is the new face created from <F1>
123 //! (resp. <F2>).
124 Standard_EXPORT virtual GeomAbs_Shape Continuity (const TopoDS_Edge& E, const TopoDS_Face& F1, const TopoDS_Face& F2, const TopoDS_Edge& NewE, const TopoDS_Face& NewF1, const TopoDS_Face& NewF2) = 0;
125
126
127
128
129 DEFINE_STANDARD_RTTI(BRepTools_Modification,MMgt_TShared)
130
131protected:
132
133
134
135
136private:
137
138
139
140
141};
142
143
144
145
146
147
148
149#endif // _BRepTools_Modification_HeaderFile