Warnings on vc14 were eliminated
[occt.git] / src / BRepApprox / BRepApprox_TheMultiLineOfApprox.hxx
CommitLineData
42cf5bc1 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>
33class BRepApprox_ApproxLine;
34class ApproxInt_SvSurfaces;
35
36
37
38class BRepApprox_TheMultiLineOfApprox
39{
40public:
41
42 DEFINE_STANDARD_ALLOC
42cf5bc1 43
4e14c88f 44 //! The class SvSurfaces is used when the approximation algorithm
45 //! needs some extra points on the line <line>.
46 //! A New line is then created which shares the same surfaces and functions.
47 //! SvSurfaces is a deferred class which allows several implementations of
48 //! this algorithm with different surfaces (bi-parametric ones, or
36b9ff75 49 //! implicit and biparametric ones)
4e14c88f 50 Standard_EXPORT BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line,
51 const Standard_Address PtrSvSurfaces,
52 const Standard_Integer NbP3d,
53 const Standard_Integer NbP2d,
54 const Standard_Real xo,
55 const Standard_Real yo,
56 const Standard_Real zo,
57 const Standard_Real u1o,
58 const Standard_Real v1o,
59 const Standard_Real u2o,
60 const Standard_Real v2o,
61 const Standard_Boolean P2DOnFirst,
62 const Standard_Integer IndMin = 0,
63 const Standard_Integer IndMax = 0);
64
36b9ff75 65 //! No Extra points will be added on the current line
4e14c88f 66 Standard_EXPORT BRepApprox_TheMultiLineOfApprox(const Handle(BRepApprox_ApproxLine)& line,
67 const Standard_Integer NbP3d,
68 const Standard_Integer NbP2d,
69 const Standard_Real xo,
70 const Standard_Real yo,
71 const Standard_Real zo,
72 const Standard_Real u1o,
73 const Standard_Real v1o,
74 const Standard_Real u2o,
75 const Standard_Real v2o,
76 const Standard_Boolean P2DOnFirst,
77 const Standard_Integer IndMin = 0,
78 const Standard_Integer IndMax = 0);
79
42cf5bc1 80 Standard_EXPORT Standard_Integer FirstPoint() const;
81
82 Standard_EXPORT Standard_Integer LastPoint() const;
4e14c88f 83
36b9ff75 84 //! Returns the number of 2d points of a TheLine.
42cf5bc1 85 Standard_EXPORT Standard_Integer NbP2d() const;
4e14c88f 86
36b9ff75 87 //! Returns the number of 3d points of a TheLine.
42cf5bc1 88 Standard_EXPORT Standard_Integer NbP3d() const;
4e14c88f 89
42cf5bc1 90 Standard_EXPORT Approx_Status WhatStatus() const;
91
4e14c88f 92 //! Returns the 3d points of the multipoint <MPointIndex> when only 3d points exist.
42cf5bc1 93 Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt) const;
4e14c88f 94
95 //! Returns the 2d points of the multipoint <MPointIndex> when only 2d points exist.
42cf5bc1 96 Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt2d& tabPt2d) const;
4e14c88f 97
98 //! Returns the 3d and 2d points of the multipoint <MPointIndex>.
42cf5bc1 99 Standard_EXPORT void Value (const Standard_Integer MPointIndex, TColgp_Array1OfPnt& tabPt, TColgp_Array1OfPnt2d& tabPt2d) const;
4e14c88f 100
101 //! Returns the 3d tangency points of the multipoint <MPointIndex> only when 3d points exist.
42cf5bc1 102 Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV) const;
103
4e14c88f 104 //! Returns the 2d tangency points of the multipoint <MPointIndex> only when 2d points exist.
42cf5bc1 105 Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec2d& tabV2d) const;
106
4e14c88f 107 //! Returns the 3d and 2d points of the multipoint <MPointIndex>.
42cf5bc1 108 Standard_EXPORT Standard_Boolean Tangency (const Standard_Integer MPointIndex, TColgp_Array1OfVec& tabV, TColgp_Array1OfVec2d& tabV2d) const;
109
110 Standard_EXPORT BRepApprox_TheMultiLineOfApprox MakeMLBetween (const Standard_Integer Low, const Standard_Integer High, const Standard_Integer NbPointsToInsert) const;
111
36b9ff75 112 //! Dump of the current multi-line.
42cf5bc1 113 Standard_EXPORT void Dump() const;
114
42cf5bc1 115protected:
4e14c88f 116 BRepApprox_TheMultiLineOfApprox operator=(BRepApprox_TheMultiLineOfApprox&);
42cf5bc1 117
118private:
4e14c88f 119 const Standard_Address PtrOnmySvSurfaces;
120 const Handle(BRepApprox_ApproxLine) myLine;
121 const Standard_Integer indicemin;
122 const Standard_Integer indicemax;
123 const Standard_Integer nbp3d;
124 const Standard_Integer nbp2d;
125 const Standard_Boolean p2donfirst;
126 const Standard_Real Xo;
127 const Standard_Real Yo;
128 const Standard_Real Zo;
129 const Standard_Real U1o;
130 const Standard_Real V1o;
131 const Standard_Real U2o;
132 const Standard_Real V2o;
42cf5bc1 133
134};
135
42cf5bc1 136#endif // _BRepApprox_TheMultiLineOfApprox_HeaderFile