summaryrefslogtreecommitdiff
path: root/inc/BRepGProp_Face.lxx
blob: 3e180ff76f3468098d9a3a1a9f32188cfd880004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// File:	BRepGProp_Face.lxx
// Created:	Tue Dec 20 15:30:17 2005
// Author:	Sergey KHROMOV
//		<skv@dimox>


#include <BRep_Tool.hxx>

//=======================================================================
//function : BRepGProp_Face
//purpose  : Constructor. Initializes the object with IsUseSpan.
//=======================================================================

inline BRepGProp_Face::BRepGProp_Face(const Standard_Boolean IsUseSpan)
     : myIsUseSpan(IsUseSpan)
{
}

//=======================================================================
//function : BRepGProp_Face
//purpose  : Constructor.Initializes the object with the face and
//           IsUseSpan flan.
//=======================================================================

inline BRepGProp_Face::BRepGProp_Face(const TopoDS_Face      &F,
				      const Standard_Boolean  IsUseSpan)
     : myIsUseSpan(IsUseSpan)
{
  Load(F);
}

//=======================================================================
//function : NaturalRestriction
//purpose  : Returns Standard_True if the face is not trimmed.
//=======================================================================

inline Standard_Boolean BRepGProp_Face::NaturalRestriction() const
{
  return BRep_Tool::NaturalRestriction(mySurface.Face());
}

//=======================================================================
//function : Value2d
//purpose  : Returns the value of the boundary curve of the face.
//=======================================================================

inline gp_Pnt2d BRepGProp_Face::Value2d(const Standard_Real U) const
{
  return myCurve.Value(U);
}

//=======================================================================
//function : D12d
//purpose  : Returns the point of parameter U and the first derivative
//           at this point of a boundary curve.
//=======================================================================

inline void BRepGProp_Face::D12d(const Standard_Real  U,
				       gp_Pnt2d      &P,
				       gp_Vec2d      &V1) const
{
  myCurve.D1(U,P,V1);
}

//=======================================================================
//function : FirstParameter
//purpose  : Returns the parametric value of the start point of
//           the current arc of curve.
//=======================================================================

inline Standard_Real BRepGProp_Face::FirstParameter() const
{
  return myCurve.FirstParameter();
}

//=======================================================================
//function : LastParameter
//purpose  : Returns the parametric value of the end point of
//           the current arc of curve.
//=======================================================================

inline Standard_Real BRepGProp_Face::LastParameter() const
{
  return myCurve.LastParameter();
}