CADCurve.h
1 /******************************************************************************
2 
3  (c) 2004-2014 Scientific Computation Research Center,
4  Rensselaer Polytechnic Institute. All rights reserved.
5 
6  The LICENSE-SCOREC file included with this distribution describes the terms
7  of the SCOREC Non-Commercial License this program is distributed under.
8 
9 *******************************************************************************/
10 #ifndef CADCURVE_H
11 #define CADCURVE_H
12 
13 #include "CMAFwd.h"
14 #include "ParametricCurve.h"
15 
19 class CADCurve : public ParametricCurve {
20  protected:
21  Point3d m_start_xyz;
22  Point3d m_end_xyz;
23 
24  Point2d m_start_uv;
25  Point2d m_end_uv;
26 
27  int m_model_type;
28 };
29 
30 /*
31 class VirtualCurveOnCAD : public CADCurve {
32  public:
33  VirtualCurveOnCAD(Point3d xyz0,
34  Point3d xyz1,
35  Point2d uv0,
36  Point2d uv1,
37  int model_type);
38 };
39 */
40 
41 class MeshCurveOnCAD : public CADCurve {
42  public:
45  MeshCurveOnCAD(pMeshEnt in_vtx1, pMeshEnt in_vtx2);
46 
47  virtual ~MeshCurveOnCAD() {
48  }
49 
51  void get_vert_param_for_gedge(Point1d & out_par0, Point1d & out_par1);
52 
54  void get_vert_param_for_gface(Point2d & out_par0, Point2d & out_par1);
55  protected:
56  int v_eval(Point1d in_xi, Point3d & out_xyz);
57  int v_order();
58  int v_deriv1(Point1d in_xi, Point3d & out_xyz);
59  private:
60  pMeshEnt m_vtx_start;
61  pMeshEnt m_vtx_end;
62  pMeshEnt m_edge;
63  bool m_reversed_edge;
64 };
65 
66 class MeshCurveOnCADFace : public CADCurve {
67  public:
70  MeshCurveOnCADFace(pMeshEnt in_vtx1, pMeshEnt in_vtx2);
71 
72  virtual ~MeshCurveOnCADFace() {
73  }
74 
76  void get_vert_param_for_gedge(Point1d & out_par0, Point1d & out_par1);
77 
79  void get_vert_param_for_gface(Point2d & out_par0, Point2d & out_par1);
80  protected:
81  int v_eval(Point1d in_xi, Point3d & out_xyz);
82  int v_order();
83  int v_deriv1(Point1d in_xi, Point3d & out_xyz);
84  private:
85  pMeshEnt m_vtx_start;
86  pMeshEnt m_vtx_end;
87  pMeshEnt m_edge;
88  bool m_reversed_edge;
89  Point2d m_mid_uv;
90 };
91 
92 #endif // CADCURVE_H
93 
void get_vert_param_for_gedge(Point1d &out_par0, Point1d &out_par1)
get the coordinates of the end vertices in param space of a gedge
Definition: CADCurve.cc:146
MeshCurveOnCAD(pMeshEnt in_vtx1, pMeshEnt in_vtx2)
Definition: CADCurve.cc:20
void get_vert_param_for_gface(Point2d &out_par0, Point2d &out_par1)
get the coordinates of the end vertices in param space of a gface
Definition: CADCurve.cc:196
interface class for all parametric curves The parametric curves use the same coordinate system as the...
Definition: ParametricCurve.h:18
int v_eval(Point1d in_xi, Point3d &out_xyz)
Definition: CADCurve.cc:50
void get_vert_param_for_gface(Point2d &out_par0, Point2d &out_par1)
get the coordinates of the end vertices in param space of a gface
Definition: CADCurveOnGFace.cc:237
MeshCurveOnCADFace(pMeshEnt in_vtx1, pMeshEnt in_vtx2)
Definition: CADCurveOnGFace.cc:21
int v_eval(Point1d in_xi, Point3d &out_xyz)
Definition: CADCurveOnGFace.cc:66
Parametric curve with underlying CAD parametrization.
Definition: CADCurve.h:19
void get_vert_param_for_gedge(Point1d &out_par0, Point1d &out_par1)
get the coordinates of the end vertices in param space of a gedge
Definition: CADCurveOnGFace.cc:187
Definition: CADCurve.h:41
Definition: CADCurve.h:66