View Issue Details

IDProjectCategoryView StatusLast Update
0032922Open CASCADEOCCT:Data Exchangepublic2022-05-12 11:28
Reporteratereshi Assigned Tomsv  
PrioritynormalSeverityminor 
Status resolvedResolutionopen 
Product Version7.7.0 
Target Version7.7.0 
Summary0032922: Data Exchange, STEP - The torus is stored incorrectly in STEP format
DescriptionIf you create a torus and save it in STEP format, then after it is loaded and converted to TopoDS_Shape and before the ShapeHealing procedure is applied, the wire specifying the only face of the torus has an incorrect edge orientation.
Steps To ReproduceTo reproduce the problem you must to turn off shape healing procedure in STEP read processing.
This can be done with
XSTEPResource/STEP
file.
The script
bug32922
was made to simplify the task.
Just put it on
tests/bugs/step/
directory and run.
TagsNo tags attached.
Test case number

Attached Files

  • bug32922 (4,392 bytes)
  • torus_wire.png (9,776 bytes)

Activities

atereshi

2022-04-07 14:04

developer   ~0107680

git

2022-04-08 14:45

administrator   ~0107756

Branch CR32922 has been created by atereshi.

SHA-1: 9c693e275a62199b67d85e477ac9a8a5e0ca93e2


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 8 14:16:01 2022 +0300

    0032922: Some refactoring. Replaced circle through edges after ShapeFix_Wire::FixReorder() to BRepTools_WireExplorer circle.

git

2022-04-11 14:12

administrator   ~0107841

Branch CR32922_1 has been created by atereshi.

SHA-1: d6bcdfd8889e3be7489d66f8e54a23419eb6bfec


Detailed log of new commits:

Author: atereshi
Date: Mon Apr 11 14:06:43 2022 +0300

    0032922: Some refactoring. Added extra analysis in UV-space for toroidal surface.

Author: atereshi
Date: Mon Apr 11 12:18:15 2022 +0300

    0032922: Some refactoring. Added extra analysis in UV-space for toroidal surface.

git

2022-04-14 14:21

administrator   ~0107953

Branch CR32922_2 has been created by atereshi.

SHA-1: 6f19592b1a1bef7ad72136d8a37a7df0d6ee3a88


Detailed log of new commits:

Author: atereshi
Date: Thu Apr 14 14:21:31 2022 +0300

    0032922: Some refactoring. 3D and 2D mode.

git

2022-04-15 11:25

administrator   ~0107990

Branch CR32922_2 has been updated by atereshi.

SHA-1: 00289f9844b3de16161fbacd71a03da5d8f069a3


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 15 11:24:48 2022 +0300

    0032922: Some refactoring. Both mode only if capable.

Author: atereshi
Date: Thu Apr 14 16:25:22 2022 +0300

    0032922: Some refactoring. 3D and 2D mode.

Author: atereshi
Date: Thu Apr 14 16:20:36 2022 +0300

    0032922: Some refactoring. 3D and 2D mode.

git

2022-04-15 22:11

administrator   ~0107993

Branch CR32922_2 has been updated by atereshi.

SHA-1: b938a3852e171e16c4503dcdd6f4b70c5f359409


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 15 21:32:22 2022 +0300

    0032922: Some refactoring.

Author: atereshi
Date: Fri Apr 15 13:52:07 2022 +0300

    0032922: Some refactoring. Both mode only if capable. test file

git

2022-04-15 22:17

administrator   ~0107994

Branch CR32922_2 has been updated by atereshi.

SHA-1: 1327ef33ceef130c65c24977442ea40818d5189f


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 15 22:17:43 2022 +0300

    0032922: Some refactoring. Minus file

git

2022-04-18 11:23

administrator   ~0108015

Branch CR32922_2 has been updated by atereshi.

SHA-1: a60c0f3fb7403a4310d682dfa6e2d7cfdad86b88


Detailed log of new commits:

Author: atereshi
Date: Mon Apr 18 11:23:31 2022 +0300

    0032922_2: Back from enum to bool.

git

2022-04-18 14:40

administrator   ~0108016

