1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/step/bug28414
atereshi a453f9d128 0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and without natural bound not correctly read
Problem: From the point of view of the STEP format (and others), it is allowed
to describe a face on a surface with natural boundaries (torus, sphere) without
specifying these boundaries. Thus, a face on a closed surface and containing
an inner wire (or several) is correctly defined and describes a face with a
cutout defined by this wire. At the same time, there is a function
(ShapeFix_Face::FixOrientation) in the ShapeHealing procedure that corrects the
orientation of the wires, and it starts before the function of adding natural
boundaries (ShapeFix_Face::FixAddNaturalBound). There are many shapes that have
incorrectly oriented wires and this procedure successfully heals them, but on a
correctly specified face with single inner wire on closed surface, we do not get
the entire surface with a cutout, but a part of the surface defined by the wire.
This fix is intended to resolve this ambiguity.

Change:
1. Added function isNeedAddNaturalBound that returns TRUE if face needs to add
 natural bounds.
2. Corrected condition in FixOrientation to ignoring faces that needs to add
 natural bounds.
3. For tests in which one wire was incorrectly oriented on a closed surface,
flag AddNaturalBound was disabled.
5. Test with cutout from torus was created: bugs step bug28414.

Result: By default, it is correct to add natural boundaries, because this case
 is correct from the point of view of the STEP format and others.
2022-10-31 18:10:55 +03:00

20 lines
460 B
Plaintext

puts "==================================================================="
puts "0028414: Data Exchange - Step entity not correctly read"
puts "==================================================================="
puts ""
pload VISUALIZATION
stepread [locate_data_file bug28414_bug_toroidal_surface.stp] a *
checkshape a_1 f
checkprops a_1 -s 3593.35
checkgravitycenter a_1 -s -30. 0. 137.993 0.001
vinit
vdisplay a_1
vfit
vdump $imagedir/${casename}.png