File: AppParCurves_MultiBSpCurve.hxx

package info (click to toggle)
oce 0.18.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 301,548 kB
  • sloc: cpp: 1,190,609; ansic: 67,225; sh: 11,630; tcl: 7,954; cs: 5,221; python: 2,867; java: 1,522; makefile: 342; xml: 292; perl: 37
file content (166 lines) | stat: -rw-r--r-- 6,502 bytes parent folder | download | duplicates (5)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// 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 _AppParCurves_MultiBSpCurve_HeaderFile
#define _AppParCurves_MultiBSpCurve_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>

#include <Handle_TColStd_HArray1OfReal.hxx>
#include <Handle_TColStd_HArray1OfInteger.hxx>
#include <Standard_Integer.hxx>
#include <AppParCurves_MultiCurve.hxx>
#include <Standard_Real.hxx>
#include <Standard_OStream.hxx>
class TColStd_HArray1OfReal;
class TColStd_HArray1OfInteger;
class Standard_OutOfRange;
class Standard_DimensionError;
class Standard_ConstructionError;
class AppParCurves_Array1OfMultiPoint;
class TColStd_Array1OfReal;
class TColStd_Array1OfInteger;
class AppParCurves_MultiCurve;
class gp_Pnt;
class gp_Pnt2d;
class gp_Vec;
class gp_Vec2d;


//! This class describes a MultiBSpCurve approximating a Multiline.
//! Just as a Multiline is a set of a given number of lines, a MultiBSpCurve is a set
//! of a specified number of bsplines defined by:
//! -   A specified number of MultiPoints - the poles of a specified number of curves
//! -   The degree of approximation identical for each of the specified number of curves.
//!
//! Example of a MultiBSpCurve composed of a specified number of MultiPoints:
//!
//! P1______P2_____P3______P4________........_____PNbMPoints
//!
//! Q1______Q2_____Q3______Q4________........_____QNbMPoints
//! .                                               .
//! .                                               .
//! .                                               .
//! R1______R2_____R3______R4________........_____RNbMPoints
//!
//! Pi, Qi, ..., Ri are points of dimension 2 or 3.
//!
//! (Pi, Qi, ...Ri), i= 1,...NbPoles are MultiPoints.
//! each MultiPoint has got NbPol Poles.
//! MultiBSpCurves are created by the SplineValue method in the ComputeLine
//! class, and by the Value method in TheVariational class. MultiBSpCurve
//! provides the information required to create the BSpline defined by the approximation.
class AppParCurves_MultiBSpCurve  : public AppParCurves_MultiCurve
{
public:

  DEFINE_STANDARD_ALLOC

  
  //! returns an indefinite MultiBSpCurve.
  Standard_EXPORT AppParCurves_MultiBSpCurve();
  
  //! creates a MultiBSpCurve, describing BSpline curves all
  //! containing the same number of MultiPoint.
  //! An exception is raised if Degree < 0.
  Standard_EXPORT AppParCurves_MultiBSpCurve(const Standard_Integer NbPol);
  
  //! creates a MultiBSpCurve, describing BSpline curves all
  //! containing the same number of MultiPoint.
  //! Each MultiPoint must have NbCurves Poles.
  Standard_EXPORT AppParCurves_MultiBSpCurve(const AppParCurves_Array1OfMultiPoint& tabMU, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults);
  
  //! creates a MultiBSpCurve, describing BSpline
  //! curves, taking control points from <SC>.
  Standard_EXPORT AppParCurves_MultiBSpCurve(const AppParCurves_MultiCurve& SC, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults);
  
  //! Knots of the multiBSpCurve are assigned to <theknots>.
  Standard_EXPORT   void SetKnots (const TColStd_Array1OfReal& theKnots) ;
  
  //! Multiplicities of the multiBSpCurve are assigned
  //! to <theMults>.
  Standard_EXPORT   void SetMultiplicities (const TColStd_Array1OfInteger& theMults) ;
  
  //! Returns an array of Reals containing
  //! the multiplicities of curves resulting from the approximation.
  Standard_EXPORT  const  TColStd_Array1OfReal& Knots()  const;
  
  //! Returns an array of Reals containing the
  //! multiplicities of curves resulting from the approximation.
  Standard_EXPORT  const  TColStd_Array1OfInteger& Multiplicities()  const;
  
  //! returns the degree of the curve(s).
  Standard_EXPORT virtual   Standard_Integer Degree()  const;
  
  //! returns the value of the point with a parameter U
  //! on the BSpline curve number CuIndex.
  //! An exception is raised if CuIndex <0 or > NbCurves.
  //! An exception is raised if the curve dimension is 2d.
  Standard_EXPORT virtual   void Value (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt)  const;
  
  //! returns the value of the point with a parameter U
  //! on the BSpline curve number CuIndex.
  //! An exception is raised if CuIndex <0 or > NbCurves.
  //! An exception is raised if the curve dimension is 3d.
  Standard_EXPORT virtual   void Value (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt)  const;
  
  //! returns the value of the point with a parameter U
  //! on the BSpline curve number CuIndex.
  //! An exception is raised if CuIndex <0 or > NbCurves.
  //! An exception is raised if the curve dimension is 3d.
  Standard_EXPORT virtual   void D1 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt, gp_Vec& V1)  const;
  
  //! returns the value of the point with a parameter U
  //! on the BSpline curve number CuIndex.
  //! An exception is raised if CuIndex <0 or > NbCurves.
  //! An exception is raised if the curve dimension is 2d.
  Standard_EXPORT virtual   void D1 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt, gp_Vec2d& V1)  const;
  
  //! returns the value of the point with a parameter U
  //! on the BSpline curve number CuIndex.
  //! An exception is raised if CuIndex <0 or > NbCurves.
  //! An exception is raised if the curve dimension is 3d.
  Standard_EXPORT virtual   void D2 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt& Pt, gp_Vec& V1, gp_Vec& V2)  const;
  
  //! returns the value of the point with a parameter U
  //! on the BSpline curve number CuIndex.
  //! An exception is raised if CuIndex <0 or > NbCurves.
  //! An exception is raised if the curve dimension is 2d.
  Standard_EXPORT virtual   void D2 (const Standard_Integer CuIndex, const Standard_Real U, gp_Pnt2d& Pt, gp_Vec2d& V1, gp_Vec2d& V2)  const;
  
  //! Prints on the stream o information on the current
  //! state of the object.
  //! Is used to redefine the operator <<.
  Standard_EXPORT virtual   void Dump (Standard_OStream& o)  const;




protected:





private:



  Handle(TColStd_HArray1OfReal) myknots;
  Handle(TColStd_HArray1OfInteger) mymults;
  Standard_Integer myDegree;


};







#endif // _AppParCurves_MultiBSpCurve_HeaderFile