blob: 561dbd39f8acadedd16f30493e36057586fc431c (
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
|
-- File: BRepTools_Substitution.cdl
-- Created: Tue Mar 28 09:17:56 1995
-- Author: Yves FRICAUD
-- <yfr@stylox>
---Copyright: Matra Datavision 1995
class Substitution from BRepTools
---Purpose: A tool to substitute subshapes by other shapes.
--
--
-- The user use the method Substitute to define the
-- modifications.
-- A set of shapes is designated to replace a initial
-- shape.
--
-- The method Build reconstructs a new Shape with the
-- modifications.The Shape and the new shape are
-- registered.
--
uses
Shape from TopoDS,
ListOfShape from TopTools,
DataMapOfShapeListOfShape from TopTools
raises
NoSuchObject from Standard
is
Create returns Substitution from BRepTools;
Clear ( me : in out)
---Purpose: Reset all the fields.
is static;
Substitute (me : in out;
OldShape : Shape from TopoDS;
NewShapes : ListOfShape from TopTools)
---Purpose: <Oldshape> will be replaced by <NewShapes>.
--
-- <NewShapes> can be empty , in this case <OldShape>
-- will disparate from its ancestors.
--
-- if an item of <NewShapes> is oriented FORWARD.
-- it will be oriented as <OldShape> in its ancestors.
-- else it will be reversed.
is static;
Build (me : in out; S : Shape from TopoDS)
---Purpose: Build NewShape from <S> if its subshapes has modified.
--
-- The methods <IsCopied> and <Copy> allows you to keep
-- the resul of <Build>
is static;
IsCopied(me; S : Shape from TopoDS) returns Boolean
---Purpose: Returns True if <S> has been replaced .
is static;
Copy(me; S : Shape from TopoDS) returns ListOfShape from TopTools
---Purpose: Returns the set of shapes substitued to <S> .
---C++: return const &
raises
NoSuchObject from Standard -- if ! IsCopied(S)
is static;
fields
myMap : DataMapOfShapeListOfShape from TopTools;
end Substitution;
|