1 -- GEOM PARTITION : partition algorithm
3 -- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 -- See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 -- File : Partition_Inter2d.cdl
25 -- Author : Benedicte MARTIN
28 class Inter2d from Partition
30 ---Purpose: Computes the intersections between edges on a face
31 -- stores result is SD as AsDes from BRepAlgo.
38 MapOfShape from TopTools,
40 ListOfShape from TopTools
43 CompletPart2d(myclass ; AsDes : mutable AsDes from BRepAlgo;
45 NewEdges : MapOfShape from TopTools);
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.
52 FindEndVertex(myclass; VertList : ListOfShape from TopTools;
53 f,l : Real from Standard;
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
63 AddVonE(myclass; V : Vertex from TopoDS;
64 E1,E2 : Edge from TopoDS;
65 AsDes : mutable AsDes from BRepAlgo;
67 returns Vertex from TopoDS;
68 ---Purpose: Put V in AsDes as intersection of E1 and E2.
69 -- Check that vertex equal to V already exists on one
70 -- of edges, in such a case, V is not added but
71 -- existing vertex is updated to be on E1 and E2 and
72 -- is returned insead of V.
73 -- Optional F is a face E1 and E2 are on. If F is
74 -- provided, it is used to find new vertices on E1
75 -- and E2 resulting from intersection of new edges on
76 -- the two other faces the F interferes with and
77 -- through which E1 and E2 pass too. This helps to
81 GetTolerance(myclass; theV : Vertex from TopoDS;
82 theU : Real from Standard;
83 theE : Edge from TopoDS;
84 theAsDes : AsDes from BRepAlgo)
85 returns Real from Standard;
86 ---Purpose: Returns tolerance theV must have atfer its
87 -- addition to theE with theU parameter. theAsDes is
88 -- used to find pcurves of theE