1 -- Created on: 1991-04-03
2 -- Created by: Remi GILET
3 -- Copyright (c) 1991-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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
21 ---Purpose: This class implements the algorithms used to create 2d
22 -- line tangent to a circle or a point and parallel to
24 -- The solution has the same orientation as the
26 -- Describes functions for building a 2D line parallel to a line and:
27 -- - tangential to a circle, or
28 -- - passing through a point.
29 -- A Lin2dTanPar object provides a framework for:
30 -- - defining the construction of 2D line(s),
31 -- - implementing the construction algorithm, and consulting the result(s).
35 QualifiedCirc from GccEnt,
36 Array1OfReal from TColStd,
37 Array1OfLin2d from TColgp,
38 Array1OfPnt2d from TColgp,
40 Array1OfPosition from GccEnt
42 raises OutOfRange from Standard,
43 BadQualifier from GccEnt,
48 Create (ThePoint : Pnt2d from gp;
49 Lin1 : Lin2d from gp) returns Lin2dTanPar;
50 ---Purpose: This method implements the algorithms used to create a 2d
51 -- line passing through a point and parallel to
54 Create (Qualified1 : QualifiedCirc from GccEnt;
55 Lin1 : Lin2d from gp ) returns Lin2dTanPar
57 ---Purpose: This method implements the algorithms used to create a 2d
58 -- line tangent to a circle and parallel to another line.
59 -- It raises BadQualifier in case of EnclosedCirc.
61 -- GccEnt_BadQualifier if a qualifier is inconsistent with
62 -- the argument it qualifies (for example, enclosed for a circle).
65 IsDone(me) returns Boolean from Standard
67 ---Purpose : Returns True if the algorithm succeeded.
69 NbSolutions(me) returns Integer from Standard
70 ---Purpose : Returns the number of solutions.
71 -- Raises NotDone if the construction algorithm didn't succeed.
76 Index : Integer from Standard) returns Lin2d
77 ---Purpose : Returns the solution number Index and raises OutOfRange
78 -- exception if Index is greater than the number of solutions.
79 -- Be careful: the Index is only a way to get all the
80 -- solutions, but is not associated to those outside the
81 -- context of the algorithm-object.
82 -- raises NotDone if the construction algorithm
84 -- It raises OutOfRange if Index is greater than the
85 -- number of solutions.
87 raises OutOfRange, NotDone
91 Index : Integer from Standard;
92 Qualif1 : out Position from GccEnt )
93 raises OutOfRange, NotDone
95 ---Purpose: Returns the informations about the qualifiers of the
96 -- tangency arguments concerning the solution number Index.
97 -- It returns the real qualifiers (the qualifiers given to the
98 -- constructor method in case of enclosed, enclosing and outside
99 -- and the qualifiers computed in case of unqualified).
100 -- Raises NotDone if the construction algorithm
102 -- It raises OutOfRange if Index is greater than the
103 -- number of solutions.
106 Index : Integer from Standard;
107 ParSol,ParArg : out Real from Standard;
108 Pnt : out Pnt2d from gp )
109 ---Purpose : Returns informations about the tangency point between the
110 -- result number Index and the first argument.
111 -- ParSol is the intrinsic parameter of the point on the
113 -- ParArg is the intrinsic parameter of the point on the
115 -- ParArg is equal 0 when the solution is passing thrue
116 -- a point. Raises NotDone if the construction algorithm
118 -- It raises OutOfRange if Index is greater than the
119 -- number of solutions.
120 raises OutOfRange, NotDone
125 WellDone : Boolean from Standard;
126 ---Purpose: True if the algorithm succeeded.
128 NbrSol : Integer from Standard;
129 ---Purpose : The number of possible solutions. We have to decide
130 -- about the status of the multiple solutions...
132 linsol : Array1OfLin2d from TColgp;
133 ---Purpose: The solutions.
135 qualifier1 : Array1OfPosition from GccEnt;
136 ---Purpose: The qualifiers of the first argument.
138 pnttg1sol : Array1OfPnt2d from TColgp;
139 ---Purpose: The tangency point between the solution and the
140 -- first argument on the solution.
142 par1sol : Array1OfReal from TColStd;
143 ---Purpose: The parameter of the tangency point between the
144 -- solution and the first argument on the solution.
146 pararg1 : Array1OfReal from TColStd;
147 ---Purpose: The parameter of the tangency point between the
148 -- solution and the first argument on the first argument.