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