Branch CR32922_2 has been updated by atereshi.

SHA-1: fe9b7a2ed513c0259fb42923c96099201e48710f


Detailed log of new commits:

Author: atereshi
Date: Mon Apr 18 14:40:44 2022 +0300

    0032922_2: isShiftForward -> nothing to do

git

2022-04-20 11:14

administrator   ~0108037

Branch CR32922_2 has been updated by atereshi.

SHA-1: d3967d82d0d39b6ffee2f324e87d48a9b0f9f1c4


Detailed log of new commits:

Author: atereshi
Date: Wed Apr 20 11:14:31 2022 +0300

    0032922_2: -save to file, +theModeBoth

Author: atereshi
Date: Tue Apr 19 15:48:53 2022 +0300

    0032922_2: test cr standard C9

git

2022-04-20 16:54

administrator   ~0108050

Branch CR32922_2 has been updated by atereshi.

SHA-1: 599f41237391b76c5f0998c345d0ab926f76e75e


Detailed log of new commits:

Author: atereshi
Date: Wed Apr 20 16:53:54 2022 +0300

    0032922_2: comments + fix test

git

2022-04-20 19:34

administrator   ~0108053

Branch CR32922_3 has been created by atereshi.

SHA-1: 9dc7af5d4d15156bb1106a548804e1d152d15228


Detailed log of new commits:

Author: atereshi
Date: Wed Apr 20 19:34:42 2022 +0300

    0032922_3: aCurMin = Min(aMinDistToTail, aMinDistToHead);

git

2022-04-21 15:18

administrator   ~0108084

Branch CR32922_2 has been updated by atereshi.

SHA-1: 915a7df6bed09a6c3180575014a712806b8758ce


Detailed log of new commits:

Author: atereshi
Date: Thu Apr 21 15:17:48 2022 +0300

    0032922_3: added FromSTEP2 = without healing

atereshi

2022-04-25 10:41

developer   ~0108137

The test has been created to detect the problem. No more need to use debugger.
bug32922 (4,392 bytes)

git

2022-04-25 10:52

administrator   ~0108138

Branch CR32922 has been deleted by atereshi.

SHA-1: 9c693e275a62199b67d85e477ac9a8a5e0ca93e2

git

2022-04-25 10:52

administrator   ~0108139

Branch CR32922_1 has been deleted by atereshi.

SHA-1: d6bcdfd8889e3be7489d66f8e54a23419eb6bfec

git

2022-04-25 10:52

administrator   ~0108140

Branch CR32922_2 has been deleted by atereshi.

SHA-1: 915a7df6bed09a6c3180575014a712806b8758ce

git

2022-04-25 10:52

administrator   ~0108141

Branch CR32922_3 has been deleted by atereshi.

SHA-1: 9dc7af5d4d15156bb1106a548804e1d152d15228

git

2022-04-25 10:53

administrator   ~0108142

Branch CR32922 has been created by atereshi.

SHA-1: 53a224238e17881783a70e8284310bf5ea90d928


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 8 14:16:01 2022 +0300

    0032922: Added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information. The new mode is used for torus-like surfaces before saving to STEP format. Added a test.

atereshi

2022-04-25 12:43

developer   ~0108146

Added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information to ShapeAnalysis_WireOrder. The new mode is used only for torus-like surfaces (ShapeFix_Wire::FixReorder) and only before saving to STEP format (TopoDSToStep_MakeStepWire).

git

2022-04-25 15:19

administrator   ~0108151

Branch CR32922_1 has been created by atereshi.

SHA-1: 2514248803c7f7133dc70f6563ab7d2f0c28185a


Detailed log of new commits:

Author: atereshi
Date: Mon Apr 25 15:19:30 2022 +0300

    0032922_1: removed unused include

Author: atereshi
Date: Mon Apr 25 15:17:02 2022 +0300

    Merge branch 'master' into CR32922_1

git

2022-04-25 16:13

administrator   ~0108156

Branch CR32922_1 has been deleted by atereshi.

SHA-1: 2514248803c7f7133dc70f6563ab7d2f0c28185a

git

