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
86
87
88
#include "CAMALCurveEval.hpp"
#include "meshkit/ModelEnt.hpp"
#include "meshkit/MKCore.hpp"
#include "meshkit/iGeom.hpp"
#include "meshkit/Error.hpp"

namespace MeshKit 
{

double CAMALCurveEval::arc_length()<--- The function 'arc_length' is never used.
{
  return modelEnt->measure();
}

bool CAMALCurveEval::is_parametric()<--- The function 'is_parametric' is never used.
{
  return true;
}

bool CAMALCurveEval::is_periodic(double& period)<--- The function 'is_periodic' is never used.
{
  bool is_peru, is_perv;
  iGeom::Error err = modelEnt->igeom_instance()->isEntPeriodic(modelEnt->geom_handle(), is_peru, is_perv);
  IBERRCHK(err, "Trouble calling isEntPeriodic.");
  double umin, umax;
  err = modelEnt->igeom_instance()->getEntURange(modelEnt->geom_handle(), umin, umax);
  IBERRCHK(err, "Trouble calling getEntURange.");
  period = umax - umin;
  return is_peru;
}

void CAMALCurveEval::get_param_range(double& u_start, double& u_end)<--- The function 'get_param_range' is never used.
{
  iGeom::Error err = modelEnt->igeom_instance()->getEntURange(modelEnt->geom_handle(), u_start, u_end);
  IBERRCHK(err, "Trouble calling getEntURange.");
}

double CAMALCurveEval::u_from_arc_length(double u_root, double arc_length)<--- The function 'u_from_arc_length' is never used.
{
  double u_start, u_end;
  iGeom::Error err = modelEnt->igeom_instance()->getEntURange(modelEnt->geom_handle(), u_start, u_end);
  IBERRCHK(err, "Trouble calling getEntURange.");
  if (u_end-u_start <= 0) return arc_length/modelEnt->measure();
  else return u_root + (arc_length/modelEnt->measure())*(u_end-u_start);
}
             
bool CAMALCurveEval::position_from_u(double u, 
                             double& x, double& y, double& z )
{
  iGeom::Error err = modelEnt->igeom_instance()->getEntUtoXYZ(modelEnt->geom_handle(), u, x, y, z);
  IBERRCHK(err, "Trouble calling getEntUtoXYZ.");
  return true;
}

void CAMALCurveEval::move_to_curve(double& x, double& y, double& z) <--- The function 'move_to_curve' is never used.
{
  double dum[3];
  modelEnt->evaluate(x, y, z, dum);
  x = dum[0];
  y = dum[1];
  z = dum[2];
}

double CAMALCurveEval::u_from_position(double x, double y, double z)<--- The function 'u_from_position' is never used.
{
  double u;
  iGeom::Error err = modelEnt->igeom_instance()->getEntXYZtoU(modelEnt->geom_handle(), x, y, z, u);
  IBERRCHK(err, "Trouble calling getEntXYZtoU.");
  return u;
}

void CAMALCurveEval::start_coordinates(double& x, double& y, double& z)<--- The function 'start_coordinates' is never used.
{
  double u_start, u_end;
  iGeom::Error err = modelEnt->igeom_instance()->getEntURange(modelEnt->geom_handle(), u_start, u_end);
  IBERRCHK(err, "Trouble calling getEntURange.");
  position_from_u(u_start, x, y, z);
}

void CAMALCurveEval::end_coordinates(double& x, double& y, double& z)<--- The function 'end_coordinates' is never used.
{
  double u_start, u_end;
  iGeom::Error err = modelEnt->igeom_instance()->getEntURange(modelEnt->geom_handle(), u_start, u_end);
  IBERRCHK(err, "Trouble calling getEntURange.");
  position_from_u(u_end, x, y, z);
}

} // namespace MeshKit