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