0024171: Eliminate CLang compiler warning -Wreorder
[occt.git] / src / ShapeCustom / ShapeCustom_TrsfModification.cxx
CommitLineData
b311480e 1// Created on: 1999-03-09
2// Created by: Roman LYGIN
3// Copyright (c) 1999-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23#include <ShapeCustom_TrsfModification.ixx>
24#include <BRep_TVertex.hxx>
25#include <BRep_TEdge.hxx>
26#include <BRep_TFace.hxx>
27
28//=======================================================================
29//function : ShapeCustom_TrsfModification
30//purpose :
31//=======================================================================
32
33ShapeCustom_TrsfModification::ShapeCustom_TrsfModification(const gp_Trsf& T):
34 BRepTools_TrsfModification(T)
35{
36}
37
38//=======================================================================
39//function : NewSurface
40//purpose :
41//=======================================================================
42
43 Standard_Boolean ShapeCustom_TrsfModification::NewSurface(const TopoDS_Face& F,
44 Handle(Geom_Surface)& S,
45 TopLoc_Location& L,
46 Standard_Real& Tol,
47 Standard_Boolean& RevWires,
48 Standard_Boolean& RevFace)
49{
50 Standard_Boolean result = BRepTools_TrsfModification::NewSurface(F, S, L, Tol, RevWires, RevFace);
51 Tol = (*((Handle(BRep_TFace)*)&F.TShape()))->Tolerance() * Abs(Trsf().ScaleFactor());
52 return result;
53}
54
55//=======================================================================
56//function : NewCurve
57//purpose :
58//=======================================================================
59
60 Standard_Boolean ShapeCustom_TrsfModification::NewCurve(const TopoDS_Edge& E,
61 Handle(Geom_Curve)& C,
62 TopLoc_Location& L,
63 Standard_Real& Tol)
64{
65 Standard_Boolean result = BRepTools_TrsfModification::NewCurve (E, C, L, Tol);
66 Tol = (*((Handle(BRep_TEdge)*)&E.TShape()))->Tolerance() * Abs(Trsf().ScaleFactor());
67 return result;
68}
69
70//=======================================================================
71//function : NewPoint
72//purpose :
73//=======================================================================
74
75 Standard_Boolean ShapeCustom_TrsfModification::NewPoint(const TopoDS_Vertex& V,
76 gp_Pnt& P,
77 Standard_Real& Tol)
78{
79 Standard_Boolean result = BRepTools_TrsfModification::NewPoint (V, P, Tol);
80 Tol = (*((Handle(BRep_TVertex)*)&V.TShape()))->Tolerance() * Abs(Trsf().ScaleFactor());
81 return result;
82}
83
84//=======================================================================
85//function : NewCurve2d
86//purpose :
87//=======================================================================
88
89 Standard_Boolean ShapeCustom_TrsfModification::NewCurve2d(const TopoDS_Edge& E,
90 const TopoDS_Face& F,
91 const TopoDS_Edge& NewE,
92 const TopoDS_Face& NewF,
93 Handle(Geom2d_Curve)& C,
94 Standard_Real& Tol)
95{
96 Standard_Boolean result = BRepTools_TrsfModification::NewCurve2d (E, F, NewE, NewF, C, Tol);
97 Tol = (*((Handle(BRep_TEdge)*)&E.TShape()))->Tolerance() * Abs(Trsf().ScaleFactor());
98 return result;
99}
100
101//=======================================================================
102//function : NewParameter
103//purpose :
104//=======================================================================
105
106 Standard_Boolean ShapeCustom_TrsfModification::NewParameter(const TopoDS_Vertex& V,
107 const TopoDS_Edge& E,
108 Standard_Real& P,
109 Standard_Real& Tol)
110{
111 Standard_Boolean result = BRepTools_TrsfModification::NewParameter (V, E, P, Tol);
112 Tol = (*((Handle(BRep_TVertex)*)&V.TShape()))->Tolerance() * Abs(Trsf().ScaleFactor());
113 return result;
114}
115