DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0023766

Shape orientation processing mechanism redesign

Open CASCADEOCCT:Application Frameworkclosed16 public notes

Search issues

Description

At the moment this mechanism is implemented as a workaround.
It is proposed to remove the workaround and replace it by normal technical solution allowing shape orientation processing for selected shapes.
Compatibility for persistence should be kept.

Additional information

The old implementation was based on using of some not documented features of 'Selection' method, namely for keeping orientation in the document was used one of extra fields of Selection method. For sure it is not logical (historically it was used to avoid persistence modification) and in fact it can be considered as some temporary workaround.
Now to keep Orientation of the shape TNaming_Name class field 'myOrientation' is used.

Public activity

16 archived notes

Participants are labeled by their role within this record.

01Commenter 1
The patch is developed.
See branch CR23766.
Ready for reviewing.
02Commenter 2
Done!
03Commenter 3
There are compile errors:

from ../../../../src/TNaming/TNaming_Name.cxx:23:
../../../../inc/TNaming_Name.hxx:129:28: error: TNaming_Name.lxx: No such file or directory

from ../../../../src/TNaming/TNaming_NamingTool.cxx:29:
../../../../inc/TNaming_Name.hxx:129:28: error: TNaming_Name.lxx: No such file or directory
04Commenter 4
Added missed file.
Ready for reviewing.
05Commenter 3
There are compile errors:

/../../../drv/BRepMesh/BRepMesh_HeapSortIndexedVertexOfDelaun_0.cxx
../../../../drv/BRepMesh/BRepMesh_ElemHasherOfDataStructureOfDelaun_0.cxx:9:33: error: BRepMesh_Triangle.hxx: No such file or directory

In file included from ../../../../drv/BRepMesh/BRepMesh_ElemHasherOfDataStructureOfDelaun_0.cxx:17:
../../../../inc/TCollection_MapHasher.gxx: In static member function ‘static Standard_Integer BRepMesh_ElemHasherOfDataStructureOfDelaun::HashCode(const BRepMesh_Triangle&, Standard_Integer)’:
../../../../inc/TCollection_MapHasher.gxx:25: error: no matching function for call to ‘HashCode(const BRepMesh_Triangle&, const Standard_Integer&)’

../../../../inc/TCollection_MapHasher.gxx: In static member function ‘static Standard_Boolean BRepMesh_ElemHasherOfDataStructureOfDelaun::IsEqual(const BRepMesh_Triangle&, const BRepMesh_Triangle&)’:
../../../../inc/TCollection_MapHasher.gxx:32: error: no match for ‘operator==’ in ‘K1 == K2’
06Commenter 6
The recent errors rather result of possible incorrect work of WOK.
The made modifications don't impact BRepMesh or TCollection units.
List of modified units:
- TNaming, PNaming, MNaming;
- BinLDrivers, BinMNaming;
- XmlLDrivers, XmlMNaming.
I suggest to check WOK.
07Commenter 7
Added archive (Attachment 1 (7Z)) with new tests.
08Commenter 3
Dear Commenter 1,

Branch CR23766 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 942 (953 on master)
Windows: 956 (958 on master)

