blob: 287958a8235027136bdd08a45c0cbb861421722a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
-- File: TopOpeBRepTool_PurgeInternalEdges.cdl
-- Created: Thu Nov 19 15:23:38 1998
-- Author: Jean-Michel BOULCOURT
-- <jmb@coulox.paris1.matra-dtv.fr>
---Copyright: Matra Datavision 1998
class PurgeInternalEdges from TopOpeBRepTool
---Purpose: remove from a shape, the internal edges that are
-- not connected to any face in the shape. We can
-- get the list of the edges as a
-- DataMapOfShapeListOfShape with a Face of the Shape
-- as the key and a list of internal edges as the
-- value. The list of internal edges means edges
-- that are not connected to any face in the shape.
--
-- Example of use :
-- TopTools_DataMapOfShapeListOfShape mymap;
-- TopOpeBRepTool_PurgeInternalEdges
-- mypurgealgo(mysolid); mypurgealgo.GetFaces(mymap);
--
uses
Shape from TopoDS,
DataMapOfShapeListOfShape from TopTools,
IndexedDataMapOfShapeListOfShape from TopTools
raises
ConstructionError from Standard,
NullObject from Standard
is
Create (theShape : Shape from TopoDS;
PerformNow : Boolean from Standard = Standard_True)
returns PurgeInternalEdges from TopOpeBRepTool
raises NullObject from Standard,
ConstructionError from Standard;
---Purpose: Initialize members and begin exploration of shape
-- depending of the value of PerformNow
Faces (me : in out ; theMapFacLstEdg : in out DataMapOfShapeListOfShape from TopTools);
---Purpose: returns the list internal edges associated with
-- the faces of the myShape. If PerformNow was False
-- when created, then call the private Perform method
-- that do the main job.
Shape (me : in out)
returns Shape from TopoDS
raises NullObject from Standard;
---Purpose: returns myShape modified with the list of internal
-- edges removed from it.
---C++: return &
NbEdges (me )
returns Integer from Standard
raises NullObject from Standard;
---Purpose: returns the number of edges candidate to be removed
---C++: return const
IsDone (me)
returns Boolean from Standard
---Purpose: returns False if the list of internal edges has
-- not been extracted
---C++: inline
is static;
Perform (me : in out);
---Purpose: Using the list of internal edge from each face,
-- rebuild myShape by removing thoses edges.
--
BuildList (me : in out)
---Purpose: Do the main job. Explore all the edges of myShape and
-- build a map with faces as a key and list of internal
-- edges(without connected faces) as value.
--
is private;
fields
myShape : Shape from TopoDS;
myIsDone : Boolean from Standard;
myMapFacLstEdg : DataMapOfShapeListOfShape from TopTools;
myMapEdgLstFac : IndexedDataMapOfShapeListOfShape from TopTools is protected;
end PurgeInternalEdges;
|