]> OCCT Git - occt.git/commit
0028414: Data Exchange, STEP - Face on a closed surface with single inner wire and...
authoratereshi <atereshi@opencascade.com>
Tue, 20 Sep 2022 08:48:14 +0000 (11:48 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 31 Oct 2022 15:10:55 +0000 (18:10 +0300)
commita453f9d12895e9e972d9fb361b352f884208a35a
treee2039f015e525d1e974368d82516ef8537135987
parent492b09dcaec31a4076241c578118bea129e60d25
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.
21 files changed:
src/ShapeFix/ShapeFix_Face.cxx
src/ShapeFix/ShapeFix_Face.hxx
tests/bugs/begin
tests/bugs/modalg_7/bug30273
tests/bugs/step/bug28414 [new file with mode: 0644]
tests/bugs/step/bug32922
tests/bugs/xde/bug6283
tests/de/begin
tests/de/end
tests/de/iges_1/G8
tests/de/iges_1/J9
tests/de/step_1/E1
tests/de/step_1/E2
tests/de/step_1/G9
tests/de/step_1/J6
tests/de/step_2/B3
tests/de/step_2/Q5
tests/de/step_2/Q6
tests/de/step_3/B9
tests/de/step_3/C8
tests/de/step_3/E4