0026595: Lost some comments in OCCT-code after cdl elimination
[occt.git] / src / BRepApprox / BRepApprox_TheMultiLineOfApprox.hxx
1 // Created on: 1995-06-06
2 // Created by: Jean Yves LEBEY
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 #ifndef _BRepApprox_TheMultiLineOfApprox_HeaderFile
18 #define _BRepApprox_TheMultiLineOfApprox_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Address.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Real.hxx>
28 #include <Approx_Status.hxx>
29 #include <TColgp_Array1OfPnt.hxx>
30 #include <TColgp_Array1OfPnt2d.hxx>
31 #include <TColgp_Array1OfVec.hxx>
32 #include <TColgp_Array1OfVec2d.hxx>
33 class BRepApprox_ApproxLine;
34 class ApproxInt_SvSurfaces;
35
36
37
38 class BRepApprox_TheMultiLineOfApprox 
39 {
40 public:
41
42   DEFINE_STANDARD_ALLOC
43
44   
45   //! The  class   SvSurfaces     is used   when    the
46   //! approximation algorithm needs some extra points on
47   //! the line <line>. A New line  is then created which
48   //! shares  the    same  surfaces    and    functions.
49   //!
50   //! SvSurfaces is   a  deferred   class  which  allows
51   //! several implementations of  this  algorithm   with
52   //! different surfaces   (bi-parametric     ones,   or
53   //! implicit and biparametric ones)
54   Standard_EXPORT BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line, const Standard_Address PtrSvSurfaces, const Standard_Integer NbP3d, const Standard_Integer NbP2d, const Standard_Real xo, const Standard_Real ax, const Standard_Real yo, const Standard_Real ay, const Standard_Real zo, const Standard_Real az, const Standard_Real u1o, const Standard_Real a1u, const Standard_Real v1o, const Standard_Real a1v, const Standard_Real u2o, const Standard_Real a2u, const Standard_Real v2o, const Standard_Real a2v, const Standard_Boolean P2DOnFirst, const Standard_Integer IndMin = 0, const Standard_Integer IndMax = 0);
55   
56   //! No Extra points will be added on the current line
57   Standard_EXPORT BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line, const Standard_Integer NbP3d, const Standard_Integer NbP2d, const Standard_Real xo, const Standard_Real ax, const Standard_Real yo, const Standard_Real ay, const Standard_Real zo, const Standard_Real az, const Standard_Real u1o, const Standard_Real a1u, const Standard_Real v1o, const Standard_Real a1v, const Standard_Real u2o, const Standard_Real a2u, const Standard_Real v2o, const Standard_Real a2v, const Standard_Boolean P2DOnFirst, const Standard_Integer IndMin = 0, const Standard_Integer IndMax = 0);
58   
59   Standard_EXPORT Standard_Integer FirstPoint() const;
60   
61   Standard_EXPORT Standard_Integer LastPoint() const;
62   
63   //! Returns the number of 2d points of a TheLine.
64   Standard_EXPORT Standard_Integer NbP2d() const;
65   
66   //! Returns the number of 3d points of a TheLine.
67   Standard_EXPORT Standard_Integer NbP3d() const;
68   
69   Standard_EXPORT Approx_Status WhatStatus() const;
70   
71   //! returns the 3d points of the multipoint <MPointIndex>
72   //! when only 3d points exist.
73   Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const;
74   
75   //! returns the 2d points of the multipoint <MPointIndex>
76   //! when only 2d points exist.
77   Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d) const;
78   
79   //! returns the 3d and 2d points of the multipoint
80   //! <MPointIndex>.
81   Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d) const;
82   
83   //! returns the 3d points of the multipoint <MPointIndex>
84   //! when only 3d points exist.
85   Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV) const;
86   
87   //! returns the 2d tangency points of the multipoint
88   //! <MPointIndex> only when 2d points exist.
89   Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d) const;
90   
91   //! returns the 3d and 2d points of the multipoint
92   //! <MPointIndex>.
93   Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const;
94   
95   Standard_EXPORT BRepApprox_TheMultiLineOfApprox MakeMLBetween (const Standard_Integer Low, const Standard_Integer High, const Standard_Integer NbPointsToInsert) const;
96   
97   //! Dump of the current multi-line.
98   Standard_EXPORT void Dump() const;
99
100
101
102
103 protected:
104
105
106
107
108
109 private:
110
111
112
113   Standard_Address PtrOnmySvSurfaces;
114   Handle(BRepApprox_ApproxLine) myLine;
115   Standard_Integer indicemin;
116   Standard_Integer indicemax;
117   Standard_Integer nbp3d;
118   Standard_Integer nbp2d;
119   Standard_Boolean p2donfirst;
120   Standard_Real Xo;
121   Standard_Real Ax;
122   Standard_Real Yo;
123   Standard_Real Ay;
124   Standard_Real Zo;
125   Standard_Real Az;
126   Standard_Real U1o;
127   Standard_Real A1u;
128   Standard_Real V1o;
129   Standard_Real A1v;
130   Standard_Real U2o;
131   Standard_Real A2u;
132   Standard_Real V2o;
133   Standard_Real A2v;
134
135
136 };
137
138
139
140
141
142
143
144 #endif // _BRepApprox_TheMultiLineOfApprox_HeaderFile