MantisBT - Open CASCADE
View Issue Details
0029827Open CASCADE[OCCT] OCCT:Modeling Datapublic2018-05-31 08:472020-11-21 13:27
abv 
bugmaster 
normalminor 
verifiedfixed 
 
[OCCT] 7.6.0* 
bugs/moddata_3/bug29827
0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
TopoDS_Shape::Nullify() only nullifies the stored TShape but not location (and not orientation). This means that two different IsNull() shapes still can be neither IsEqual() nor even IsSame(), and have different hash codes.

It can be more consistent to reset also location to Null and orientation to default value (TopAbs_EXTERNAL) in the method Nullify().

(The issue has been detected during review of 0029814.)
bugs moddata_3 bug29827
No tags attached.
related to 0029814closed bugmaster Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of sub-shapes number 
Issue History
2018-05-31 08:47abvNew Issue
2018-05-31 08:47abvAssigned To => msv
2018-05-31 08:47abvRelationship addedrelated to 0029814
2018-05-31 16:33msvSummaryModeling Data - TopoDS_Shape::Nullify() noes not reset location => Modeling Data - TopoDS_Shape::Nullify() does not reset location
2018-05-31 16:39abvDescription Updatedbug_revision_view_page.php?rev_id=19201#r19201
2019-08-12 17:45msvTarget Version7.4.0 => 7.5.0
2020-09-14 22:53msvTarget Version7.5.0 => 7.6.0*
2020-11-06 11:12szyAssigned Tomsv => akaftasev
2020-11-06 11:12szyStatusnew => assigned
2020-11-12 16:38gitNote Added: 0096721
2020-11-12 16:55kgvNote Added: 0096724
2020-11-13 10:57gitNote Added: 0096736
2020-11-13 10:58akaftasevAssigned Toakaftasev => msv
2020-11-13 10:58akaftasevStatusassigned => resolved
2020-11-13 10:58akaftasevSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23999#r23999
2020-11-13 11:10kgvNote Added: 0096737
2020-11-13 11:11kgvNote Edited: 0096737bug_revision_view_page.php?bugnote_id=96737#r24001
2020-11-13 11:44gitNote Added: 0096740
2020-11-13 11:48msvNote Added: 0096741
2020-11-13 11:49msvNote Added: 0096742
2020-11-13 11:49msvAssigned Tomsv => akaftasev
2020-11-13 11:49msvStatusresolved => assigned
2020-11-13 16:26gitNote Added: 0096750
2020-11-14 14:21akaftasevNote Added: 0096775
2020-11-14 14:21akaftasevAssigned Toakaftasev => msv
2020-11-14 14:21akaftasevStatusassigned => resolved
2020-11-14 21:16msvNote Added: 0096777
2020-11-14 21:16msvAssigned Tomsv => akaftasev
2020-11-14 21:16msvStatusresolved => assigned
2020-11-16 09:15gitNote Added: 0096784
2020-11-16 09:16akaftasevAssigned Toakaftasev => msv
2020-11-16 09:16akaftasevStatusassigned => resolved
2020-11-16 11:41msvNote Added: 0096787
2020-11-16 11:41msvAssigned Tomsv => bugmaster
2020-11-16 11:41msvStatusresolved => reviewed
2020-11-21 12:39bugmasterChangeset attached => occt master 6e01c25a
2020-11-21 12:39bugmasterStatusreviewed => verified
2020-11-21 12:39bugmasterResolutionopen => fixed
2020-11-21 12:42bugmasterNote Added: 0096930
2020-11-21 12:46bugmasterTest case number => bugs/moddata_3/bug29827
2020-11-21 13:27gitNote Added: 0096951
2020-11-21 13:27gitNote Added: 0096953

Notes
(0096721)
git   
2020-11-12 16:38   
Branch CR29827 has been created by akaftasev.

SHA-1: 9338ee52771ad1d287d958194788d50e79dfd3b5


Detailed log of new commits:

