7fd59977 |
1 | -- File: BRepFill_Pipe.cdl |
2 | -- Created: Tue Jun 7 15:35:09 1994 |
3 | -- Author: Bruno DUMORTIER |
4 | -- <dub@fuegox> |
5 | ---Copyright: Matra Datavision 1994 |
6 | |
7 | |
8 | |
9 | |
10 | class Pipe from BRepFill |
11 | |
12 | ---Purpose: Create a shape by sweeping a shape (the profile) |
13 | -- along a wire (the spine). |
14 | -- |
15 | -- For each edge or vertex from the spine the user |
16 | -- may ask for the shape generated from each subshape |
17 | -- of the profile. |
18 | |
19 | uses |
20 | |
21 | HArray2OfShape from TopTools, |
22 | LocationLaw from BRepFill, |
23 | Shape from TopoDS, |
24 | Face from TopoDS, |
25 | Wire from TopoDS, |
26 | Edge from TopoDS, |
27 | Vertex from TopoDS, |
28 | Pnt from gp, |
29 | Trsf from gp |
30 | |
31 | |
32 | raises |
33 | DomainError from Standard, |
34 | NotDone from StdFail |
35 | |
36 | is |
37 | |
38 | Create returns Pipe from BRepFill; |
39 | |
40 | Create ( Spine : Wire from TopoDS; |
41 | Profile : Shape from TopoDS; |
42 | GeneratePartCase : Boolean from Standard = Standard_False) |
43 | returns Pipe from BRepFill; |
44 | |
45 | Perform (me : in out; Spine : Wire from TopoDS; |
46 | Profile : Shape from TopoDS; |
47 | GeneratePartCase : Boolean from Standard = Standard_False) |
48 | is static; |
49 | |
50 | Spine(me) returns Shape from TopoDS |
51 | ---C++ : return const & |
52 | is static; |
53 | |
54 | Profile(me) returns Shape from TopoDS |
55 | ---C++ : return const & |
56 | is static; |
57 | |
58 | Shape(me) returns Shape from TopoDS |
59 | ---C++ : return const & |
60 | is static; |
61 | |
62 | FirstShape(me) returns Shape from TopoDS |
63 | ---C++ : return const & |
64 | is static; |
65 | |
66 | LastShape(me) returns Shape from TopoDS |
67 | ---C++ : return const & |
68 | is static; |
69 | |
70 | Face(me : in out; ESpine, EProfile : Edge from TopoDS) |
71 | returns Face from TopoDS |
72 | ---Purpose: Returns the face created from an edge of the spine |
73 | -- and an edge of the profile. |
74 | raises |
75 | DomainError from Standard |
76 | ---Purpose: if the edges are not in the spine or the profile |
77 | |
78 | is static; |
79 | |
80 | Edge(me : in out; ESpine : Edge from TopoDS; VProfile : Vertex from TopoDS) |
81 | returns Edge from TopoDS |
82 | ---Purpose: Returns the edge created from an edge of the spine |
83 | -- and a vertex of the profile. |
84 | raises |
85 | DomainError from Standard |
86 | ---Purpose: if the edge or the vertex are not in the spine or |
87 | -- the profile. |
88 | |
89 | is static; |
90 | |
91 | Section(me; VSpine : Vertex from TopoDS) |
92 | returns Shape from TopoDS |
93 | ---Purpose: Returns the shape created from the profile at the |
94 | -- position of the vertex VSpine. |
95 | raises |
96 | DomainError from Standard |
97 | ---Purpose: if the vertex is not in the Spine |
98 | is static; |
99 | |
100 | |
101 | PipeLine(me; Point : Pnt from gp) |
102 | ---Purpose: Create a Wire by sweeping the Point along the <spine> |
103 | returns Wire from TopoDS |
104 | raises |
105 | DomainError from Standard |
106 | ---Purpose: if the <Spine> is undefined |
107 | is static; |
108 | |
109 | |
110 | -- |
111 | -- Private methods |
112 | -- |
113 | |
114 | MakeShape(me : in out; S : Shape from TopoDS; |
115 | FirstShape, LastShape : Shape from TopoDS) |
116 | returns Shape from TopoDS |
117 | ---Purpose: Auxiliary recursive method used to build the |
118 | -- result. |
119 | is static private; |
120 | |
121 | |
122 | FindEdge(me; S : Shape from TopoDS; |
123 | E : Edge from TopoDS; |
124 | Init : in out Integer) |
125 | ---Purpose: Auxiliary recursive method used to find the edge's index |
126 | returns Integer |
127 | is static private; |
128 | |
129 | FindVertex(me; S : Shape from TopoDS; |
130 | V : Vertex from TopoDS; |
131 | Init : in out Integer) |
132 | returns Integer |
133 | is static private; |
134 | |
135 | DefineRealSegmax(me : in out) |
136 | is static private; |
137 | |
138 | |
139 | fields |
140 | mySpine : Wire from TopoDS; |
141 | myProfile : Shape from TopoDS; |
142 | myShape : Shape from TopoDS; |
143 | myTrsf : Trsf from gp; |
144 | myLoc : LocationLaw from BRepFill; |
145 | mySections: HArray2OfShape from TopTools; |
146 | myFaces : HArray2OfShape from TopTools; |
147 | myEdges : HArray2OfShape from TopTools; |
148 | myFirst : Shape from TopoDS; |
149 | myLast : Shape from TopoDS; |
150 | |
151 | myDegmax : Integer from Standard; |
152 | mySegmax : Integer from Standard; |
153 | end Pipe; |