1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
18 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 -- GEOM PARTITION : partition algorithm
22 -- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
23 -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
39 -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
43 -- File : Partition_Inter2d.cdl
44 -- Author : Benedicte MARTIN
47 class Inter2d from Partition
49 ---Purpose: Computes the intersections between edges on a face
50 -- stores result is SD as AsDes from BRepAlgo.
57 MapOfShape from TopTools,
59 ListOfShape from TopTools
62 CompletPart2d(myclass ; AsDes : mutable AsDes from BRepAlgo;
64 NewEdges : MapOfShape from TopTools);
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.
71 FindEndVertex(myclass; VertList : ListOfShape from TopTools;
72 f,l : Real from Standard;
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
82 AddVonE(myclass; V : Vertex from TopoDS;
83 E1,E2 : Edge from TopoDS;
84 AsDes : mutable AsDes from BRepAlgo;
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
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