1 -- Created on: 1993-03-18
2 -- Created by: Laurent BUCHARD
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 generic class MultiLine from ApproxInt (
27 uses Array1OfPnt from TColgp,
28 Array1OfPnt2d from TColgp,
29 Array1OfVec from TColgp,
30 Array1OfVec2d from TColgp,
38 Create(line : TheLine;
39 PtrSvSurfaces : Address from Standard;
40 NbP3d : Integer from Standard;
41 NbP2d : Integer from Standard;
42 xo,ax,yo,ay,zo,az : Real from Standard;
43 u1o,a1u,v1o,a1v : Real from Standard;
44 u2o,a2u,v2o,a2v : Real from Standard;
45 P2DOnFirst : Boolean from Standard;
46 IndMin : Integer from Standard = 0;
47 IndMax : Integer from Standard = 0)
50 returns MultiLine from ApproxInt;
52 ---Purpose: The class SvSurfaces is used when the
53 -- approximation algorithm needs some extra points on
54 -- the line <line>. A New line is then created which
55 -- shares the same surfaces and functions.
57 -- SvSurfaces is a deferred class which allows
58 -- several implementations of this algorithm with
59 -- different surfaces (bi-parametric ones, or
60 -- implicit and biparametric ones)
62 Create(line : TheLine;
63 NbP3d : Integer from Standard;
64 NbP2d : Integer from Standard;
65 xo,ax,yo,ay,zo,az : Real from Standard;
66 u1o,a1u,v1o,a1v : Real from Standard;
67 u2o,a2u,v2o,a2v : Real from Standard;
68 P2DOnFirst : Boolean from Standard;
69 IndMin : Integer from Standard = 0;
70 IndMax : Integer from Standard = 0)
72 ---Purpose: No Extra points will be added on the current line
74 returns MultiLine from ApproxInt;
77 FirstPoint(me) returns Integer from Standard is static;
79 LastPoint(me) returns Integer from Standard is static;
81 NbP2d(me) returns Integer is static;
82 ---Purpose: Returns the number of 2d points of a TheLine.
85 NbP3d(me) returns Integer is static;
86 ---Purpose: Returns the number of 3d points of a TheLine.
89 WhatStatus(me) returns Status from Approx is static;
91 Value(me; MPointIndex: Integer; tabPt: out Array1OfPnt) is static;
92 ---Purpose: returns the 3d points of the multipoint <MPointIndex>
93 -- when only 3d points exist.
95 Value(me; MPointIndex: Integer;
96 tabPt2d: out Array1OfPnt2d) is static;
97 ---Purpose: returns the 2d points of the multipoint <MPointIndex>
98 -- when only 2d points exist.
100 Value(me; MPointIndex: Integer;
101 tabPt: out Array1OfPnt; tabPt2d: out Array1OfPnt2d from TColgp) is static;
102 ---Purpose: returns the 3d and 2d points of the multipoint
105 Tangency(me; MPointIndex: Integer; tabV: out Array1OfVec from TColgp)
106 returns Boolean is static;
107 ---Purpose: returns the 3d points of the multipoint <MPointIndex>
108 -- when only 3d points exist.
110 Tangency(me; MPointIndex: Integer;
111 tabV2d: out Array1OfVec2d)
112 returns Boolean is static;
113 ---Purpose: returns the 2d tangency points of the multipoint
114 -- <MPointIndex> only when 2d points exist.
116 Tangency(me; MPointIndex: Integer;
117 tabV: out Array1OfVec from TColgp; tabV2d: out Array1OfVec2d from TColgp)
118 returns Boolean is static;
119 ---Purpose: returns the 3d and 2d points of the multipoint
123 MakeMLBetween(me; Low,High,NbPointsToInsert: Integer from Standard)
124 returns MultiLine from ApproxInt is static;
126 --------------------------------------------------------------------------------
129 PtrOnmySvSurfaces : Address from Standard;
131 indicemin : Integer from Standard;
132 indicemax : Integer from Standard;
133 nbp3d : Integer from Standard;
134 nbp2d : Integer from Standard;
135 p2donfirst : Boolean from Standard;
138 --- The Points of the line <TheLine> are transformed
140 -- Modified_X = Xo + Ax * TheLine.Point().X()
141 -- Modified_Y = Yo + Ay * TheLine.Point().Y()
142 -- Modified_Z = Zo + Az * TheLine.Point().Z()
143 -- Modified_U1 = U1o + A1u * TheLine.Point().u1()
144 -- Modified_V1 = V1o + A1v * TheLine.Point().v1()
145 -- Modified_U2 = U2o + A2u * TheLine.Point().u2()
146 -- Modified_V2 = V2o + A2v * TheLine.Point().v2()
148 Xo,Ax,Yo,Ay,Zo,Az : Real from Standard;
149 U1o,A1u,V1o,A1v : Real from Standard;
150 U2o,A2u,V2o,A2v : Real from Standard;