1 -- Created on: 1993-01-20
2 -- Created by: Laurent PAINNOT
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class MyLineTool from AppDef
18 ---Purpose: example of MultiLine tool corresponding to the tools of the packages
19 -- AppParCurves and Approx. For Approx, the tool will not addd points
20 -- if the algorithms want some.
22 uses MultiLine from AppDef,
27 Array1OfPnt from TColgp,
28 Array1OfPnt2d from TColgp,
29 Array1OfVec from TColgp,
30 Array1OfVec2d from TColgp,
36 FirstPoint(myclass; ML: MultiLine) returns Integer;
37 ---Purpose: Returns the first index of multipoints of the MultiLine.
40 LastPoint(myclass; ML: MultiLine) returns Integer;
41 ---Purpose: Returns the last index of multipoints of the MultiLine.
45 NbP2d(myclass; ML: MultiLine) returns Integer;
46 ---Purpose: Returns the number of 2d points of a MultiLine.
49 NbP3d(myclass; ML: MultiLine) returns Integer;
50 ---Purpose: Returns the number of 3d points of a MultiLine.
53 Value(myclass; ML: MultiLine; MPointIndex: Integer;
54 tabPt: out Array1OfPnt);
55 ---Purpose: returns the 3d points of the multipoint <MPointIndex>
56 -- when only 3d points exist.
59 Value(myclass; ML: MultiLine; MPointIndex: Integer;
60 tabPt2d: out Array1OfPnt2d);
61 ---Purpose: returns the 2d points of the multipoint <MPointIndex>
62 -- when only 2d points exist.
65 Value(myclass; ML: MultiLine; MPointIndex: Integer;
66 tabPt: out Array1OfPnt; tabPt2d: out Array1OfPnt2d);
67 ---Purpose: returns the 3d and 2d points of the multipoint
71 Tangency(myclass; ML: MultiLine; MPointIndex: Integer;
72 tabV: out Array1OfVec) returns Boolean;
73 ---Purpose: returns the 3d points of the multipoint <MPointIndex>
74 -- when only 3d points exist.
77 Tangency(myclass; ML: MultiLine; MPointIndex: Integer;
78 tabV2d: out Array1OfVec2d) returns Boolean;
79 ---Purpose: returns the 2d tangency points of the multipoint
80 -- <MPointIndex> only when 2d points exist.
83 Tangency(myclass; ML: MultiLine; MPointIndex: Integer;
84 tabV: out Array1OfVec; tabV2d: out Array1OfVec2d)
86 ---Purpose: returns the 3d and 2d points of the multipoint
90 Curvature(myclass; ML: MultiLine; MPointIndex: Integer;
91 tabV: out Array1OfVec) returns Boolean;
92 ---Purpose: returns the 3d curvatures of the multipoint <MPointIndex>
93 -- when only 3d points exist.
96 Curvature(myclass; ML: MultiLine; MPointIndex: Integer;
97 tabV2d: out Array1OfVec2d) returns Boolean;
98 ---Purpose: returns the 2d curvatures of the multipoint
99 -- <MPointIndex> only when 2d points exist.
102 Curvature(myclass; ML: MultiLine; MPointIndex: Integer;
103 tabV: out Array1OfVec; tabV2d: out Array1OfVec2d)
105 ---Purpose: returns the 3d and 2d curvatures of the multipoint
110 WhatStatus(myclass; ML: MultiLine; I1, I2: Integer)
111 returns Status from Approx;
112 ---Purpose: returns NoPointsAdded
114 MakeMLBetween(myclass; ML: MultiLine; I1, I2: Integer;
117 ---Purpose: Is never called in the algorithms.