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
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 _BRepTools_Modification_HeaderFile
18 #define _BRepTools_Modification_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Transient.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <GeomAbs_Shape.hxx>
29 class TopLoc_Location;
35 class Poly_Triangulation;
38 class Poly_PolygonOnTriangulation;
41 class BRepTools_Modification;
42 DEFINE_STANDARD_HANDLE(BRepTools_Modification, Standard_Transient)
44 //! Defines geometric modifications to a shape, i.e.
45 //! changes to faces, edges and vertices.
46 class BRepTools_Modification : public Standard_Transient
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;
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);
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;
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);
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);
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;
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;
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;
119 //! Returns the continuity of <NewE> between <NewF1>
121 //! <NewE> is the new edge created from <E>. <NewF1>
122 //! (resp. <NewF2>) is the new face created from <F1>
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;
129 DEFINE_STANDARD_RTTIEXT(BRepTools_Modification,Standard_Transient)
149 #endif // _BRepTools_Modification_HeaderFile