1 -- Created on: 1995-09-12
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1995-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.
17 class IntCS from GeomAPI
19 ---Purpose: This class implements methods for
20 -- computing intersection points and segments between a
21 --3D curve and a surface.
22 -- It intersects a Curve and a Surface from Geom. The
23 -- result is a set of points and segments with their
24 -- parameters on the curve and the surface. The
25 -- "domain" used for a surface is the natural
26 -- parametric domain unless the surface is a
27 -- RectangularTrimmedSurface from Geom.
30 Parameter from Quantity,
34 HInter from IntCurveSurface
40 OutOfRange from Standard
44 Create returns IntCS from GeomAPI;
46 ---Purpose: Creates an empty object. Use the
47 -- function Perform for further initialization of the algorithm by
48 -- the curve and the surface.
50 Create(C : Curve from Geom; S : Surface from Geom)
51 returns IntCS from GeomAPI;
52 ---Purpose: Computes the intersections between
53 -- the curve C and the surface S.
55 -- Use function IsDone to verify that the intersections are computed successfully.
57 Perform(me : in out; C : Curve from Geom; S : Surface from Geom);
58 ---Purpose: This function Initializes an algorithm with the curve C and the
59 -- surface S and computes the intersections between C and S.
61 -- Use function IsDone to verify that the intersections are computed successfully.
64 ---Purpose: Returns true if the intersections are successfully computed.
65 returns Boolean from Standard;
68 ---Purpose: Returns the number of Intersection Points
69 -- if IsDone returns True.
70 -- else NotDone is raised.
71 returns Integer from Standard
72 raises NotDone from StdFail;
74 Point(me; Index: Integer from Standard)
75 ---Purpose: Returns the Intersection Point of range <Index>in case of cross intersection.
76 -- Raises NotDone if the computation has failed or if
77 -- the computation has not been done
78 -- raises OutOfRange if Index is not in the range <1..NbPoints>
79 ---C++: return const &
81 raises NotDone from StdFail,
82 OutOfRange from Standard;
84 Parameters(me; Index: Integer from Standard;
85 U,V,W : out Parameter from Quantity)
86 ---Purpose: Returns parameter W on the curve
87 -- and (parameters U,V) on the surface of the computed intersection point
88 -- of index Index in case of cross intersection.
90 -- StdFail_NotDone if intersection algorithm fails or is not initialized.
91 -- Standard_OutOfRange if Index is not in the range [ 1,NbPoints ], where
92 -- NbPoints is the number of computed intersection points.
94 raises NotDone from StdFail,
95 OutOfRange from Standard;
98 ---Purpose: Returns the number of computed
99 -- intersection segments in case of tangential intersection.
101 -- StdFail_NotDone if the intersection algorithm fails or is not initialized.
102 returns Integer from Standard
103 raises NotDone from StdFail
106 Segment(me; Index: Integer from Standard)
107 ---Purpose: Returns the computed intersection
108 -- segment of index Index in case of tangential intersection.
109 -- Intersection segment is a portion of the initial curve tangent to surface.
111 -- StdFail_NotDone if intersection algorithm fails or is not initialized.
112 -- Standard_OutOfRange if Index is not in the range [ 1,NbSegments ],
113 -- where NbSegments is the number of computed intersection segments.
115 returns Curve from Geom
116 raises NotDone from StdFail,
117 OutOfRange from Standard;
120 Parameters(me; Index : Integer from Standard;
121 U1,V1, U2, V2 : out Parameter from Quantity)
123 ---Purpose: Returns the parameters of the first (U1,V1) and the last (U2,V2) points
124 -- of curve's segment on the surface in case of tangential intersection.
125 -- Index is the number of computed intersection segments.
127 -- StdFail_NotDone if intersection algorithm fails or is not initialized.
128 -- Standard_OutOfRange if Index is not in the range [ 1,NbSegments ],
129 -- where NbSegments is the number of computed intersection segments.
131 raises NotDone from StdFail,
132 OutOfRange from Standard;
136 myCurve : Curve from Geom;
137 myIntCS : HInter from IntCurveSurface;