Update of tests data base for reproduced issues
[occt.git] / tests / bugs / modalg_7 / bug22750
1 puts "TODO OCC22750 ALL: Faulty shapes in variables"
2
3 puts "========"
4 puts "OCC22750"
5 puts "========"
6 puts ""
7 #######################################################
8 # Boolean operation: Bug in Fuse
9 #######################################################
10
11 # Step 1: Create surface wing
12
13 # Create sections as ellipses 2D (possible to create directly in 3D)
14 ellipse e1 0 0 30 20
15 ellipse e2 0 0  20 10
16 ellipse e3  0 0 16 8
17
18 # Convert 2d Curves in 3d Curves, and place them along Z axis
19 to3d ee1 e1
20 to3d ee2 e2; translate ee2 0 0 100
21 to3d ee3 e3; translate ee3 0 0 200
22
23 rotate ee2 0 0 100 0 1 0 10
24 rotate ee3 0 0 200 0 1 0 20
25
26 #Approximate the ellipses by Bsplines
27 appro c1 16 ee1
28 appro c2 16 ee2
29 appro c3 16 ee3
30
31 #Make a surface by approximation passing throught a set of curves
32 # and create a face
33 appsurf s1 c1 c2 c3
34 mkface f1 s1
35
36 #Make a surface by approximation passing throught a set of ellipse
37 # and create a face
38 appsurf s2 ee1 ee2 ee3
39 mkface f2 s2
40
41 # Step 2: Create surface for fuselage
42
43 #Create circles in 3D along axe X
44 circle c1 -100 0 0 1 0 0 10
45 circle c2 -50 0 0 1 0 0 30
46 circle c3 50 0 0 1 0 0  29
47 circle c4 100 0 0 1 0 0 20
48 circle c5 150 0 0 1 0 0 10
49
50 #Make a surface by approximation passing throught a set of circles
51 # and create a face
52 appsurf s3 c1 c2 c3 c4 c5
53 mkface f3 s3
54
55
56 # Step 3: Create a Solid for the Wing
57 # Build edges from ellipse, wires with edges, faces on wires
58 # It's necessary to sew the faces to create the Shell, because the faces don't shared the same edge
59 #sewing will create a shell, it remains to create the solid from the shell
60
61 mkedge ed1 ee1
62 mkedge ed3 ee3
63
64 wire w1 ed1
65 wire w3 ed3
66
67 mkplane f5 w1
68 mkplane f6 w3
69
70 sewing r f2 f5 f6
71 ###mksol so1 r
72 shape so1 So
73 add r so1
74
75 checkshape so1
76 # The shape so1 is valid
77
78 #Step 4: Create a Solid for fuselage
79 # We will extract the edge from the face f3, and use them to buid faces, the edge will be shared and we 
80 # can rebuild a sh and a solid with the basic and fast method
81
82 nexplode f3 e
83 #nexplode give same order of exploration in different sessions
84
85 wire w1 f3_1
86 wire w3 f3_3
87 mkplane f7 w1 1
88 mkplane f8 w3 1
89
90 shape rr Sh
91 add f3 rr; add f7 rr; add f8 rr
92
93 shape so2 So
94 add rr so2
95
96 checkshape so2
97 # there is a pb of orientation, we have to chage orientation of f8
98
99 orientation f8 R
100
101 # We rebuild the shell and the solid
102 shape rr Sh
103 add f3 rr; add f7 rr; add f8 rr
104
105 shape so2 So
106 add rr so2
107
108 checkshape so2
109 # the shape is valid
110
111 # Step 5: Fuse the Wing to the fuselage
112 ttranslate so1 0 0 10
113 bop so1 so2
114 bopfuse rrr
115
116 # Step 6: Create the othe wing using copy and rotation
117 tcopy so1 so3
118 trotate so3 0 0 0 1 0 0 180
119
120 # Step 7: Fuse the Wing to the fuselage
121 bop rrr so3
122 bopfuse so4
123
124 checkview -display so4 -3d -path ${imagedir}/${test_image}-3d.png
125 checkview -display so4 -2d -path ${imagedir}/${test_image}-2d.png