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_TrsfModification_HeaderFile
18 #define _BRepTools_TrsfModification_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <gp_Trsf.hxx>
24 #include <BRepTools_Modification.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_Real.hxx>
27 #include <GeomAbs_Shape.hxx>
31 class TopLoc_Location;
39 class BRepTools_TrsfModification;
40 DEFINE_STANDARD_HANDLE(BRepTools_TrsfModification, BRepTools_Modification)
42 //! Describes a modification that uses a gp_Trsf to
43 //! change the geometry of a shape. All functions return
44 //! true and transform the geometry of the shape.
45 class BRepTools_TrsfModification : public BRepTools_Modification
51 Standard_EXPORT BRepTools_TrsfModification(const gp_Trsf& T);
53 //! Provides access to the gp_Trsf associated with this
54 //! modification. The transformation can be changed.
55 Standard_EXPORT gp_Trsf& Trsf();
57 //! Returns true if the face F has been modified.
58 //! If the face has been modified:
59 //! - S is the new geometry of the face,
60 //! - L is its new location, and
61 //! - Tol is the new tolerance.
62 //! RevWires is set to true when the modification
63 //! reverses the normal of the surface (the wires have to be reversed).
64 //! RevFace is set to true if the orientation of the
65 //! modified face changes in the shells which contain it.
66 //! For this class, RevFace returns true if the gp_Trsf
67 //! associated with this modification is negative.
68 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;
70 //! Returns true if the edge E has been modified.
71 //! If the edge has been modified:
72 //! - C is the new geometric support of the edge,
73 //! - L is the new location, and
74 //! - Tol is the new tolerance.
75 //! If the edge has not been modified, this function
76 //! returns false, and the values of C, L and Tol are not significant.
77 Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE;
79 //! Returns true if the vertex V has been modified.
80 //! If the vertex has been modified:
81 //! - P is the new geometry of the vertex, and
82 //! - Tol is the new tolerance.
83 //! If the vertex has not been modified this function
84 //! returns false, and the values of P and Tol are not significant.
85 Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) Standard_OVERRIDE;
87 //! Returns true if the edge E has a new curve on surface on the face F.
88 //! If a new curve exists:
89 //! - C is the new geometric support of the edge,
90 //! - L is the new location, and
91 //! - Tol the new tolerance.
92 //! If no new curve exists, this function returns false, and
93 //! the values of C, L and Tol are not significant.
94 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;
96 //! Returns true if the Vertex V has a new parameter on the edge E.
97 //! If a new parameter exists:
98 //! - P is the parameter, and
99 //! - Tol is the new tolerance.
100 //! If no new parameter exists, this function returns false,
101 //! and the values of P and Tol are not significant.
102 Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE;
104 //! Returns the continuity of <NewE> between <NewF1>
107 //! <NewE> is the new edge created from <E>. <NewF1>
108 //! (resp. <NewF2>) is the new face created from <F1>
110 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;
115 DEFINE_STANDARD_RTTI(BRepTools_TrsfModification,BRepTools_Modification)
136 #endif // _BRepTools_TrsfModification_HeaderFile