Salome HOME
Update copyright information
[modules/geom.git] / src / PARTITION / Partition_Inter2d.cdl
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 --  GEOM PARTITION : partition algorithm
21 --
22 --  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
23 --  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
24 -- 
25 --  This library is free software; you can redistribute it and/or 
26 --  modify it under the terms of the GNU Lesser General Public 
27 --  License as published by the Free Software Foundation; either 
28 --  version 2.1 of the License. 
29 -- 
30 --  This library is distributed in the hope that it will be useful, 
31 --  but WITHOUT ANY WARRANTY; without even the implied warranty of 
32 --  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
33 --  Lesser General Public License for more details. 
34 -- 
35 --  You should have received a copy of the GNU Lesser General Public 
36 --  License along with this library; if not, write to the Free Software 
37 --  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
38 -- 
39 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
40 --
41 --
42 --
43 --  File   : Partition_Inter2d.cdl
44 --  Author : Benedicte MARTIN
45 --  Module : GEOM
46
47 class Inter2d from Partition 
48
49         ---Purpose: Computes the intersections between edges on a face
50         --          stores result is SD as AsDes from BRepAlgo.
51
52 uses
53     AsDes               from BRepAlgo,
54     Edge                from TopoDS,
55     Face                from TopoDS,
56     Vertex              from TopoDS,
57     MapOfShape          from TopTools,
58     Real                from Standard,
59     ListOfShape         from TopTools
60
61 is
62     CompletPart2d(myclass ; AsDes : mutable AsDes from BRepAlgo;
63                             F     :         Face  from TopoDS;
64                             NewEdges :      MapOfShape from TopTools);
65                       
66         ---Purpose: Computes the intersections between the edges stored
67         --          is AsDes as descendants of <F> . Intersections is computed
68         --          between two edges if one of them is bound in NewEdges.
69
70
71     FindEndVertex(myclass; VertList : ListOfShape from TopTools;
72                            f,l      : Real        from Standard;
73                            E        : Edge        from TopoDS;
74                            First    : out Boolean from Standard;
75                            DU       : out Real    from Standard)
76         returns Vertex from TopoDS;
77     ---Purpose: Returns a vertex  from  <VertList> having parameter on
78     --          <E> most close  to  <f>  or  <l>.  <First>  is True if
79     --          found vertex is closer  to <f>. <DU> returns parameter
80     --          difference.
81     
82     AddVonE(myclass; V : Vertex from TopoDS;
83                      E1,E2 : Edge from TopoDS;
84                      AsDes : mutable AsDes from BRepAlgo;
85                      F: Face from TopoDS)
86         returns Vertex from TopoDS;
87         ---Purpose: Put V in AsDes as intersection of E1 and E2.
88         --          Check that vertex equal to V already exists on one
89         --          of edges, in  such  a  case,  V  is  not added but
90         --          existing vertex is updated to  be on E1 and E2 and
91         --          is returned insead of V.
92         --          Optional F is a face  E1  and  E2  are on. If F is
93         --          provided, it is used  to  find  new vertices on E1
94         --          and E2 resulting from intersection of new edges on
95         --          the two  other  faces  the  F  interferes with and
96         --          through which E1 and  E2  pass  too. This helps to
97         --          avoid small edges.
98
99
100     GetTolerance(myclass; theV : Vertex from TopoDS;
101                           theU : Real from Standard;
102                           theE : Edge from TopoDS;
103                           theAsDes : AsDes from BRepAlgo)
104         returns Real from Standard;
105         ---Purpose: Returns  tolerance  theV   must   have  atfer  its
106         --          addition to theE with  theU parameter. theAsDes is
107         --          used to find pcurves of theE
108
109 end Inter2d;
110