View Issue Details

IDProjectCategoryView StatusLast Update
0029827Open CASCADEOCCT:Modeling Datapublic2020-11-21 13:27
ReporterabvAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0029827: Modeling Data - TopoDS_Shape::Nullify() does not reset location
DescriptionTopoDS_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.)
Steps To Reproducebugs moddata_3 bug29827
TagsNo tags attached.
Test case numberbugs/moddata_3/bug29827

Relationships

related to 0029814 closedbugmaster Modeling Data - add method TopoDS_Shape::NbChildren() for simple check of sub-shapes number 

Activities

git

2020-11-12 16:38

administrator   ~0096721

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

kgv

2020-11-12 16:55

developer   ~0096724

+  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.

git

2020-11-13 10:57

administrator   ~0096736

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

kgv

2020-11-13 11:10

developer   ~0096737

Last edited: 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".

git

2020-11-13 11:44

administrator   ~0096740

Branch CR29827 has been updated forcibly by akaftasev.

SHA-1: 86f6f3df3d2391c0e2cdbc84d7f4c68cfb1fb0ba

msv

2020-11-13 11:48

developer   ~0096741

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.

msv

2020-11-13 11:49

developer   ~0096742

Also, create a new branch with one commit with updated description.

git

2020-11-13 16:26

administrator   ~0096750

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.

akaftasev

2020-11-14 14:21

developer   ~0096775

Results of testing:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR29827-master-akaftasev/view/COMPARE/

msv

2020-11-14 21:16

developer   ~0096777

di << "Usage: nullify shape\n";
Wrong command name here

                  "Nullify shape shapes. Usage: QANullifyShape shape",
Unclear sentence "Nullify shape shapes"

git

2020-11-16 09:15

administrator   ~0096784

Branch CR29827_1 has been updated forcibly by akaftasev.

SHA-1: b3461975cc2bb7dc4625f7ada563e30edcf09e12

msv

2020-11-16 11:41

developer   ~0096787

For integration:
occt - CR29827_1
products - none

bugmaster

2020-11-21 12:42

administrator   ~0096930

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

git

2020-11-21 13:27

administrator   ~0096951

Branch CR29827_1 has been deleted by inv.

SHA-1: b3461975cc2bb7dc4625f7ada563e30edcf09e12

git

2020-11-21 13:27

administrator   ~0096953

Branch CR29827 has been deleted by inv.

SHA-1: 86f6f3df3d2391c0e2cdbc84d7f4c68cfb1fb0ba

Related Changesets

occt: master 6e01c25a

2020-11-10 06:41:23

akaftasev


Committer: bugmaster Details Diff
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.
Affected Issues
0029827
mod - src/BRepTest/BRepTest_BasicCommands.cxx Diff File
mod - src/QABugs/QABugs_20.cxx Diff File
mod - src/TopLoc/TopLoc_Location.hxx Diff File
mod - src/TopoDS/TopoDS_Shape.hxx Diff File
add - tests/bugs/moddata_3/bug29827 Diff File

Issue History

Date Modified Username Field Change
2018-05-31 08:47 abv New Issue
2018-05-31 08:47 abv Assigned To => msv
2018-05-31 08:47 abv Relationship added related to 0029814
2018-05-31 16:33 msv Summary Modeling Data - TopoDS_Shape::Nullify() noes not reset location => Modeling Data - TopoDS_Shape::Nullify() does not reset location
2018-05-31 16:39 abv Description Updated
2019-08-12 17:45 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:53 msv Target Version 7.5.0 => 7.6.0
2020-11-06 11:12 szy Assigned To msv => akaftasev
2020-11-06 11:12 szy Status new => assigned
2020-11-12 16:38 git Note Added: 0096721
2020-11-12 16:55 kgv Note Added: 0096724
2020-11-13 10:57 git Note Added: 0096736
2020-11-13 10:58 akaftasev Assigned To akaftasev => msv
2020-11-13 10:58 akaftasev Status assigned => resolved
2020-11-13 10:58 akaftasev Steps to Reproduce Updated
2020-11-13 11:10 kgv Note Added: 0096737
2020-11-13 11:11 kgv Note Edited: 0096737
2020-11-13 11:44 git Note Added: 0096740
2020-11-13 11:48 msv Note Added: 0096741
2020-11-13 11:49 msv Note Added: 0096742
2020-11-13 11:49 msv Assigned To msv => akaftasev
2020-11-13 11:49 msv Status resolved => assigned
2020-11-13 16:26 git Note Added: 0096750
2020-11-14 14:21 akaftasev Note Added: 0096775
2020-11-14 14:21 akaftasev Assigned To akaftasev => msv
2020-11-14 14:21 akaftasev Status assigned => resolved
2020-11-14 21:16 msv Note Added: 0096777
2020-11-14 21:16 msv Assigned To msv => akaftasev
2020-11-14 21:16 msv Status resolved => assigned
2020-11-16 09:15 git Note Added: 0096784
2020-11-16 09:16 akaftasev Assigned To akaftasev => msv
2020-11-16 09:16 akaftasev Status assigned => resolved
2020-11-16 11:41 msv Note Added: 0096787
2020-11-16 11:41 msv Assigned To msv => bugmaster
2020-11-16 11:41 msv Status resolved => reviewed
2020-11-21 12:39 bugmaster Changeset attached => occt master 6e01c25a
2020-11-21 12:39 bugmaster Status reviewed => verified
2020-11-21 12:39 bugmaster Resolution open => fixed
2020-11-21 12:42 bugmaster Note Added: 0096930
2020-11-21 12:46 bugmaster Test case number => bugs/moddata_3/bug29827
2020-11-21 13:27 git Note Added: 0096951
2020-11-21 13:27 git Note Added: 0096953