1 puts "================"
3 puts "================"
5 ##############################################################################
6 # BRepLib_MakeFace(Wire) creates an invalid face on a wire of cylinder bottom
7 ##############################################################################
21 # make a face from the 3-d wire (planar bottom of the cylinder)
24 # BUG: face is built on a cylindrical face of the cylinder instead of
26 set reslog [checkshape f -short]
28 if { $reslog != "This shape seems to be valid" } { set status 1 }
30 # ========================================================================
31 # Make a new cylindrical face from a wire composed from more than 3 edges
32 # to check that the bug fix is valid for a wire of more than 1 edge
33 # ========================================================================
35 # get a bottom edge cyl_1; cyl_2 is a top edge; cyl_3 is a seam edge
41 # split cyl_1 into 3 edges
44 mkedge e3 c3D 4 6.28318530717959
46 # make a reversed seam
50 # make a new wire for a new cylindrical face
51 wire w e1 e2 e3 cyl_3 cyl_2 cyl_3_r
53 # get a surface for a new face
55 mksurface cyl_surf cyl_3
57 # make a new cylindrical face
58 mkface cyl_face_0 cyl_surf w
59 fixshape cyl_face cyl_face_0
61 # make a wire of 3 bottom edges to check the fix
63 wire w cyl_face_2 cyl_face_1 cyl_face_3
65 # check the fix, i.e. that cylindrical surface is rejected and thus a valid face is built
68 set res_log [checkshape f -short]
70 if { $reslog != "This shape seems to be valid" } { set status 1 }
72 # =================================================================
73 #check that mkplane finds cyl_surf if the wire of cyl_face is given
74 # =================================================================
77 mkplane f cyl_face_1 0
80 mksurface cyl_surf_2 f
82 # compare points of 2 surfaces at same UV
83 svalue cyl_surf 1 1 x1 y1 z1
84 svalue cyl_surf_2 1 1 x2 y2 z2
86 if { [ expr [dval x1] - [dval x2] ] > 0.0 } { set status 1 }
87 if { [ expr [dval y1] - [dval y2] ] > 0.0 } { set status 1 }
88 if { [ expr [dval z1] - [dval z2] ] > 0.0 } { set status 1 }
92 if { ${status} != 0 } {
93 puts "Faulty ${BugNumber}"
95 puts "OK ${BugNumber}"