summaryrefslogtreecommitdiff
path: root/inc/ShapeConstruct_Curve.hxx
blob: 7e0b392fa323ed0177827b6f429c695917d2eaa5 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _ShapeConstruct_Curve_HeaderFile
#define _ShapeConstruct_Curve_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Geom_Curve_HeaderFile
#include <Handle_Geom_Curve.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_Geom2d_Curve_HeaderFile
#include <Handle_Geom2d_Curve.hxx>
#endif
#ifndef _Handle_Geom_BSplineCurve_HeaderFile
#include <Handle_Geom_BSplineCurve.hxx>
#endif
#ifndef _Handle_Geom2d_BSplineCurve_HeaderFile
#include <Handle_Geom2d_BSplineCurve.hxx>
#endif
#ifndef _Handle_TColStd_HArray1OfReal_HeaderFile
#include <Handle_TColStd_HArray1OfReal.hxx>
#endif
class Geom_Curve;
class gp_Pnt;
class Geom2d_Curve;
class gp_Pnt2d;
class Geom_BSplineCurve;
class Geom2d_BSplineCurve;
class TColStd_HArray1OfReal;
class TColStd_Array1OfReal;


//! Adjusts curve to have start and end points at the given <br>
//!          points (currently works on lines and B-Splines only) <br>
class ShapeConstruct_Curve  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Modifies a curve in order to make its bounds confused with <br>
//!           given points. <br>
//!           Works only on lines and B-Splines, returns True in this case, <br>
//!           else returns False. <br>
//!           For line considers both bounding points, for B-Splines only <br>
//!           specified. <br>
//! <br>
//!  Warning : Does not check if curve should be reversed <br>
  Standard_EXPORT     Standard_Boolean AdjustCurve(const Handle(Geom_Curve)& C3D,const gp_Pnt& P1,const gp_Pnt& P2,const Standard_Boolean take1 = Standard_True,const Standard_Boolean take2 = Standard_True) const;
  //! Modifies a curve in order to make its bounds confused with <br>
//!           given points. <br>
//!           Works only on lines and B-Splines. <br>
  Standard_EXPORT     Standard_Boolean AdjustCurveSegment(const Handle(Geom_Curve)& C3D,const gp_Pnt& P1,const gp_Pnt& P2,const Standard_Real U1,const Standard_Real U2) const;
  //! Modifies a curve in order to make its bounds confused with <br>
//!           given points. <br>
//!           Works only on lines and B-Splines, returns True in this case, <br>
//!           else returns False. <br>
//! <br>
//!           For line considers both bounding points, for B-Splines only <br>
//!           specified. <br>
//! <br>
//!  Warning : Does not check if curve should be reversed <br>
  Standard_EXPORT     Standard_Boolean AdjustCurve2d(const Handle(Geom2d_Curve)& C2D,const gp_Pnt2d& P1,const gp_Pnt2d& P2,const Standard_Boolean take1 = Standard_True,const Standard_Boolean take2 = Standard_True) const;
  //! Converts a curve of any type (only part from first to last) <br>
//!          to bspline. The method of conversion depends on the type <br>
//!          of original curve: <br>
//!          BSpline -> C.Segment(first,last) <br>
//!          Bezier and Line -> GeomConvert::CurveToBSplineCurve(C).Segment(first,last) <br>
//!          Conic and Other -> Approx_Curve3d(C[first,last],prec,C1,9,1000) <br>
  Standard_EXPORT     Handle_Geom_BSplineCurve ConvertToBSpline(const Handle(Geom_Curve)& C,const Standard_Real first,const Standard_Real last,const Standard_Real prec) const;
  //! Converts a curve of any type (only part from first to last) <br>
//!          to bspline. The method of conversion depends on the type <br>
//!          of original curve: <br>
//!          BSpline -> C.Segment(first,last) <br>
//!          Bezier and Line -> GeomConvert::CurveToBSplineCurve(C).Segment(first,last) <br>
//!          Conic and Other -> Approx_Curve2d(C[first,last],prec,C1,9,1000) <br>
  Standard_EXPORT     Handle_Geom2d_BSplineCurve ConvertToBSpline(const Handle(Geom2d_Curve)& C,const Standard_Real first,const Standard_Real last,const Standard_Real prec) const;
  
  Standard_EXPORT   static  Standard_Boolean FixKnots(Handle(TColStd_HArray1OfReal)& knots) ;
  //! Fix bspline knots to ensure that there is enough <br>
//!          gap between neighbouring values <br>
//!          Returns True if something fixed (by shifting knot) <br>
  Standard_EXPORT   static  Standard_Boolean FixKnots(TColStd_Array1OfReal& knots) ;





protected:





private:





};





// other Inline functions and methods (like "C++: function call" methods)


#endif