MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025712Community[OCCT] OCCT:Shape Healingpublic2015-01-16 10:142015-05-14 15:32
ReporterRoman Lygin 
Assigned Tobugmaster 
PrioritynormalSeverityintegration request 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025712: Non-deterministic behavior of ShapeFix_Solid
DescriptionShapeFix_Solid has non-deterministic behavior in the case of composing multiple shells into a compound.
The root-cause is iteration over TopTools_DataMapOfShapeListOfShape which does not guarantee the order.
The enclosed file contains an input shape and two possible versions of resulting ones.

The fix also contains BRepTools_ReShape and subclass ShapeBuild_ReShape with all methods made virtual (not only Apply()). This mechanism is helpful to trace modifications stored and replayed in ReShape, for instance:
class MyReShape : public ShapeBuild_ReShape
{
    virtual void Replace (const TopoDS_Shapeconst TopoDS_Shape& ashape,
                                 const TopoDS_Shape& anewshape,
                                 const Standard_Boolean oriented) override
    {
         cout << "Storing " << GetInfo (ashape) << " and " << GetInfo (anewshape) << endl;
         ShapeBuild_ReShape::Replace();
    }
};

Handle_ShapeFix_Shape sfs = ...;
sfs->SetContext (new MyReShape);

Making methods virtual has no memory footprint implications as vtbl already existed. Performance impact is less than negligible given that the extra cost of ReShape calls is multiple order of magnitudes less than ShapeFix itself. Yet the new mechanism provides multiple conveniences without any need of recompilation of the OCC code.

Steps To Reproducefor {set i 1} {$i <= $N} { incr i } {
restore comp16.brep c
fix rc c
explode rc #two compounds
explode rc_2
numshape rc_2_1
numshape rc_2_2
# the number of shapes in rc_2_1 and rc_2_2 must not change from run to run
}
TagsNo tags attached.
Test case numberbugs heal(017) bug25712
Attached Fileszip file icon sh.zip (1,099,616 bytes) 2015-01-16 10:14

- Relationships

-  Notes
(0036127)
git (administrator)
2015-01-16 10:31

Branch CR25712 has been created by Roman Lygin.

SHA-1: 9e962fc6de99ac2c35143ed0a4b3db94884197dc


Detailed log of new commits:

Author: Roman Lygin
Date: Fri Jan 16 10:31:17 2015 +0400

    0025712: Non-deterministic behavior of ShapeFix_Solid
(0036166)
gka (developer)
2015-01-16 19:02

Branch CR25712 is ready to be tested
(0036473)
git (administrator)
2015-01-23 18:36

Branch CR25712 has been updated forcibly by apv.

SHA-1: c1bc06daacb0968cd4b7b9a0bbb1a612db4ebf0c
(0036475)
apv (tester)
2015-01-23 18:36

Branch CR25712 has been rebased on the current master
(0036754)
git (administrator)
2015-01-28 13:58

Branch CR25712 has been updated by apv.

SHA-1: 5fd2873b4d5871832cfcc941a89f38e1539d8b51


Detailed log of new commits:

Author: apv
Date: Wed Jan 28 13:58:05 2015 +0300

    Test-case for issue 0025712

(0036760)
apv (tester)
2015-01-28 15:09

Dear BugMaster,

Branch CR25712 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: c1bc06daacb0968cd4b7b9a0bbb1a612db4ebf0c

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component :
   Linux: 11 (11 on master)
   Windows: 1 (1 on master)

Regressions/Differences:
Not detected

Testing cases:
bugs heal(017) bug25712 - OK
http://occt-tests/CR25712-master-occt/Debian60-64/bugs/heal/bug25712.html [^]
http://occt-tests/CR25712-master-occt/Windows-32-VC10/bugs/heal/bug25712.html [^]

Testing on Linux:
Total MEMORY difference: 369624564 / 370114884
Total CPU difference: 52727.16000000017 / 51750.710000000094

Testing on Windows:
Total MEMORY difference: 276294800 / 275769192
Total CPU difference: 47352.265625 / 38148.296875
(0038559)
git (administrator)
2015-03-18 13:36

Branch CR25712 has been deleted by inv.

SHA-1: 5fd2873b4d5871832cfcc941a89f38e1539d8b51

- Related Changesets
occt: master a70f5823
Timestamp: 2015-01-29 10:56:53
Author: Roman Lygin
Committer: bugmaster
Details ] Diff ]
0025712: Non-deterministic behavior of ShapeFix_Solid

Test-case for issue 0025712
mod - src/BRepTools/BRepTools_ReShape.cdl Diff ] File ]
mod - src/ShapeBuild/ShapeBuild_ReShape.cdl Diff ] File ]
mod - src/ShapeFix/ShapeFix_Solid.cxx Diff ] File ]
add - tests/bugs/heal/bug25712 Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-01-16 10:14 Roman Lygin New Issue
2015-01-16 10:14 Roman Lygin Assigned To => gka
2015-01-16 10:14 Roman Lygin File Added: sh.zip
2015-01-16 10:31 git Note Added: 0036127
2015-01-16 10:41 Roman Lygin Status new => resolved
2015-01-16 19:02 gka Note Added: 0036166
2015-01-16 19:02 gka Assigned To gka => bugmaster
2015-01-16 19:02 gka Status resolved => reviewed
2015-01-23 16:28 apv Assigned To bugmaster => apv
2015-01-23 18:36 git Note Added: 0036473
2015-01-23 18:36 apv Note Added: 0036475
2015-01-28 13:58 git Note Added: 0036754
2015-01-28 14:00 apv Test case number => bugs heal(017) bug25712
2015-01-28 15:09 apv Note Added: 0036760
2015-01-28 15:09 apv Assigned To apv => bugmaster
2015-01-28 15:09 apv Status reviewed => tested
2015-01-30 14:00 bugmaster Changeset attached => occt master a70f5823
2015-01-30 14:00 bugmaster Status tested => verified
2015-01-30 14:00 bugmaster Resolution open => fixed
2015-03-18 13:36 git Note Added: 0038559
2015-05-14 15:29 user533 Status verified => closed
2015-05-14 15:32 user533 Fixed in Version => 6.9.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker