1 -- Created on: 1992-09-28
2 -- Created by: Remi GILET
3 -- Copyright (c) 1992-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.
22 class MakeSegment from GC inherits Root from GC
24 --- Purpose: Implements construction algorithms for a line
25 -- segment in 3D space. The result is a Geom_TrimmedCurve curve.
26 -- A MakeSegment object provides a framework for:
27 -- - defining the construction of the line segment,
28 -- - implementing the construction algorithm, and
29 -- - consulting the results. In particular, the Value
30 -- function returns the constructed line segment.
35 TrimmedCurve from Geom
37 raises NotDone from StdFail
41 Create(P1, P2 : Pnt from gp ) returns MakeSegment;
42 ---Purpose: Make a segment of Line from the 2 points <P1> and <P2>.
43 -- It returns NullObject if <P1> and <P2> are confused.
45 Create(Line : Lin from gp ;
46 U1, U2 : Real from Standard ) returns MakeSegment;
47 ---Purpose: Make a segment of Line from the line <Line1>
48 -- between the two parameters U1 and U2.
49 -- It returns NullObject if <U1> is equal <U2>.
51 Create(Line : Lin from gp ;
53 Ulast : Real from Standard ) returns MakeSegment;
54 ---Purpose: Make a segment of Line from the line <Line1>
55 -- between the point <Point> and the parameter Ulast.
56 -- It returns NullObject if <U1> is equal <U2>.
58 Create(Line : Lin from gp ;
60 P2 : Pnt from gp ) returns MakeSegment;
61 ---Purpose: Make a segment of Line from the line <Line1>
62 -- between the two points <P1> and <P2>.
63 -- It returns NullObject if <U1> is equal <U2>.
65 Value(me) returns TrimmedCurve from Geom
68 ---Purpose: Returns the constructed line segment.
71 Operator(me) returns TrimmedCurve from Geom
74 ---C++: alias "Standard_EXPORT operator Handle_Geom_TrimmedCurve() const;"
78 TheSegment : TrimmedCurve from Geom;
79 --The solution from Geom.