2 * Project Info: http://jcae.sourceforge.net
4 * This program is free software; you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License as published by the Free
6 * Software Foundation; either version 2.1 of the License, or (at your option)
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
15 * @author Jens Schmidt
19 %{#include <GeomAPI_PointsToBSpline.hxx>%}
20 %{#include <GeomAPI_Interpolate.hxx>%}
22 class GeomAPI_PointsToBSpline {
24 GeomAPI_PointsToBSpline();
25 GeomAPI_PointsToBSpline(const TColgp_Array1OfPnt& Points,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3);
26 GeomAPI_PointsToBSpline(const TColgp_Array1OfPnt& Points,const TColStd_Array1OfReal& Parameters,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3);
27 const Handle_Geom_BSplineCurve& Curve() const;
30 class GeomAPI_Interpolate {
32 GeomAPI_Interpolate(const Handle_TColgp_HArray1OfPnt& Points,const Standard_Boolean PeriodicFlag,const Standard_Real Tolerance);
33 void Load(const TColgp_Array1OfVec& Tangents,const Handle_TColStd_HArray1OfBoolean& TangentFlags,const Standard_Boolean Scale = Standard_True);
35 const Handle_Geom_BSplineCurve& Curve() const;
38 //%{#include <TColgp_HArray1OfPnt.hxx>%}
39 //%rename(TColgp_HArray1OfPnt) Handle_TColgp_HArray1OfPnt;
41 class Handle_TColgp_HArray1OfPnt
43 Handle_TColgp_HArray1OfPnt()=0;
46 %extend Handle_Tcolgp_HArray1OfPnt
48 static Handle_Tcolgp_Harray1OfPnt * hndl() {
50 Handle_Tcolgp_Harray1OfPnt
55 %extend Handle_TColgp_HArray1OfPnt
57 static Handle_TColgp_HArray1OfPnt * test(const TColgp_Array1OfPnt& Points)
59 Handle_TColgp_HArray1OfPnt * hgc=new Handle_TColgp_HArray1OfPnt();
69 %extend GeomAPI_Interpolate {
71 static GeomAPI_Interpolate create(const TColgp_Array1OfPnt& Points,const Standard_Boolean PeriodicFlag,const Standard_Real Tolerance)
76 Handle(TColgp_HArray1OfPnt) harray = new TColgp_HArray1OfPnt(Points.Lower(),Points.Upper());
77 for (i=1;i<=Points.Length(); i++) {
78 // harray->SetValue(i,Points.Value(i));
79 harray->SetValue(i,Points.Value(i));
82 return GeomAPI_Interpolate(harray,PeriodicFlag,Tolerance);