Author: akaftasev
Date: Tue Nov 10 09:41:23 2020 +0300

    0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
    
    TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient
    Nullified shapes are equal and same now.
    Added new Draw command "nullify" and test for current bug
(0096724)
kgv   
2020-11-12 16:55   
+  theCommands.Add("nullify",

This doesn't look like a good name for such command - bnullify or tnullify might be better. Or move the command to QABugs as this functionality does not look very useful for regular usage in Draw...

+    myLocation = TopLoc_Location();

I have some doubts if it wouldn't be reasonable adding TopLoc_Location::Clear() method or checking if myLocation is not empty before assignment.
(0096736)
git   
2020-11-13 10:57   
Branch CR29827 has been updated by akaftasev.

SHA-1: c66b555380d4ebc0e63690c827180e07ecc8d1d3


Detailed log of new commits:

Author: akaftasev
Date: Fri Nov 13 10:57:51 2020 +0300

    #remarks

(0096737)
kgv   
2020-11-13 11:10   
(edited on: 2020-11-13 11:11)
+  Standard_EXPORT void Clear()
+  {
+    myItems.Clear();

Standard_EXPORT should not be used for inline methods.

+  theCommands.Add("nullify",

Commands within QA group follow a name convention like "OCC29827" or "QANullifyShape".

(0096740)
git   
2020-11-13 11:44   
Branch CR29827 has been updated forcibly by akaftasev.

SHA-1: 86f6f3df3d2391c0e2cdbc84d7f4c68cfb1fb0ba
(0096741)
msv   
2020-11-13 11:48   
Please avoid using shapes from the private section for the test of the open bug.
In this particular case, you don't need restore any shapes at all. Just create a shape and use the commands orientation, ttranslate to change its location and orientation.
(0096742)
msv   
2020-11-13 11:49   
Also, create a new branch with one commit with updated description.
(0096750)
git   
2020-11-13 16:26   
Branch CR29827_1 has been created by akaftasev.

SHA-1: bc46b2b5b768e881d7b1dbaf14fa82b9c37981bc


Detailed log of new commits:

Author: akaftasev
Date: Tue Nov 10 09:41:23 2020 +0300

    0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
    
    TopoDS_Shape::Nullify() nullify not only myTShape but myLocation and myOrient.
    Nullified shapes are equal and same now.
    Added test.
(0096775)
akaftasev   
2020-11-14 14:21   
Results of testing:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29827-master-akaftasev/view/COMPARE/ [^]
(0096777)
msv   
2020-11-14 21:16   
di << "Usage: nullify shape\n";
Wrong command name here

                  "Nullify shape shapes. Usage: QANullifyShape shape",
Unclear sentence "Nullify shape shapes"
(0096784)
git   
2020-11-16 09:15   
Branch CR29827_1 has been updated forcibly by akaftasev.

SHA-1: b3461975cc2bb7dc4625f7ada563e30edcf09e12
(0096787)
msv   
2020-11-16 11:41   
For integration:
occt - CR29827_1
products - none
(0096930)
bugmaster   
2020-11-21 12:42   
Combination -
OCCT branch : IR-2020-11-20
master SHA - c5892d852bb462075f9db03f31085e35d7b59f35
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-11-20 SHA - a5d1f89f5fa83c955e6a604f57a5b590eb433b43
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18024.090000000127 / 17964.340000000077 [+0.33%]
Products
Total CPU difference: 12166.12000000011 / 12169.520000000111 [-0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19696.90625 / 19723.125 [-0.13%]
Products
Total CPU difference: 13644.875 / 13567.078125 [+0.57%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0096951)
git   
2020-11-21 13:27   
Branch CR29827_1 has been deleted by inv.

SHA-1: b3461975cc2bb7dc4625f7ada563e30edcf09e12
(0096953)
git   
2020-11-21 13:27   
Branch CR29827 has been deleted by inv.

SHA-1: 86f6f3df3d2391c0e2cdbc84d7f4c68cfb1fb0ba