summaryrefslogtreecommitdiff
path: root/src/Geom2dLProp/Geom2dLProp_Curve2dTool.cxx
blob: fcaad90dd77884ab8f2a0aa8f236bf3e5458f458 (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
// File:	Geom2dLProp_Curve2dTool.cxx
// Created:	Tue Aug 18 15:40:26 1992
// Author:	Herve LEGRAND
//		<hl@bravox>

#include <Geom2dLProp_Curve2dTool.ixx>
#include <Geom2d_Curve.hxx>
#include <GeomAbs_Shape.hxx>

void  Geom2dLProp_Curve2dTool::Value(const Handle_Geom2d_Curve& C, 
	    const Standard_Real U, gp_Pnt2d& P)
{
  P = C->Value(U);
}

void  Geom2dLProp_Curve2dTool::D1(const Handle_Geom2d_Curve& C, 
	 const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1)
{
  C->D1(U, P, V1);
}

void  Geom2dLProp_Curve2dTool::D2(const Handle_Geom2d_Curve& C, 
	 const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2)
{
  C->D2(U, P, V1, V2);
}

void  Geom2dLProp_Curve2dTool::D3(const Handle_Geom2d_Curve& C, 
	 const Standard_Real U, gp_Pnt2d& P, gp_Vec2d& V1, gp_Vec2d& V2, gp_Vec2d& V3)
{
  C->D3(U, P, V1, V2, V3);
}

Standard_Integer  Geom2dLProp_Curve2dTool::Continuity(const Handle_Geom2d_Curve& C)
{
  GeomAbs_Shape s = C->Continuity();
  switch (s) {
  case GeomAbs_C0:
    return 0;
  case GeomAbs_C1:
    return 1;
  case GeomAbs_C2:
    return 2;
  case GeomAbs_C3:
    return 3;
  case GeomAbs_G1:
    return 0;
  case GeomAbs_G2:
    return 0;
  case GeomAbs_CN:
    return 3;
  };
  return 0;
}

Standard_Real  Geom2dLProp_Curve2dTool::FirstParameter(const Handle_Geom2d_Curve& C)
{
  return C->FirstParameter();
}

Standard_Real  Geom2dLProp_Curve2dTool::LastParameter(const Handle_Geom2d_Curve& C)
{
  return C->LastParameter();
}