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