2022-04-25 16:14

administrator   ~0108157

Branch CR32922 has been deleted by atereshi.

SHA-1: 53a224238e17881783a70e8284310bf5ea90d928

git

2022-04-25 16:20

administrator   ~0108158

Branch CR32922 has been created by atereshi.

SHA-1: aeda79abb5b955af3afb5e7be41ba923fea3f560


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 8 14:16:01 2022 +0300

    0032922:
    Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
    Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
     Result: Torus correctly stored.

msv

2022-04-27 14:59

developer   ~0108225

The first line of the first commit must contain the bug summary followed by the empty line.

General remark: according to coding rules when a simple type is passed as value argument it should be declared const. So, do not change old interfaces and use it in a new one.

src/ShapeAnalysis/ShapeAnalysis_Wire.cxx
-  CheckOrder (sawo, isClosed, mode3d);
+  CheckOrder(sawo, isClosed, mode3d, Standard_False);

Tune your text editor to insert a space before open parenthesis.
595: do not raise fail status if you are not going to return false.

src/ShapeAnalysis/ShapeAnalysis_WireOrder.hxx
158: witch -> which, is works -> works
170: for pure 2D points it is better to use TColgp_HSequenceOfXY.

src/ShapeAnalysis/ShapeAnalysis_WireOrder.cxx
98: It is not following the method description. It must check the condition "myMode != aNewMode".
226: restore the method cover.
240: instead use NCollection_Sequence<Handle(TColStd_HSequenceOfInteger)>.
245: TColgp_Array1OfXY
268: gp_Pnt2d
287,464: remove comment
449: remove extra code
459: move definition of aCloseDist where it is used.
504: replace with simple break, but aLoops.Append(anEdgeSeq) restore again after the cycle.
755: if the mode is Both it is needed to get coords from myXY.

src/TopoDSToStep/TopoDSToStep_MakeStepWire.cxx
208 and below: replace tabs with spaces

src/XSTEPResource/STEP
Not relevant only spacing changes, please revert.

tests/bugs/step/bug32922
2: output the full bug summary

atereshi

2022-05-04 14:31

developer   ~0108302

Last edited: 2022-05-04 16:11

Result of the bug32922 script for master branch.
torus_wire.png (9,776 bytes)

git

2022-05-06 12:03

administrator   ~0108363

Branch CR32922 has been updated by atereshi.

SHA-1: d972a09cdaf1fa107ae3072466496c2b71096603


Detailed log of new commits:

Author: atereshi
Date: Fri May 6 12:03:31 2022 +0300

    Merge remote-tracking branch 'origin/CR32922' into CR32922

Author: atereshi
Date: Fri Apr 8 14:16:01 2022 +0300

    0032922:
    Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
    Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
     Result: Torus correctly stored.

git

2022-05-11 10:25

administrator   ~0108390

Branch CR32922 has been deleted by atereshi.

SHA-1: d972a09cdaf1fa107ae3072466496c2b71096603

git

2022-05-11 10:26

administrator   ~0108391

Branch CR32922 has been created by atereshi.

SHA-1: a0ba11c492d1b7ce735a7b585584d4bd35133ad8


Detailed log of new commits:

Author: atereshi
Date: Fri Apr 8 14:16:01 2022 +0300

    0032922:
    Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
    Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
     Result: Torus correctly stored.

git

2022-05-11 14:04

administrator   ~0108392

Branch CR32922 has been deleted by atereshi.

SHA-1: a0ba11c492d1b7ce735a7b585584d4bd35133ad8

git

2022-05-11 16:47

administrator   ~0108399

Branch CR32922 has been created by atereshi.

SHA-1: fa6b27db8736d6767b4f3364f8a21b6c2d4c1eb8


Detailed log of new commits:

Author: atereshi
Date: Wed May 11 14:04:10 2022 +0300

    # consideration of comments from the review

