42cf5bc1 |
1 | // Created on: 1996-12-30 |
2 | // Created by: Stagiaire Mary FABIEN |
3 | // Copyright (c) 1996-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_GTrsfModification_HeaderFile |
18 | #define _BRepTools_GTrsfModification_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <gp_GTrsf.hxx> |
24 | #include <Standard_Real.hxx> |
25 | #include <BRepTools_Modification.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | #include <GeomAbs_Shape.hxx> |
28 | class gp_GTrsf; |
29 | class TopoDS_Face; |
30 | class Geom_Surface; |
31 | class TopLoc_Location; |
32 | class TopoDS_Edge; |
33 | class Geom_Curve; |
34 | class TopoDS_Vertex; |
35 | class gp_Pnt; |
36 | class Geom2d_Curve; |
37 | |
38 | |
39 | class BRepTools_GTrsfModification; |
40 | DEFINE_STANDARD_HANDLE(BRepTools_GTrsfModification, BRepTools_Modification) |
41 | |
42 | //! Defines a modification of the geometry by a GTrsf |
43 | //! from gp. All methods return True and transform the |
44 | //! geometry. |
45 | class BRepTools_GTrsfModification : public BRepTools_Modification |
46 | { |
47 | |
48 | public: |
49 | |
50 | |
51 | Standard_EXPORT BRepTools_GTrsfModification(const gp_GTrsf& T); |
52 | |
53 | //! Gives an access on the GTrsf. |
54 | Standard_EXPORT gp_GTrsf& GTrsf(); |
55 | |
56 | //! Returns Standard_True if the face <F> has been |
57 | //! modified. In this case, <S> is the new geometric |
58 | //! support of the face, <L> the new location,<Tol> |
59 | //! the new tolerance.<RevWires> has to be set to |
60 | //! Standard_True when the modification reverses the |
61 | //! normal of the surface.(the wires have to be |
62 | //! reversed). <RevFace> has to be set to |
63 | //! Standard_True if the orientation of the modified |
64 | //! face changes in the shells which contain it. -- |
65 | //! Here, <RevFace> will return Standard_True if the |
66 | //! -- gp_Trsf is negative. |
79104795 |
67 | 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; |
42cf5bc1 |
68 | |
69 | //! Returns Standard_True if the edge <E> has been |
70 | //! modified. In this case, <C> is the new geometric |
71 | //! support of the edge, <L> the new location, <Tol> |
72 | //! the new tolerance. Otherwise, returns |
73 | //! Standard_False, and <C>, <L>, <Tol> are not |
74 | //! significant. |
79104795 |
75 | Standard_EXPORT Standard_Boolean NewCurve (const TopoDS_Edge& E, Handle(Geom_Curve)& C, TopLoc_Location& L, Standard_Real& Tol) Standard_OVERRIDE; |
42cf5bc1 |
76 | |
77 | //! Returns Standard_True if the vertex <V> has been |
78 | //! modified. In this case, <P> is the new geometric |
79 | //! support of the vertex, <Tol> the new tolerance. |
80 | //! Otherwise, returns Standard_False, and <P>, <Tol> |
81 | //! are not significant. |
79104795 |
82 | Standard_EXPORT Standard_Boolean NewPoint (const TopoDS_Vertex& V, gp_Pnt& P, Standard_Real& Tol) Standard_OVERRIDE; |
42cf5bc1 |
83 | |
84 | //! Returns Standard_True if the edge <E> has a new |
85 | //! curve on surface on the face <F>.In this case, <C> |
86 | //! is the new geometric support of the edge, <L> the |
87 | //! new location, <Tol> the new tolerance. |
88 | //! Otherwise, returns Standard_False, and <C>, <L>, |
89 | //! <Tol> are not significant. |
79104795 |
90 | 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; |
42cf5bc1 |
91 | |
92 | //! Returns Standard_True if the Vertex <V> has a new |
93 | //! parameter on the edge <E>. In this case, <P> is |
94 | //! the parameter, <Tol> the new tolerance. |
95 | //! Otherwise, returns Standard_False, and <P>, <Tol> |
96 | //! are not significant. |
79104795 |
97 | Standard_EXPORT Standard_Boolean NewParameter (const TopoDS_Vertex& V, const TopoDS_Edge& E, Standard_Real& P, Standard_Real& Tol) Standard_OVERRIDE; |
42cf5bc1 |
98 | |
99 | //! Returns the continuity of <NewE> between <NewF1> |
100 | //! and <NewF2>. |
101 | //! |
102 | //! <NewE> is the new edge created from <E>. <NewF1> |
103 | //! (resp. <NewF2>) is the new face created from <F1> |
104 | //! (resp. <F2>). |
79104795 |
105 | 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; |
42cf5bc1 |
106 | |
107 | |
108 | |
109 | |
92efcf78 |
110 | DEFINE_STANDARD_RTTIEXT(BRepTools_GTrsfModification,BRepTools_Modification) |
42cf5bc1 |
111 | |
112 | protected: |
113 | |
114 | |
115 | |
116 | |
117 | private: |
118 | |
119 | |
120 | gp_GTrsf myGTrsf; |
121 | Standard_Real myGScale; |
122 | |
123 | |
124 | }; |
125 | |
126 | |
127 | |
128 | |
129 | |
130 | |
131 | |
132 | #endif // _BRepTools_GTrsfModification_HeaderFile |