0024893: CLang warnings -Wlogical-not-parentheses for gce_Done comparisons
[occt.git] / src / GCE2d / GCE2d_MakeSegment.cdl
1 -- Created on: 1992-09-28
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class MakeSegment from GCE2d inherits Root from GCE2d
18
19         ---Purpose: Implements construction algorithms for a line
20         -- segment in the plane. The result is a
21         -- Geom2d_TrimmedCurve curve.
22         -- A MakeSegment object provides a framework for:
23         -- -   defining the construction of the line segment,
24         -- -   implementing the construction algorithm, and
25         -- -   consulting the results. In particular, the Value
26         --   function returns the constructed line segment.
27         
28 uses Pnt2d        from gp,
29      Real         from Standard,
30      Lin2d        from gp,
31      Dir2d        from gp,
32      TrimmedCurve from Geom2d
33
34 raises NotDone from StdFail
35
36 is
37
38 Create(P1, P2 : Pnt2d from gp ) returns MakeSegment;
39         ---Purpose: Make a segment of Line from the 2 points <P1> and <P2>.
40         --          Status is "ConfusedPoints" if <P1> and <P2> are confused.
41
42 Create(P1 : Pnt2d from gp ;
43        V  : Dir2d from gp ;
44        P2 : Pnt2d from gp ) returns MakeSegment;
45         ---Purpose: Make a segment of Line from the point <P1> with 
46         --          the direction <P> and ended by the projection of 
47         --          <P2> on the line <P1,V>.
48         --          Status is "ConfusedPoints" if <P1> and <P2> are confused.
49         
50 Create(Line   : Lin2d  from gp       ;
51        U1, U2 : Real from Standard ) returns MakeSegment;
52         ---Purpose: Make a segment of Line from the line <Line> 
53         --          between the two parameters U1 and U2.
54         --          Status is "SameParamters" if <U1> is equal <U2>.
55
56 Create(Line   : Lin2d  from gp       ;
57        Point  : Pnt2d  from gp       ;
58        Ulast  : Real   from Standard ) returns MakeSegment;
59         ---Purpose: Make a segment of Line from the line <Line> 
60         --          between the point <Point> and the parameter Ulast.
61         --          It returns NullObject if <U1> is equal <U2>.
62
63 Create(Line  : Lin2d from gp ;
64        P1    : Pnt2d from gp ;
65        P2    : Pnt2d from gp ) returns MakeSegment;
66         ---Purpose: Make a segment of Line from the line <Line> 
67         --          between the two points <P1> and <P2>.
68         --          It returns NullObject if <P1> and <P2> are confused.
69         -- Warning
70         -- If the points which limit the segment are coincident
71         -- for given points or for the projection of given points
72         -- on the line which supports the line segment (that is,
73         -- when IsDone returns false), the Status function
74         -- returns gce_ConfusedPoints. This warning only
75         -- concerns the first two constructors.
76         
77 Value(me) returns TrimmedCurve from Geom2d
78     raises NotDone
79     is static;
80         ---C++: return const&
81         ---Purpose: Returns the constructed line segment.
82         -- Exceptions StdFail_NotDone if no line segment is constructed.
83
84 Operator(me) returns TrimmedCurve from Geom2d
85     is static;
86         ---C++: return const&
87         ---C++: alias "Standard_EXPORT operator Handle_Geom2d_TrimmedCurve() const;"
88
89 fields
90
91     TheSegment : TrimmedCurve from Geom2d;
92     --The solution from Geom2d.
93     
94 end MakeSegment;