b311480e |
1 | -- Created on: 1992-03-02 |
2 | -- Created by: Laurent BUCHARD |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | |
23 | generic class Intersector from IntImpParGen ( |
24 | ImpTool as any; -- as ImpTool from IntImpParGen |
25 | ParCurve as any; |
26 | ParTool as any; -- as ParTool from IntImpParGen(ParCurve) |
27 | ProjectOnPCurveTool as any) -- as ProjectOnPCurveToolGen from IntCurve |
28 | |
29 | inherits Intersection from IntRes2d |
30 | |
31 | ---Purpose: Calculates all the IntersectionPoints |
32 | -- and IntersectionSegments between an implicit curve |
33 | -- (see class ImpTool) and a parametrised curve (see class |
34 | -- ParTool) on their domains. |
35 | -- The results of the intersection are stored in the |
36 | -- Intersection class from IntRes2d. |
37 | -- The parametrised curve has to be bounded (the domain |
38 | -- of this curve must verify HasFirstPoint returns True |
39 | -- and HasLastPoint returns True). |
40 | |
41 | |
42 | |
43 | uses IntersectionPoint from IntRes2d, |
44 | IntersectionSegment from IntRes2d, |
45 | SequenceOfIntersectionPoint from IntRes2d, |
46 | SequenceOfIntersectionSegment from IntRes2d, |
47 | Domain from IntRes2d, |
48 | Pnt2d from gp, |
49 | Array1OfReal from TColStd |
50 | |
51 | |
52 | raises ConstructionError from Standard |
53 | |
54 | |
55 | class MyImpParTool instantiates ImpParTool from IntImpParGen( |
56 | ImpTool, |
57 | ParCurve, |
58 | ParTool); |
59 | |
60 | |
61 | |
62 | is |
63 | |
64 | Create |
65 | |
66 | ---Purpose: Empty constructor. |
67 | |
68 | returns Intersector from IntImpParGen; |
69 | |
70 | |
71 | Create ( ITool : ImpTool; |
72 | Dom1 : Domain from IntRes2d; |
73 | PCurve : ParCurve; |
74 | Dom2 : Domain from IntRes2d; |
75 | TolConf,Tol: Real from Standard) |
76 | |
77 | ---Purpose: Intersection between an implicit curve and |
78 | -- a parametrised curve. |
79 | -- The exception ConstructionError is raised if the domain |
80 | -- of the parametrised curve does not verify HasFirstPoint |
81 | -- and HasLastPoint return True. |
82 | |
83 | returns Intersector from IntImpParGen |
84 | raises ConstructionError from Standard; |
85 | |
86 | |
87 | Perform (me: in out; |
88 | ITool : ImpTool; |
89 | Dom1 : Domain from IntRes2d; |
90 | PCurve : ParCurve; |
91 | Dom2 : Domain from IntRes2d; |
92 | TolConf,Tol: Real from Standard) |
93 | |
94 | ---Purpose: Intersection between an implicit curve and |
95 | -- a parametrised curve. |
96 | -- The exception ConstructionError is raised if the domain |
97 | -- of the parametrised curve does not verify HasFirstPoint |
98 | -- and HasLastPoint return True. |
99 | |
100 | |
101 | raises ConstructionError from Standard |
102 | is static; |
103 | |
104 | FindU ( me ; |
105 | parameter : Real from Standard ; |
106 | point : in out Pnt2d from gp; |
107 | TheParCurev : ParCurve; |
108 | TheImpTool : ImpTool) |
109 | returns Real from Standard |
110 | is static ; |
111 | |
112 | |
113 | FindV ( me ; |
114 | parameter : Real from Standard ; |
115 | point : in out Pnt2d from gp ; |
116 | TheImpTool : ImpTool ; |
117 | ParCurve : ParCurve ; |
118 | TheParCurveDomain : Domain from IntRes2d ; |
119 | V0 : Real from Standard ; |
120 | V1 : Real from Standard ; |
121 | Tolerance : Real from Standard ) |
122 | returns Real from Standard |
123 | is static; |
124 | |
125 | And_Domaine_Objet1_Intersections ( me ; |
126 | TheImpTool : ImpTool ; |
127 | TheParCurve : ParCurve ; |
128 | TheImpCurveDomain : Domain from IntRes2d ; |
129 | TheParCurveDomain : Domain from IntRes2d ; |
130 | NbResultats : in out Integer from Standard ; |
131 | Inter2_And_Domain2 : in out Array1OfReal from TColStd ; |
132 | Inter1 : in out Array1OfReal from TColStd ; |
133 | Resultat1 : in out Array1OfReal from TColStd ; |
134 | Resultat2 : in out Array1OfReal from TColStd ; |
135 | EpsNul : Real from Standard ) |
136 | is static; |
137 | |
138 | |
139 | end Intersector; |
140 | |
141 | |
142 | |
143 | |
144 | |
145 | |