Salome HOME
Merge from V5_1_3_BR branch (07/12/09)
[modules/geom.git] / src / PARTITION / Partition_Inter2d.cdl
1 --  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 --
3 --  Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 --
22 --  File   : Partition_Inter2d.cdl
23 --  Author : Benedicte MARTIN
24 --  Module : GEOM
25
26 class Inter2d from Partition 
27
28         ---Purpose: Computes the intersections between edges on a face
29         --          stores result is SD as AsDes from BRepAlgo.
30
31 uses
32     AsDes               from BRepAlgo,
33     Edge                from TopoDS,
34     Face                from TopoDS,
35     Vertex              from TopoDS,
36     MapOfShape          from TopTools,
37     Real                from Standard,
38     ListOfShape         from TopTools
39
40 is
41     CompletPart2d(myclass ; AsDes : mutable AsDes from BRepAlgo;
42                             F     :         Face  from TopoDS;
43                             NewEdges :      MapOfShape from TopTools);
44                       
45         ---Purpose: Computes the intersections between the edges stored
46         --          is AsDes as descendants of <F> . Intersections is computed
47         --          between two edges if one of them is bound in NewEdges.
48
49
50     FindEndVertex(myclass; VertList : ListOfShape from TopTools;
51                            f,l      : Real        from Standard;
52                            E        : Edge        from TopoDS;
53                            First    : out Boolean from Standard;
54                            DU       : out Real    from Standard)
55         returns Vertex from TopoDS;
56     ---Purpose: Returns a vertex  from  <VertList> having parameter on
57     --          <E> most close  to  <f>  or  <l>.  <First>  is True if
58     --          found vertex is closer  to <f>. <DU> returns parameter
59     --          difference.
60     
61     AddVonE(myclass; V : Vertex from TopoDS;
62                      E1,E2 : Edge from TopoDS;
63                      AsDes : mutable AsDes from BRepAlgo;
64                      F: Face from TopoDS)
65         returns Vertex from TopoDS;
66         ---Purpose: Put V in AsDes as intersection of E1 and E2.
67         --          Check that vertex equal to V already exists on one
68         --          of edges, in  such  a  case,  V  is  not added but
69         --          existing vertex is updated to  be on E1 and E2 and
70         --          is returned insead of V.
71         --          Optional F is a face  E1  and  E2  are on. If F is
72         --          provided, it is used  to  find  new vertices on E1
73         --          and E2 resulting from intersection of new edges on
74         --          the two  other  faces  the  F  interferes with and
75         --          through which E1 and  E2  pass  too. This helps to
76         --          avoid small edges.
77
78
79     GetTolerance(myclass; theV : Vertex from TopoDS;
80                           theU : Real from Standard;
81                           theE : Edge from TopoDS;
82                           theAsDes : AsDes from BRepAlgo)
83         returns Real from Standard;
84         ---Purpose: Returns  tolerance  theV   must   have  atfer  its
85         --          addition to theE with  theU parameter. theAsDes is
86         --          used to find pcurves of theE
87
88 end Inter2d;
89