summaryrefslogtreecommitdiff
path: root/src/IntImpParGen/IntImpParGen_Intersector.cdl
blob: 31b761f8c468108bea3f8cb03eb3883cc2f64666 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
-- File:	Intersector.cdl
-- Created:	Mon Mar  2 10:41:48 1992
-- Author:	Laurent BUCHARD
--		<lbr@phobox>
---Copyright:	 Matra Datavision 1992


generic class Intersector from IntImpParGen ( 
	 ImpTool             as any; -- as ImpTool from IntImpParGen
	 ParCurve            as any;
	 ParTool             as any; -- as ParTool from IntImpParGen(ParCurve)   
         ProjectOnPCurveTool as any) -- as ProjectOnPCurveToolGen from IntCurve

inherits Intersection from IntRes2d

      	---Purpose: Calculates all the IntersectionPoints 
      	--          and IntersectionSegments between an implicit curve
      	--          (see class ImpTool) and a parametrised curve (see class
      	--          ParTool) on their domains.
      	--          The results of the intersection are stored in the 
      	--          Intersection class from IntRes2d.
      	--          The parametrised curve has to be bounded (the domain
      	--          of this curve must verify HasFirstPoint returns True
      	--          and HasLastPoint returns True).



uses IntersectionPoint             from IntRes2d,
     IntersectionSegment           from IntRes2d,
     SequenceOfIntersectionPoint   from IntRes2d,
     SequenceOfIntersectionSegment from IntRes2d,
     Domain                        from IntRes2d, 
     Pnt2d                         from gp,
     Array1OfReal                  from TColStd  


raises ConstructionError from Standard
 

    class MyImpParTool instantiates ImpParTool from IntImpParGen(
                   ImpTool,
                   ParCurve,    
                   ParTool);



is

    Create

    	---Purpose: Empty constructor.

    	returns Intersector from IntImpParGen;


    Create ( ITool      : ImpTool;        
             Dom1       : Domain from IntRes2d;         
             PCurve     : ParCurve;        
             Dom2       : Domain from IntRes2d;
    	     TolConf,Tol: Real from Standard)
    
	---Purpose: Intersection between an implicit curve and
	--          a parametrised curve.
	--          The exception ConstructionError is raised if the domain
	--          of the parametrised curve does not verify HasFirstPoint
	--          and HasLastPoint return True.
    
    	returns Intersector       from IntImpParGen
    	raises  ConstructionError from Standard;


    Perform (me: in out;
    	     ITool      : ImpTool;        
             Dom1       : Domain from IntRes2d;         
             PCurve     : ParCurve;        
             Dom2       : Domain from IntRes2d;
    	     TolConf,Tol: Real from Standard)
    
	---Purpose: Intersection between an implicit curve and
	--          a parametrised curve.
	--          The exception ConstructionError is raised if the domain
	--          of the parametrised curve does not verify HasFirstPoint
	--          and HasLastPoint return True.
    
    
    	raises ConstructionError from Standard
	is static;	

	 FindU  (   me   ; 
	            parameter    :            Real  from  Standard  ;
    	    	    point        :  in  out   Pnt2d from  gp; 
    	    	    TheParCurev  :            ParCurve; 
    	    	    TheImpTool   :            ImpTool)
	    returns  Real  from  Standard
	    is static ; 
		 	
	    
 	 FindV  (  me ;   
	           parameter          :           Real      from  Standard ; 
    	    	   point              :  in  out  Pnt2d     from  gp  ; 
    	           TheImpTool         :           ImpTool   ;
    	           ParCurve           :           ParCurve  ; 
		   TheParCurveDomain  :           Domain    from  IntRes2d  ; 
		   V0                 :           Real      from  Standard ; 
		   V1                 :           Real      from  Standard ; 
		   Tolerance          :           Real      from  Standard )
	    returns  Real  from  Standard 
	    is static; 

	  And_Domaine_Objet1_Intersections  (  me  ; 
	           TheImpTool         :           ImpTool   ; 
		   TheParCurve        :           ParCurve  ; 
		   TheImpCurveDomain  :           Domain    from  IntRes2d  ;  
		   TheParCurveDomain  :           Domain    from  IntRes2d  ;  
		   NbResultats        :  in  out  Integer  from  Standard  ; 
    	    	   Inter2_And_Domain2 :  in  out  Array1OfReal  from  TColStd  ;
		   Inter1             :  in  out  Array1OfReal  from  TColStd  ; 
		   Resultat1          :  in  out  Array1OfReal  from  TColStd  ; 
		   Resultat2          :  in  out  Array1OfReal  from  TColStd  ;  
		   EpsNul             :           Real  from  Standard ) 
	    is static; 
		   
		   
end Intersector;