b311480e |
1 | -- Created on: 1993-03-18 |
2 | -- Created by: Laurent BUCHARD |
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 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public 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. |
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 | generic class MultiLine from ApproxInt ( |
18 | TheLine as Transient; |
19 | TheSvSurfaces as any) |
20 | |
21 | uses Array1OfPnt from TColgp, |
22 | Array1OfPnt2d from TColgp, |
23 | Array1OfVec from TColgp, |
24 | Array1OfVec2d from TColgp, |
25 | Status from Approx, |
26 | Trsf from gp, |
27 | Trsf2d from gp |
28 | |
29 | |
30 | is |
31 | |
32 | Create(line : TheLine; |
33 | PtrSvSurfaces : Address from Standard; |
34 | NbP3d : Integer from Standard; |
35 | NbP2d : Integer from Standard; |
36 | xo,ax,yo,ay,zo,az : Real from Standard; |
37 | u1o,a1u,v1o,a1v : Real from Standard; |
38 | u2o,a2u,v2o,a2v : Real from Standard; |
39 | P2DOnFirst : Boolean from Standard; |
40 | IndMin : Integer from Standard = 0; |
41 | IndMax : Integer from Standard = 0) |
42 | |
43 | |
44 | returns MultiLine from ApproxInt; |
45 | |
46 | ---Purpose: The class SvSurfaces is used when the |
47 | -- approximation algorithm needs some extra points on |
48 | -- the line <line>. A New line is then created which |
49 | -- shares the same surfaces and functions. |
50 | -- |
51 | -- SvSurfaces is a deferred class which allows |
52 | -- several implementations of this algorithm with |
53 | -- different surfaces (bi-parametric ones, or |
54 | -- implicit and biparametric ones) |
55 | |
56 | Create(line : TheLine; |
57 | NbP3d : Integer from Standard; |
58 | NbP2d : Integer from Standard; |
59 | xo,ax,yo,ay,zo,az : Real from Standard; |
60 | u1o,a1u,v1o,a1v : Real from Standard; |
61 | u2o,a2u,v2o,a2v : Real from Standard; |
62 | P2DOnFirst : Boolean from Standard; |
63 | IndMin : Integer from Standard = 0; |
64 | IndMax : Integer from Standard = 0) |
65 | |
66 | ---Purpose: No Extra points will be added on the current line |
67 | -- |
68 | returns MultiLine from ApproxInt; |
69 | |
70 | |
71 | FirstPoint(me) returns Integer from Standard is static; |
72 | |
73 | LastPoint(me) returns Integer from Standard is static; |
74 | |
75 | NbP2d(me) returns Integer is static; |
76 | ---Purpose: Returns the number of 2d points of a TheLine. |
77 | -- |
78 | |
79 | NbP3d(me) returns Integer is static; |
80 | ---Purpose: Returns the number of 3d points of a TheLine. |
81 | -- |
82 | |
83 | WhatStatus(me) returns Status from Approx is static; |
84 | |
85 | Value(me; MPointIndex: Integer; tabPt: out Array1OfPnt) is static; |
86 | ---Purpose: returns the 3d points of the multipoint <MPointIndex> |
87 | -- when only 3d points exist. |
88 | |
89 | Value(me; MPointIndex: Integer; |
90 | tabPt2d: out Array1OfPnt2d) is static; |
91 | ---Purpose: returns the 2d points of the multipoint <MPointIndex> |
92 | -- when only 2d points exist. |
93 | |
94 | Value(me; MPointIndex: Integer; |
95 | tabPt: out Array1OfPnt; tabPt2d: out Array1OfPnt2d from TColgp) is static; |
96 | ---Purpose: returns the 3d and 2d points of the multipoint |
97 | -- <MPointIndex>. |
98 | |
99 | Tangency(me; MPointIndex: Integer; tabV: out Array1OfVec from TColgp) |
100 | returns Boolean is static; |
101 | ---Purpose: returns the 3d points of the multipoint <MPointIndex> |
102 | -- when only 3d points exist. |
103 | |
104 | Tangency(me; MPointIndex: Integer; |
105 | tabV2d: out Array1OfVec2d) |
106 | returns Boolean is static; |
107 | ---Purpose: returns the 2d tangency points of the multipoint |
108 | -- <MPointIndex> only when 2d points exist. |
109 | |
110 | Tangency(me; MPointIndex: Integer; |
111 | tabV: out Array1OfVec from TColgp; tabV2d: out Array1OfVec2d from TColgp) |
112 | returns Boolean is static; |
113 | ---Purpose: returns the 3d and 2d points of the multipoint |
114 | -- <MPointIndex>. |
115 | -- |
116 | |
117 | MakeMLBetween(me; Low,High,NbPointsToInsert: Integer from Standard) |
118 | returns MultiLine from ApproxInt is static; |
119 | |
120 | -------------------------------------------------------------------------------- |
121 | |
122 | fields |
123 | PtrOnmySvSurfaces : Address from Standard; |
124 | myLine : TheLine; |
125 | indicemin : Integer from Standard; |
126 | indicemax : Integer from Standard; |
127 | nbp3d : Integer from Standard; |
128 | nbp2d : Integer from Standard; |
129 | p2donfirst : Boolean from Standard; |
130 | |
131 | |
132 | --- The Points of the line <TheLine> are transformed |
133 | -- as follow : |
134 | -- Modified_X = Xo + Ax * TheLine.Point().X() |
135 | -- Modified_Y = Yo + Ay * TheLine.Point().Y() |
136 | -- Modified_Z = Zo + Az * TheLine.Point().Z() |
137 | -- Modified_U1 = U1o + A1u * TheLine.Point().u1() |
138 | -- Modified_V1 = V1o + A1v * TheLine.Point().v1() |
139 | -- Modified_U2 = U2o + A2u * TheLine.Point().u2() |
140 | -- Modified_V2 = V2o + A2v * TheLine.Point().v2() |
141 | |
142 | Xo,Ax,Yo,Ay,Zo,Az : Real from Standard; |
143 | U1o,A1u,V1o,A1v : Real from Standard; |
144 | U2o,A2u,V2o,A2v : Real from Standard; |
145 | |
146 | end MultiLine; |
147 | |
148 | |