products component :
Linux: 189 (189 on master)
Windows: 288 (288 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs caf bug23766_1 - OK
bugs caf bug23766_2 - BAD
http://occt-tests/CR23766-master-occt/Debian60-64/bugs/caf/bug23766_2.html
bugs caf bug23766_3 - OK
bugs caf bug23766_4 - OK
bugs caf bug23766_4 - OK
bugs caf bug23766_6 - OK

Testing on Linux:
Total MEMORY difference: 363223124 / 364374496
Total CPU difference: 46854.09000000151 / 45730.34000000074

Testing on Windows:
Total MEMORY difference: 424845864 / 426511108
Total CPU difference: 38399.71875 / 37321.515625

There are not differences in images found by testdiff.
09Commenter 9
Fixed. MDF_Tool.cxx modified.
10Commenter 10
Modifications are integrated in CR23766.
Retest, please.
11Commenter 11
Dear Commenter 1,

Branch CR23766 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 953 (953 on master)
Windows: 956 (958 on master)

products component :
Linux: 189 (189 on master)
Windows: 288 (288 on master)

Regressions:
omf advanced_meshcommon(005) J3
omf advanced_meshcut(006) I9, T1, X6, Y8, ZA3, ZA4, ZA5
omf advanced_meshfuse(007) E4, K2, K6, N2, R4, ZH7
omf advanced_meshtuc(008) F2
omf standard_meshcommon(009) C9, O9, ZM1, ZM8
omf standard_meshcut(010) G1, N7, ZI2, ZK6
omf standard_meshfuse(011) C9, O9, ZK7
omf standard_meshtuc(012) L8, ZC2, ZG3, ZI6

Improvements:
omf advanced_meshcommon(005) A8, A9, G3
omf advanced_meshcut(006) E1, O2, U7, W0
omf advanced_meshfuse(007) D3, I0, L3, M8, M9, O0, S9, Y2, Y3, Y7
omf advanced_meshtuc(008) B1
omf standard_meshcommon(009) K8, M2, Q0, ZN8
omf standard_meshcut(010) J1, ZB5, ZD4, ZJ9, ZK7, ZM0, ZY7
omf standard_meshfuse(011) K8, M2, Q0, ZL7
omf standard_meshtuc(012) ZH9, ZK1

Testing cases:
bugs caf(015) bug23766_1 - OK
bugs caf(015) bug23766_2 - OK
bugs caf(015) bug23766_3 - OK
bugs caf(015) bug23766_4 - OK
bugs caf(015) bug23766_4 - OK
bugs caf(015) bug23766_6 - OK

Testing on Linux:
Total MEMORY difference: 364240468 / 363107868
Total CPU difference: 43327.680000000255 / 45397.100000000675

Testing on Windows:
Total MEMORY difference: 424652488 / 424254540
Total CPU difference: 45886.15625 / 41790.390625

There are following differences in images found by testdiff.
http://occt-tests/CR23766-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR23766-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
IMAGE bugs vis buc60858: buc60858_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug21578: bug21578_Driver1_Viewer1_View1.png differs
IMAGE bugs modalg_2 bug22641: bug22641_Driver1_Viewer1_View1.png differs
IMAGE bugs modalg_4 bug8370: bug8370_Driver1_Viewer1_View1.png differs

12Commenter 12
The specified regressions are regressions caused by test of OMF component.
OMF component doesn't depend on Naming (TNaming and linked packages).
I suggest to check reasons of the regressions once again.
13Commenter 13
Dear Commenter 1,

Branch CR23766_1 was created as clone of branch CR23766.
Branch CR23766_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
There are regressions in omf test cases.
14Commenter 14
I checked the published regressions' set (see details below) in Windows 7x64 (VC10, win32 mode) environment as on original 'master' as on CR23766.

Conclusion is the next.
1) 'omf tests' have failures with ErrorStatus = {SplitFail, BadFace, DegLink} as on 'master' as on CR23766.
2) 'omf' tests don't depend on packages impacted by modifications of CR23766. It is proved as by my debugging as by opinion of msv.
Suggestion.
I suggest
1)separate regressions identified by CR23766 testing to independent bug.
2) assign it to the person responsible for OMF support.
3) Integrate patch CR23766.

Details are below.
================================================

Regressions:
omf advanced_meshcommon(005) J3
omf advanced_meshcut(006) I9, T1, X6, Y8, ZA3, ZA4, ZA5
omf advanced_meshfuse(007) E4, K2, K6, N2, R4, ZH7
omf advanced_meshtuc(008) F2
omf standard_meshcommon(009) C9, O9, ZM1, ZM8
omf standard_meshcut(010) G1, N7, ZI2, ZK6
omf standard_meshfuse(011) C9, O9, ZK7
omf standard_meshtuc(012) L8, ZC2, ZG3, ZI6
=========================================

