1 -- Created on: 1998-06-03
2 -- Created by: data exchange team
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class Shell from ShapeAnalysis
19 ---Purpose: This class provides operators to analyze edges orientation
25 IndexedMapOfShape from TopTools
30 ---Purpose: Clears data about loaded shells and performed checks
32 LoadShells (me : in out; shape : Shape from TopoDS);
33 ---Purpose: Adds shells contained in the <shape> to the list of loaded shells
35 CheckOrientedShells (me : in out; shape : Shape from TopoDS;
36 alsofree: Boolean = Standard_False;
37 checkinternaledges: Boolean = Standard_False)
39 ---Purpose: Checks if shells fulfill orientation condition, i.e. if each
40 -- edge is, either present once (free edge) or twice (connected
41 -- edge) but with different orientations (FORWARD/REVERSED)
42 -- Edges which do not fulfill these conditions are bad
44 -- If <alsofree> is True free edges are considered.
45 -- Free edges can be queried but are not bad
47 IsLoaded (me; shape : Shape from TopoDS) returns Boolean;
48 ---Purpose: Tells if a shape is loaded (only shells are checked)
50 NbLoaded (me) returns Integer;
51 ---Purpose: Returns the actual number of loaded shapes (i.e. shells)
53 Loaded (me; num : Integer) returns Shape from TopoDS;
54 ---Purpose: Returns a loaded shape specified by its rank number.
55 -- Returns null shape if <num> is out of range
57 HasBadEdges (me) returns Boolean;
58 ---Purpose: Tells if at least one edge is recorded as bad
60 BadEdges (me) returns Compound from TopoDS;
61 ---Purpose: Returns the list of bad edges as a Compound
62 -- It is empty (not null) if no edge are recorded as bad
64 HasFreeEdges (me) returns Boolean;
65 ---Purpose: Tells if at least one edge is recorded as free (not connected)
67 FreeEdges (me) returns Compound from TopoDS;
68 ---Purpose: Returns the list of free (not connected) edges as a Compound
69 -- It is empty (not null) if no edge are recorded as free
71 HasConnectedEdges (me) returns Boolean;
72 ---Purpose: Tells if at least one edge is connected (shared twice or more)
76 myShells: IndexedMapOfShape from TopTools;
77 myBad : IndexedMapOfShape from TopTools;
78 myFree : IndexedMapOfShape from TopTools;
79 myConex : Boolean; -- are there or not