Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IntPoly / IntPoly_ShapeSection.cdl
1 -- File:        IntPoly_ShapeSection.cdl
2 -- Created:     Tue Aug  1 09:14:30 1995
3 -- Author:      Stagiaire Alain JOURDAIN
4 --              <ajo@phobox>
5 ---Copyright:    Matra Datavision 1995
6
7
8 class ShapeSection from IntPoly
9
10   ---Purpose: determines the section between 2 triangulated shapes.
11   --          The section is a set of edges.
12
13 uses  Real                    from Standard,
14       Integer                 from Standard,
15       Boolean                 from Standard,
16       Shape                   from TopoDS,
17       Edge                    from TopoDS,
18       Vec                     from gp,
19       Pnt                     from gp,
20       SequenceOfPnt           from TColgp,
21       SequenceOfSequenceOfPnt from IntPoly,
22       IndexedMapOfPnt         from IntPoly,
23       PntHasher               from IntPoly
24
25 is    Create
26       returns ShapeSection from IntPoly;
27       
28       Create (S1 : Shape from TopoDS;
29               S2 : Shape from TopoDS)
30       returns ShapeSection from IntPoly;
31       
32       Section (me : in out)
33       is static;
34       
35       Explore (me : in out)
36       is static;
37       
38       Intersect (me : in out; S1,S2,S3      :        Pnt  from gp;
39                               OS1,VS0,V1,V2 :        Vec  from gp;
40                               h1,h2,ah1,ah2 : in out Real from Standard)
41       ---Purpose: determines if it exists, the intersection point between 
42       --          the (S1,S2,S3) triangle and the edge pointed by V1 and V2.
43       --          Returns True if the triangle-triangle section is found.
44       returns Boolean from Standard;
45       
46       IsEqual (me : in out; Pt1,Pt2 : Pnt from gp)
47       returns Boolean from Standard;                        
48
49        IsInside (me : in out; P,P1,P2,P3 : Pnt from gp;
50                               N0         : Vec from gp)
51       ---Purpose: returns True if P is inside the (P1,P2,P3) triangle
52       --          N0 = P1P2 ^ P1P3
53       returns Boolean from Standard;                        
54
55       InsertInMap (me : in out)
56       ---Purpose: adds if necessary, myBegPoint in myMapBegPoint 
57       --          and myEndPoint in  myMapEndPoint. 
58       is static;
59
60       Insert (me : in out; OldPnt : Pnt from gp;
61                            ComPnt : Pnt from gp;
62                            NewPnt : Pnt from gp)
63       ---Purpose: sees whether OldPnt and NewPnt begins or ends a section
64       --          created before and adds the 2 others points.
65       --          If not, creates a section
66       is static;
67       
68       Concat (me : in out; BegPnt :     Pnt from gp;
69                            EndPnt :     Pnt from gp;
70                            OutPnt : out Pnt from gp)
71       ---Purpose: sees whether BegPnt or EndPnt begins or ends a section
72       --          created before, and returns the other point to continue 
73       --          the construction
74       --          Returns 2 if the construction is 'Forward'
75       --          Returns 1 if the construction is 'Previous'
76       --          Returns 0 if not and creates a section
77       returns Integer from Standard;
78       
79       ConcatSection (me : in out; Section   : in out SequenceOfPnt from TColgp; 
80                                   NbSection :        Integer       from Standard;
81                                   Index     :        Integer       from Standard)
82       ---Purpose: sees whether Section begins or ends another one in  mySection,
83       --          from the rank 'Index' to the last one 'NbSection'
84       is static;
85       
86       ForwConstruction (me : in out; Point : Pnt from gp)
87       ---Purpose: builds a section from Point in this way  
88       --                       ___   ___   ___   ___
89       --               Point--/__/--/__/--/__/--/__/--->
90       is static;
91
92       PrevConstruction (me : in out; Point : Pnt from gp)
93       ---Purpose: builds a section from Point in this way  
94       --                    ___   ___   ___   ___
95       --               <---/__/--/__/--/__/--/__/--Point
96        is static;
97
98       NbEdges (me : in out)
99       returns Integer from Standard;
100       
101       Edge (me : in out; Index : Integer from Standard)
102       ---Purpose: builds an edge from a sequence of Pnt
103       --          this is a part of the whole section
104       returns Edge from TopoDS;
105
106
107 fields
108       myShape1       : Shape                   from TopoDS;
109       myShape2       : Shape                   from TopoDS;
110       mySection      : SequenceOfSequenceOfPnt from IntPoly;
111       myMapBegPoints : IndexedMapOfPnt         from IntPoly;
112       myMapEndPoints : IndexedMapOfPnt         from IntPoly;
113       myBegPoint     : Pnt                     from gp;
114       myEndPoint     : Pnt                     from gp;
115       myFirstTime    : Boolean                 from Standard;
116       myCpt          : Integer                 from Standard;
117       myIndex        : Integer                 from Standard;
118       myNbEdges      : Integer                 from Standard;
119
120 end ShapeSection;
121