Author: atereshi
Date: Fri Apr 8 14:16:01 2022 +0300

    0032922: Bug in ShapeFix_Wire.cxx, ShapeAnalysis_Wire.cxx, ShapeAnalysis_WireOrder.cxx
    
    Problem: the complete surface of the torus is not stored correctly in STEP format due to the fact that the edges are not properly ordered.
    Change: added a mode for reordering edges in the wire with simultaneous use of 2d and 3d information (ShapeAnalysis_WireOrder). The new mode is used for torus-like surfaces before saving to STEP format.
     Result: Torus correctly stored.

atereshi

2022-05-12 11:28

developer   ~0108404

Comments from the review have been eliminated

Issue History

Date Modified Username Field Change
2022-04-07 13:05 atereshi New Issue
2022-04-07 13:05 atereshi Assigned To => msv
2022-04-07 13:05 atereshi File Added: torus.stp
2022-04-07 13:14 atereshi Steps to Reproduce Updated
2022-04-07 13:19 atereshi Steps to Reproduce Updated
2022-04-07 13:21 atereshi Steps to Reproduce Updated
2022-04-07 13:46 kgv Summary Data Exchange - The torus is stored incorrectly in STEP format => Data Exchange, STEP - The torus is stored incorrectly in STEP format
2022-04-07 14:02 kgv Steps to Reproduce Updated
2022-04-07 14:04 atereshi Note Added: 0107680
2022-04-07 14:04 atereshi File Added: torus_bug.png
2022-04-08 14:45 git Note Added: 0107756
2022-04-11 14:12 git Note Added: 0107841
2022-04-14 14:21 git Note Added: 0107953
2022-04-15 11:25 git Note Added: 0107990
2022-04-15 22:11 git Note Added: 0107993
2022-04-15 22:17 git Note Added: 0107994
2022-04-18 11:23 git Note Added: 0108015
2022-04-18 14:40 git Note Added: 0108016
2022-04-20 11:14 git Note Added: 0108037
2022-04-20 16:54 git Note Added: 0108050
2022-04-20 19:34 git Note Added: 0108053
2022-04-21 15:18 git Note Added: 0108084
2022-04-25 10:41 atereshi Note Added: 0108137
2022-04-25 10:41 atereshi File Added: bug32922
2022-04-25 10:52 git Note Added: 0108138
2022-04-25 10:52 git Note Added: 0108139
2022-04-25 10:52 git Note Added: 0108140
2022-04-25 10:52 git Note Added: 0108141
2022-04-25 10:53 git Note Added: 0108142
2022-04-25 11:37 msv Assigned To msv => atereshi
2022-04-25 11:37 msv Status new => assigned
2022-04-25 12:43 atereshi Assigned To atereshi => msv
2022-04-25 12:43 atereshi Status assigned => resolved
2022-04-25 12:43 atereshi Steps to Reproduce Updated
2022-04-25 12:43 atereshi Note Added: 0108146
2022-04-25 15:19 git Note Added: 0108151
2022-04-25 16:13 git Note Added: 0108156
2022-04-25 16:14 git Note Added: 0108157
2022-04-25 16:20 git Note Added: 0108158
2022-04-27 14:59 msv Note Added: 0108225
2022-04-27 15:00 msv Assigned To msv => atereshi
2022-04-27 15:00 msv Status resolved => assigned
2022-05-04 13:40 atereshi File Deleted: torus_bug.png
2022-05-04 13:40 atereshi File Deleted: torus.stp
2022-05-04 14:29 atereshi Description Updated
2022-05-04 14:29 atereshi Steps to Reproduce Updated
2022-05-04 14:30 atereshi Steps to Reproduce Updated
2022-05-04 14:31 atereshi Note Added: 0108302
2022-05-04 14:31 atereshi File Added: torus_wire.png
2022-05-04 16:11 atereshi Note Edited: 0108302
2022-05-06 12:03 git Note Added: 0108363
2022-05-11 10:25 git Note Added: 0108390
2022-05-11 10:26 git Note Added: 0108391
2022-05-11 14:04 git Note Added: 0108392
2022-05-11 16:47 git Note Added: 0108399
2022-05-12 11:28 atereshi Assigned To atereshi => msv
2022-05-12 11:28 atereshi Status assigned => resolved
2022-05-12 11:28 atereshi Note Added: 0108404