1 // Created on: 1999-05-08
2 // Created by: Andrey BETENEV
3 // Copyright (c) 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 _ShapeCustom_ConvertToRevolution_HeaderFile
18 #define _ShapeCustom_ConvertToRevolution_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <ShapeCustom_Modification.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_Real.hxx>
26 #include <GeomAbs_Shape.hxx>
29 class TopLoc_Location;
37 class ShapeCustom_ConvertToRevolution;
38 DEFINE_STANDARD_HANDLE(ShapeCustom_ConvertToRevolution, ShapeCustom_Modification)
40 //! implements a modification for the BRepTools
41 //! Modifier algortihm. Converts all elementary
42 //! surfaces into surfaces of revolution.
43 class ShapeCustom_ConvertToRevolution : public ShapeCustom_Modification
49 Standard_EXPORT ShapeCustom_ConvertToRevolution();
51 //! Returns Standard_True if the face <F> has been
52 //! modified. In this case, <S> is the new geometric
53 //! support of the face, <L> the new location, <Tol>
54 //! the new tolerance. Otherwise, returns
55 //! Standard_False, and <S>, <L>, <Tol> are not
57 Standard_EXPORT Standard_Boolean NewSurface (const TopoDS_Face& F, Handle(Geom_Surface)& S, TopLoc_Location& L, Standard_Real& Tol, Standard_Boolean& RevWires, Standard_Boolean& RevFace) Standard_OVERRIDE;
59 //! Returns Standard_True if the edge <E> has been
60 //! modified. In this case, <C> is the new geometric
61 //! support of the edge, <L> the new location, <Tol>
62 //! the new tolerance. Otherwise, returns
63 //! Standard_False, and <C>, <L>, <Tol> are not
65 Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE;
67 //! Returns Standard_True if the vertex <V> has been
68 //! modified. In this case, <P> is the new geometric
69 //! support of the vertex, <Tol> the new tolerance.
70 //! Otherwise, returns Standard_False, and <P>, <Tol>
71 //! are not significant.
72 Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) Standard_OVERRIDE;
74 //! Returns Standard_True if the edge <E> has a new
75 //! curve on surface on the face <F>.In this case, <C>
76 //! is the new geometric support of the edge, <L> the
77 //! new location, <Tol> the new tolerance.
79 //! Otherwise, returns Standard_False, and <C>, <L>,
80 //! <Tol> are not significant.
82 //! <NewE> is the new edge created from <E>. <NewF>
83 //! is the new face created from <F>. They may be usefull.
84 Standard_EXPORT 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) Standard_OVERRIDE;
86 //! Returns Standard_True if the Vertex <V> has a new
87 //! parameter on the edge <E>. In this case, <P> is
88 //! the parameter, <Tol> the new tolerance.
89 //! Otherwise, returns Standard_False, and <P>, <Tol>
90 //! are not significant.
91 Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE;
93 //! Returns the continuity of <NewE> between <NewF1>
96 //! <NewE> is the new edge created from <E>. <NewF1>
97 //! (resp. <NewF2>) is the new face created from <F1>
99 Standard_EXPORT 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) Standard_OVERRIDE;
104 DEFINE_STANDARD_RTTIEXT(ShapeCustom_ConvertToRevolution,ShapeCustom_Modification)
124 #endif // _ShapeCustom_ConvertToRevolution_HeaderFile