1 # The following example constructs (however, not trying to follow the drawings
2 # precisely) an airplane part called Gehause Rohteil from MBB Deutsche Aerospace.
3 # In this example the planar geometry is combined together with cylindrical parts.
4 # There are many ways to create a single mechanical workpiece like the following
5 # one. Here we choose Booleans as a main tool for material cutting. Fillets
6 # (presented in the original model) are not employed herein as we are focused
7 # on BOPs only. However, Gehause Rohteil is a good model to test blendings as well.
9 # This model was used as a test part for comparing modeling systems in 1979 and
10 # again in 1983. The tests were organized by Computer Aided Manufacturing
11 # International (CAM-I).
13 # -----------------------------------------------------------------------------
14 # Prepare base contour
15 # -----------------------------------------------------------------------------
37 line l1 0 0 1 0; trim l1 l1 0 35
38 line l2 39 4 0 1; trim l2 l2 0 6
39 line l3 35 13 -1 0; trim l3 l3 0 8
40 line l4 27 13 0 -1; trim l4 l4 0 3
41 line l5 27 10 -1 0; trim l5 l5 0 5
42 line l6 20 8 0 -1; trim l6 l6 0 4
43 line l7 20 4 -1 0; trim l7 l7 0 9
44 line l8 11 4 0 -1; trim l8 l8 0 1
45 line l9 11 3 -1 0; trim l9 l9 0 6
46 line l10 5 3 0 1; trim l10 l10 0 10
47 line l11 5 13 -1 0; trim l11 l11 0 5
48 line l12 0 13 0 -1; trim l12 l12 0 4
49 line l13 0 9 1 0; trim l13 l13 0 4
50 line l14 4 9 0 -1; trim l14 l14 0 5
51 line l15 4 4 -1 0; trim l15 l15 0 4
52 line l16 0 4 0 -1; trim l16 l16 0 4
54 # We use Bezier curves here instead of circles. This does not make
55 # a great sense since we are focused on a principle rather than
56 # trying to follow the drawing precisely
57 2dbeziercurve c1 3 35 0 1 39 0 1 39 4 1
58 2dbeziercurve c2 3 39 10 1 39 13 1 35 13 1
59 2dbeziercurve c3 3 22 10 1 20 10 1 20 8 1
61 # Circle for a big hole
62 circle cbig 33 6.5 4.0
84 wire wout e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13 e14 e15 e16 e17 e18 e19
93 # -----------------------------------------------------------------------------
95 # -----------------------------------------------------------------------------
99 # -----------------------------------------------------------------------------
100 # Prepare a contour on top face
101 # -----------------------------------------------------------------------------
116 line l1 0 0 1 0; trim l1 l1 0 28
117 line l2 28 0 0 1; trim l2 l2 0 13
118 line l3 28 13 -1 0; trim l3 l3 0 1
119 line l4 27 13 0 -1; trim l4 l4 0 3
120 line l5 27 10 -1 0; trim l5 l5 0 5
121 line l6 20 8 0 -1; trim l6 l6 0 4
122 line l7 20 4 -1 0; trim l7 l7 0 9
123 line l8 11 4 0 -1; trim l8 l8 0 1
124 line l9 11 3 -1 0; trim l9 l9 0 6
125 line l10 5 3 0 1; trim l10 l10 0 10
126 line l11 5 13 -1 0; trim l11 l11 0 5
127 line l12 0 13 0 -1; trim l12 l12 0 13
128 2dbeziercurve c3 3 22 10 1 20 10 1 20 8 1
130 # Create topology on top face
158 wire wout e1 e2 e3 e4 e5 e6 e7 e8 e9 e10 e11 e12 e13
159 mkface ftop top_pln wout
162 # -----------------------------------------------------------------------------
164 # -----------------------------------------------------------------------------
166 prism ptop ftop 0 0 1.5
168 # -----------------------------------------------------------------------------
169 # Fuse top and bottom parts and make features
170 # -----------------------------------------------------------------------------
172 # Fuse top and bottom
177 circle csmall 23 6.5 2.0
178 to3d hole_top csmall top_pln
179 plane bot_pln 0 0 -10
180 to3d hole_bot csmall bot_pln
181 mkedge ehole_top hole_top
182 mkedge ehole_bot hole_bot
183 wire whole_top ehole_top
184 wire whole_bot ehole_bot
185 thrusections tool 1 1 whole_top whole_bot
188 # Add extrusion around the hole
189 plane top_pln 0 0 4.5
190 circle csmall_outer 23 6.5 3.0
191 circle csmall_inner 23 6.5 2.0
192 to3d hole_top_outer csmall_outer top_pln
193 to3d hole_top_inner csmall_inner top_pln
194 mkedge e_hole_top_outer hole_top_outer
195 mkedge e_hole_top_inner hole_top_inner
196 wire w_hole_top_outer e_hole_top_outer
197 wire w_hole_top_inner e_hole_top_inner
198 mkface ftube_outer top_pln w_hole_top_outer
199 mkface ftube_inner top_pln w_hole_top_inner
200 fixshape ftube_outer ftube_outer
201 fixshape ftube_inner ftube_inner
202 prism ptube_outer ftube_outer 0 0 3
203 prism ptube_inner ftube_inner 0 0 3
204 bcut ptube ptube_outer ptube_inner
207 # Build elevation "teeths" near the big hole
208 box t1 26 0 0 3 2.5 7
209 box t2 26 13 0 3 -3 7
213 # Build elevation "teeths" near the tail
219 # Remove some material from tail "teeths"
220 box blend_box 0 -5 0 5 25 5
221 trotate blend_box blend_box 0 0 0 0 1 0 -10
222 ttranslate blend_box blend_box 2.5 0 2.25
225 # Remove some material from "teeths" near big hole
226 box blend_box 0 -5 0 5 25 5
227 trotate blend_box blend_box 0 0 0 0 1 0 -9
228 ttranslate blend_box blend_box 14.5 0 1.5
232 ellipse tail_hole1 0 0 0.75 0.5
233 plane base_pln 2 6.5 0
234 to3d tail_hole_3d1 tail_hole1 base_pln
235 mkedge e_tail_hole1 tail_hole_3d1
236 wire w_tail_hole1 e_tail_hole1
237 plane base_pln 2 6.5 20
238 to3d tail_hole_3d2 tail_hole1 base_pln
239 mkedge e_tail_hole2 tail_hole_3d2
240 wire w_tail_hole2 e_tail_hole2
241 thrusections tail_tube 1 1 w_tail_hole1 w_tail_hole2
245 box blend_box 0 3 0 5 7 5
246 trotate blend_box blend_box 0 0 0 0 1 0 -5
247 ttranslate blend_box blend_box 2 0 1.5
250 # -----------------------------------------------------------------------------
251 # Extract final solid
252 # -----------------------------------------------------------------------------
257 # -----------------------------------------------------------------------------
258 # Attempt to simplify the model
259 # -----------------------------------------------------------------------------
261 set nbshapes_before_simplify "
262 Number of shapes in shape
273 checknbshapes p -ref ${nbshapes_before_simplify} -t -m "result before attempt to simplify the model"
276 xwd ${imagedir}/${casename}_1.png
280 set nbshapes_after_simplify "
281 Number of shapes in shape
292 checknbshapes p -ref ${nbshapes_after_simplify} -t -m "result after attempt to simplify the model"
294 xwd ${imagedir}/${casename}_2.png