b311480e |
1 | -- Created on: 1993-01-20 |
2 | -- Created by: Laurent PAINNOT |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class MyLineTool from AppDef |
ff8178ef |
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. |
7fd59977 |
21 | |
22 | uses MultiLine from AppDef, |
23 | Pnt from gp, |
24 | Pnt2d from gp, |
25 | Vec from gp, |
26 | Vec2d from gp, |
27 | Array1OfPnt from TColgp, |
28 | Array1OfPnt2d from TColgp, |
29 | Array1OfVec from TColgp, |
30 | Array1OfVec2d from TColgp, |
31 | Status from Approx |
32 | |
33 | is |
34 | |
35 | |
36 | FirstPoint(myclass; ML: MultiLine) returns Integer; |
37 | ---Purpose: Returns the first index of multipoints of the MultiLine. |
38 | |
39 | |
40 | LastPoint(myclass; ML: MultiLine) returns Integer; |
41 | ---Purpose: Returns the last index of multipoints of the MultiLine. |
42 | |
43 | |
44 | |
45 | NbP2d(myclass; ML: MultiLine) returns Integer; |
46 | ---Purpose: Returns the number of 2d points of a MultiLine. |
47 | |
48 | |
49 | NbP3d(myclass; ML: MultiLine) returns Integer; |
50 | ---Purpose: Returns the number of 3d points of a MultiLine. |
51 | |
52 | |
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. |
57 | |
58 | |
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. |
63 | |
64 | |
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 |
68 | -- <MPointIndex>. |
69 | |
70 | |
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. |
75 | |
76 | |
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. |
81 | |
82 | |
83 | Tangency(myclass; ML: MultiLine; MPointIndex: Integer; |
84 | tabV: out Array1OfVec; tabV2d: out Array1OfVec2d) |
85 | returns Boolean; |
86 | ---Purpose: returns the 3d and 2d points of the multipoint |
87 | -- <MPointIndex>. |
88 | |
89 | |
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. |
94 | |
95 | |
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. |
100 | |
101 | |
102 | Curvature(myclass; ML: MultiLine; MPointIndex: Integer; |
103 | tabV: out Array1OfVec; tabV2d: out Array1OfVec2d) |
104 | returns Boolean; |
105 | ---Purpose: returns the 3d and 2d curvatures of the multipoint |
106 | -- <MPointIndex>. |
107 | |
108 | |
109 | |
110 | WhatStatus(myclass; ML: MultiLine; I1, I2: Integer) |
111 | returns Status from Approx; |
112 | ---Purpose: returns NoPointsAdded |
113 | |
114 | MakeMLBetween(myclass; ML: MultiLine; I1, I2: Integer; |
115 | NbPMin: Integer) |
116 | returns MultiLine; |
117 | ---Purpose: Is never called in the algorithms. |
118 | -- Nothing is done. |
119 | ---C++: return & |
120 | |
121 | |
122 | end MyLineTool; |