Salome HOME
a3a4d15d2052435bf1535bfdae100fed2ecdda96
[modules/geom.git] / src / PARTITION / Partition_Inter2d.cdl
1 --  GEOM PARTITION : partition algorithm
2 --
3 --  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 --  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 -- 
6 --  This library is free software; you can redistribute it and/or 
7 --  modify it under the terms of the GNU Lesser General Public 
8 --  License as published by the Free Software Foundation; either 
9 --  version 2.1 of the License. 
10 -- 
11 --  This library is distributed in the hope that it will be useful, 
12 --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 --  Lesser General Public License for more details. 
15 -- 
16 --  You should have received a copy of the GNU Lesser General Public 
17 --  License along with this library; if not, write to the Free Software 
18 --  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 -- 
20 --  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 --
22 --
23 --
24 --  File   : Partition_Inter2d.cdl
25 --  Author : Benedicte MARTIN
26 --  Module : GEOM
27
28 class Inter2d from Partition 
29
30         ---Purpose: Computes the intersections between edges on a face
31         --          stores result is SD as AsDes from BRepAlgo.
32
33 uses
34     AsDes               from BRepAlgo,
35     Edge                from TopoDS,
36     Face                from TopoDS,
37     Vertex              from TopoDS,
38     MapOfShape          from TopTools,
39     Real                from Standard,
40     ListOfShape         from TopTools
41
42 is
43     CompletPart2d(myclass ; AsDes : mutable AsDes from BRepAlgo;
44                             F     :         Face  from TopoDS;
45                             NewEdges :      MapOfShape from TopTools);
46                       
47         ---Purpose: Computes the intersections between the edges stored
48         --          is AsDes as descendants of <F> . Intersections is computed
49         --          between two edges if one of them is bound in NewEdges.
50
51
52     FindEndVertex(myclass; VertList : ListOfShape from TopTools;
53                            f,l      : Real        from Standard;
54                            E        : Edge        from TopoDS;
55                            First    : out Boolean from Standard;
56                            DU       : out Real    from Standard)
57         returns Vertex from TopoDS;
58     ---Purpose: Returns a vertex  from  <VertList> having parameter on
59     --          <E> most close  to  <f>  or  <l>.  <First>  is True if
60     --          found vertex is closer  to <f>. <DU> returns parameter
61     --          difference.
62     
63     AddVonE(myclass; V : Vertex from TopoDS;
64                      E1,E2 : Edge from TopoDS;
65                      AsDes : mutable AsDes from BRepAlgo)
66         returns Vertex from TopoDS;
67         ---Purpose: Put V in AsDes as intersection of E1 and E2.
68         --          Check that vertex equal to V already exists on one
69         --          of edges, in  such  a  case,  V  is  not added but
70         --          existing vertex is updated to  be on E1 and E2 and
71         --          is returned insead of V. 
72
73 end Inter2d;
74