A1)Test on 'master' WB (without patch CR23766) - Windows 7x64 (VC10, win32 mode).
Bad tests (#0000013):
advanced_meshcut: X8
advanced_meshfuse: K2 K6 N2 R4
standard_meshcommon: O9 ZM1 ZM8
standard_meshcut: G1 ZI2
standard_meshfuse: O9
standard_meshtuc: ZC2 ZG3
Total failed : 13
ErrorStatus = {SplitFail, BadFace, DegLink}
OMFBool_SplitElement => Splitter fails.
OMFAlgo _MeshIntersect => Compute method returns status DegLink
OMFAlgo_IntEF::intersect() calls OMFAlgo::ComputeAreaAndNormal (theFace, aNormal, aFacePnt) which computes Area < aSqToler.

Draw[30]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcommon\\J3
TODO OCC23207 ALL: Error: free boundary appears

Draw[31]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\J9
TODO OCC23207 Mandriva2010: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Draw[32]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\T1
TODO OCC23207 ALL: Error: free boundary appears
Draw[33]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\X6
TODO OCC23207 ALL: Error: free boundary appears
Draw[34]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\X8
TODO ?OCC23105 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[35]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\ZA3
Draw[36]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\ZA4
Draw[37]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\ZA

Draw[39]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\E4
TODO OCC23207 ALL: Error: free boundary appears
Draw[40]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\K2
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace
Draw[41]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\K6
TODO ?OCC23105 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = SplitFail
Draw[42]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\N2
TODO ?OCC23105 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = SplitFail
Draw[43]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\R4
TODO ?OCC23207 ALL: Error: operation completed with faulties
=================================
OCC338
FUSE
Case is duplicate of chl 913 E6
=================================
Boolean operation is done
ErrorStatus = SplitFail
Draw[44]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\ZH7

Draw[45]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshtuc\\F2
TODO OCC23207 ALL: Error: free boundary appears

Draw[46]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\C9
Draw[47]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\O9
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[48]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\ZM1
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace
Draw[49]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\ZM8

Draw[50]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\G1
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace
Draw[51]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\N7
Draw[52]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\ZI2
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[53]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\ZK6


Draw[54]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshfuse\\C9
Draw[55]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshfuse\\O9
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[56]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshfuse\\ZK7

Draw[57]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\L8
Draw[58]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\ZC2
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace SplitFail
Draw[59]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\ZG3
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[60]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\ZI6

A2) Attempt to check some other tests at the 'advanced_meshcommon':
Draw[4]> source A0
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = BadFace DegLink SplitFail
Draw[5]> source A1
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = BadFace DegLink SplitFail
Draw[6]> source A2
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[7]> source A3
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = BadFace DegLink SplitFail
Draw[8]> source A5
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[9]> source A6
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[10]> source A7
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[11]> source A8
TODO OCC23105 ALL: Error: free boundary appears
Draw[12]> source A9
TODO OCC23105 ALL: Error: free boundary appears
Draw[28]> source C4
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
=====================================
OCC68
COMMON
=====================================
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[29]> source C5
TODO OCC23207 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
=====================================
OCC68
COMMON
=====================================
Boolean operation is done
ErrorStatus = BadFace DegLink

All other groups (..D, E, ..., L) mainly have at least several failed tests with printed above ErrorStatus)

//==================================================================
B)Test using patch CR23766 - Windows 7x64 (VC10, win32 mode).
//==================================================================
Bad tests :
advanced_meshcommon: J3
advanced_meshcut: T1, X6, X8
advanced_meshfuse: E4, K2
advanced_meshtuc: F2
standard_meshcommon: O9, ZM1, ZM8
standard_meshcut: G1, ZI2, ZK6
standard_meshfuse: O9, ZK7
standard_meshtuc: ZC2, ZG3, ZI6
Total ==> 18
ErrorStatus = {SplitFail, BadFace, DegLink}

Draw[3]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcommon\\J3
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail

Draw[4]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\J9
TODO OCC23207 Mandriva2010: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Draw[5]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\T1
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[6]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\X6
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[7]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\X8
TODO ?OCC23105 ALL: Error: operation completed with faulties:
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[8]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\ZA3
Draw[9]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\ZA4
Draw[10]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshcut\\ZA5

Draw[12]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\E4
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[13]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\K2
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace SplitFail
Draw[14]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\K6
TODO ?OCC23105 ALL: Error: operation completed with faulties:
Draw[15]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\N2
TODO ?OCC23105 ALL: Error: operation completed with faulties:
Draw[16]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\R4
TODO ?OCC23207 ALL: Error: operation completed with faulties
=================================
OCC338
FUSE
Case is duplicate of chl 913 E6
=================================
Draw[17]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshfuse\\ZH7
Draw[18]> source W:\\SHARE\\occt-products\\tests\\omf\\advanced_meshtuc\\F2
TODO OCC23207 ALL: Error: free boundary appears
Boolean operation is done
ErrorStatus = SplitFail
Draw[19]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\C9
Draw[20]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\O9
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[21]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\ZM1
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace
Draw[22]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcommon\\ZM8
Boolean operation is done
ErrorStatus = SplitFail
Draw[23]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\G1
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace
Draw[24]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\N7
Draw[25]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\ZI2
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[26]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshcut\\ZK6
Boolean operation is done
ErrorStatus = SplitFail
Draw[27]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshfuse\\C9
Draw[28]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshfuse\\O9
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[29]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshfuse\\ZK7
Boolean operation is done
ErrorStatus = SplitFail
Draw[30]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\L8
Draw[31]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\ZC2
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace SplitFail
Draw[32]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\ZG3
TODO OCC23207 ALL: Error: operation completed with faulties:
Boolean operation is done
ErrorStatus = BadFace DegLink
Draw[33]> source W:\\SHARE\\occt-products\\tests\\omf\\standard_meshtuc\\ZI6
Boolean operation is done
ErrorStatus = SplitFail

15Commenter 15
I confirm SZY's statement. The changes in CR23766 cannot impact the mentioned OMF tests. If the tests change it tells about instability of algorithms involved in their execution. This problem should be solved in the scope of another bug.
16Commenter 16
Dear Commenter 1,
Non-stable test cases (omf) are corrected and pushed in new git repository CR23766 for Products part.