0031381: Foundation Classes -wrong evaluations for rational BSpline curves using...
[occt.git] / src / BSplCLib / BSplCLib_3.cxx
1 // Created on: 1995-05-19
2 // Created by: Xavier BENVENISTE
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17
18 #include <BSplCLib.hxx>
19 #include <gp_Pnt.hxx>
20 #include <gp_Pnt2d.hxx>
21 #include <gp_Vec.hxx>
22 #include <gp_Vec2d.hxx>
23 #include <math_Matrix.hxx>
24 #include <Standard_NotImplemented.hxx>
25
26 // BSpline Curve in 3d space
27 // ***************************
28 #define Dimension_gen 3
29
30 #define Array1OfPoints  TColgp_Array1OfPnt
31 #define Point           gp_Pnt
32 #define Vector          gp_Vec
33
34 #define PointToCoords(carr,pnt,op) \
35 (carr)[0] = (pnt).X() op,  \
36         (carr)[1] = (pnt).Y() op,  \
37         (carr)[2] = (pnt).Z() op
38
39 #define CoordsToPoint(pnt,carr,op) \
40         (pnt).SetX ((carr)[0] op), \
41         (pnt).SetY ((carr)[1] op), \
42         (pnt).SetZ ((carr)[2] op)
43
44 #define NullifyPoint(pnt) \
45         (pnt).SetCoord (0.,0.,0.)
46
47 #define NullifyCoords(carr) \
48         (carr)[0] = (carr)[1] = (carr)[2] = 0.
49
50 #define ModifyCoords(carr,op) \
51         (carr)[0] op,          \
52         (carr)[1] op,          \
53         (carr)[2] op
54
55 #define CopyCoords(carr,carr2) \
56         (carr)[0] = (carr2)[0], \
57         (carr)[1] = (carr2)[1], \
58         (carr)[2] = (carr2)[2]
59
60 #define BSplCLib_DataContainer BSplCLib_DataContainer_3d
61   
62 #include <BSplCLib_CurveComputation.gxx>