b311480e |
1 | // Created on: 2005-12-20 |
2 | // Created by: Sergey KHROMOV |
973c2be1 |
3 | // Copyright (c) 2005-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | #include <BRep_Tool.hxx> |
17 | |
18 | //======================================================================= |
19 | //function : BRepGProp_Face |
20 | //purpose : Constructor. Initializes the object with IsUseSpan. |
21 | //======================================================================= |
22 | |
23 | inline BRepGProp_Face::BRepGProp_Face(const Standard_Boolean IsUseSpan) |
c24d4017 |
24 | : mySReverse (Standard_False), |
25 | myIsUseSpan(IsUseSpan) |
7fd59977 |
26 | { |
27 | } |
28 | |
29 | //======================================================================= |
30 | //function : BRepGProp_Face |
31 | //purpose : Constructor.Initializes the object with the face and |
32 | // IsUseSpan flan. |
33 | //======================================================================= |
34 | |
35 | inline BRepGProp_Face::BRepGProp_Face(const TopoDS_Face &F, |
36 | const Standard_Boolean IsUseSpan) |
37 | : myIsUseSpan(IsUseSpan) |
38 | { |
39 | Load(F); |
40 | } |
41 | |
42 | //======================================================================= |
43 | //function : NaturalRestriction |
44 | //purpose : Returns Standard_True if the face is not trimmed. |
45 | //======================================================================= |
46 | |
47 | inline Standard_Boolean BRepGProp_Face::NaturalRestriction() const |
48 | { |
49 | return BRep_Tool::NaturalRestriction(mySurface.Face()); |
50 | } |
5b0f2540 |
51 | // |
52 | //======================================================================= |
53 | //function : GetFace |
54 | //purpose : Returns TopoDS Face. |
55 | //======================================================================= |
56 | |
57 | inline const TopoDS_Face& BRepGProp_Face::GetFace() const |
58 | { |
59 | return mySurface.Face(); |
60 | } |
7fd59977 |
61 | |
62 | //======================================================================= |
63 | //function : Value2d |
64 | //purpose : Returns the value of the boundary curve of the face. |
65 | //======================================================================= |
66 | |
67 | inline gp_Pnt2d BRepGProp_Face::Value2d(const Standard_Real U) const |
68 | { |
69 | return myCurve.Value(U); |
70 | } |
71 | |
72 | //======================================================================= |
73 | //function : D12d |
74 | //purpose : Returns the point of parameter U and the first derivative |
75 | // at this point of a boundary curve. |
76 | //======================================================================= |
77 | |
78 | inline void BRepGProp_Face::D12d(const Standard_Real U, |
79 | gp_Pnt2d &P, |
80 | gp_Vec2d &V1) const |
81 | { |
82 | myCurve.D1(U,P,V1); |
83 | } |
84 | |
85 | //======================================================================= |
86 | //function : FirstParameter |
87 | //purpose : Returns the parametric value of the start point of |
88 | // the current arc of curve. |
89 | //======================================================================= |
90 | |
91 | inline Standard_Real BRepGProp_Face::FirstParameter() const |
92 | { |
93 | return myCurve.FirstParameter(); |
94 | } |
95 | |
96 | //======================================================================= |
97 | //function : LastParameter |
98 | //purpose : Returns the parametric value of the end point of |
99 | // the current arc of curve. |
100 | //======================================================================= |
101 | |
102 | inline Standard_Real BRepGProp_Face::LastParameter() const |
103 | { |
104 | return myCurve.LastParameter(); |
105 | } |