Archived issue #0029827
Modeling Data - TopoDS_Shape::Nullify() does not reset location
Description
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.)
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 reproduce
bugs moddata_3 bug29827
Public activity
15 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Commenter 4.
[revision removed]
Detailed log of new commits:
Author: Commenter 4
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
[revision removed]
Detailed log of new commits:
Author: Commenter 4
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
+ 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.
Branch [archived branch] has been updated by Commenter 4.
[revision removed]
Detailed log of new commits:
Author: Commenter 4
Date: Fri Nov 13 10:57:51 2020 +0300
#remarks
[revision removed]
Detailed log of new commits:
Author: Commenter 4
Date: Fri Nov 13 10:57:51 2020 +0300
#remarks
+ 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".
Branch [archived branch] has been updated forcibly by Commenter 4.
[revision removed]
[revision removed]
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.
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.
Also, create a new branch with one commit with updated description.
Branch [archived branch] has been created by Commenter 4.
[revision removed]
Detailed log of new commits:
Author: Commenter 4
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.
[revision removed]
Detailed log of new commits:
Author: Commenter 4
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.
di << "Usage: nullify shape\n";
Wrong command name here
"Nullify shape shapes. Usage: QANullifyShape shape",
Unclear sentence "Nullify shape shapes"
Wrong command name here
"Nullify shape shapes. Usage: QANullifyShape shape",
Unclear sentence "Nullify shape shapes"
Branch [archived branch] has been updated forcibly by Commenter 4.
[revision removed]
[revision removed]
For integration:
occt - CR29827_1
products - none
occt - CR29827_1
products - none
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records