Salome HOME
Bug 0020043: EDF 865 GEOM: Object is non valid after translation. Fix object after...
[modules/geom.git] / src / PARTITION / Partition_Loop3d.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  CEA/DEN, EDF R&D
23 --
24 --
25 --
26 --  File   : Partition_Loop3d.cdl
27 --  Module : GEOM
28
29 class Loop3d from Partition
30
31         ---Purpose: Builds the shells from a set of faces.
32         --          Provides  methods   for   comparing  faces  mutual
33         --          location.
34         
35 uses
36     Vec                              from gp,
37     MapOfOrientedShape               from TopTools,
38     IndexedDataMapOfShapeListOfShape from TopTools,
39     Face                             from TopoDS,
40     Edge                             from TopoDS,
41     ListOfShape                      from TopTools,
42     Shape                            from TopoDS
43     
44 is
45
46     Create;
47     
48     AddConstFaces  (me : in out; S : Shape from TopoDS)
49         ---Purpose: Add faces of <S> as unique faces in the result.
50     is static;
51
52     AddSectionFaces  (me : in out; S : Shape from TopoDS)
53         ---Purpose: Add faces of <S> as double faces in the result.
54     is static;
55
56     MakeShells (me : in out; AvoidFacesMap : MapOfOrientedShape from TopTools)
57         returns ListOfShape from TopTools is static;
58         ---Purpose: Make and return shells. 
59         --          <AvoidFacesMap> can contain faces that must not be
60         --          added to result shells.
61         ---C++: return const &
62     
63     
64         ---Category: class methods
65     
66     IsInside (myclass; E        : Edge    from TopoDS;
67                        F1, F2   : Face    from TopoDS;
68                        CountDot : Boolean from Standard;
69                        Dot      : in out Real    from Standard;
70                        GoodOri  : in out Boolean from Standard)
71         returns Boolean from Standard;
72         ---Purpose: check if <F2> is inside <F1> by edge <E>.
73         --          if <CountDot>, compute <Dot>: scalar production of
74         --          normalized  vectors  pointing  inside  faces,  and
75         --          check if faces are oriented well for sewing
76     
77     Normal (myclass; E : Edge from TopoDS;
78                      F : Face from TopoDS) returns Vec from gp;
79     
80     
81 fields
82
83     myNewShells : ListOfShape from TopTools; -- result
84     
85     myFaces     : ListOfShape from TopTools;
86     myEFMap     : IndexedDataMapOfShapeListOfShape from TopTools;
87     
88 end Loop3d;