1 -- Created on: 1993-03-18
2 -- Created by: Laurent BUCHARD
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 generic class MultiLine from ApproxInt (
21 uses Array1OfPnt from TColgp,
22 Array1OfPnt2d from TColgp,
23 Array1OfVec from TColgp,
24 Array1OfVec2d from TColgp,
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)
44 returns MultiLine from ApproxInt;
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.
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)
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)
66 ---Purpose: No Extra points will be added on the current line
68 returns MultiLine from ApproxInt;
71 FirstPoint(me) returns Integer from Standard is static;
73 LastPoint(me) returns Integer from Standard is static;
75 NbP2d(me) returns Integer is static;
76 ---Purpose: Returns the number of 2d points of a TheLine.
79 NbP3d(me) returns Integer is static;
80 ---Purpose: Returns the number of 3d points of a TheLine.
83 WhatStatus(me) returns Status from Approx is static;
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.
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.
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
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.
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.
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
117 MakeMLBetween(me; Low,High,NbPointsToInsert: Integer from Standard)
118 returns MultiLine from ApproxInt is static;
121 ---Purpose: Dump of the current multi-line.
123 --------------------------------------------------------------------------------
126 PtrOnmySvSurfaces : Address from Standard;
128 indicemin : Integer from Standard;
129 indicemax : Integer from Standard;
130 nbp3d : Integer from Standard;
131 nbp2d : Integer from Standard;
132 p2donfirst : Boolean from Standard;
135 --- The Points of the line <TheLine> are transformed
137 -- Modified_X = Xo + Ax * TheLine.Point().X()
138 -- Modified_Y = Yo + Ay * TheLine.Point().Y()
139 -- Modified_Z = Zo + Az * TheLine.Point().Z()
140 -- Modified_U1 = U1o + A1u * TheLine.Point().u1()
141 -- Modified_V1 = V1o + A1v * TheLine.Point().v1()
142 -- Modified_U2 = U2o + A2u * TheLine.Point().u2()
143 -- Modified_V2 = V2o + A2v * TheLine.Point().v2()
145 Xo,Ax,Yo,Ay,Zo,Az : Real from Standard;
146 U1o,A1u,V1o,A1v : Real from Standard;
147 U2o,A2u,V2o,A2v : Real from Standard;