MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026925Open CASCADE[OCCT] OCCT:Data Exchangepublic2015-11-25 11:042020-05-16 14:21
Reportergka 
Assigned Todpasukhi 
PrioritynormalSeveritymajor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.9.1 
Target Version[OCCT] 7.5.0Fixed in Version 
Summary0026925: Data Exchange - Exception can be raised if assembly is empty
DescriptionException can be raised if assembly is empty. See comment to issue 0026314:
This fix broke the following logic that used to work in pre-7.0.

"In pre-7.0 one could create a structure of labels using plain OCAF/XDE API:
-assembly
 -instance
  -part (with shape)
and call ShapeTool::UpdateAssembly (asm_label). The latter would create a valid shape to be attached to asm_label.

Current implementation throws an exception:
  TopoDS_Shape aShape = GetShape(L); //<-- returns null
  Standard_Boolean isFree = aShape.Free(); //exception is thrown

The implementation assumes that the asm_label always contains some non-null shape."
Steps To ReproduceBugs is not reproduced in current OCCT version
TagsNo tags attached.
Test case numberbugs/step/bug26925
Attached Files? file icon 26925.tcl (208 bytes) 2019-09-12 17:13

- Relationships
child of 0026314closedgka Method XCAFDoc_ShapeTool::SetShape() works not correctly. 

-  Notes
(0087026)
gka (developer)
2019-09-12 17:12
edited on: 2019-09-12 17:13

In the current development version this scenario works correctly.
Method XCAFDoc_ShapeTool::UpdateAssembly to increase performance was replaced on the method XCAFDoc_ShapeTool::UpdateAssemblies which updated whole document.
At current OCCT version described scenario can be reproduced in Test Harness with following sequence of commands shown in log hereafter (see attached script 26925.tcl)


Draw[3]> XNewDoc D1
Draw[4]> XNewShape D1
0:1:1:1
Draw[7]> DFB D1
browser_D1
Draw[8]> box a 0 0 0 10 10 10
Draw[9]> XAddShape D1 a 0
0:1:1:2
Draw[10]> ttranslate a 10 0 0
Draw[11]> XAddComponent D1 0:1:1:1 a
0:1:1:1
Draw[11]> XGetShape s0 D1 0:1:1:1
Draw[12]> dump s0


*********** Dump of s0 *************
Shape : 1, FORWARD

Dump of 1 TShapes

-----------------

Flags : Free, Modified, Checked, Orientable, Closed, Infinite, Convex, Locked

TShape # 1 : COMPOUND 11000000 000001D69C4A9550



 -------
Dump of 0 Curve2ds
 -------


 -------
Dump of 0 Curves
 -------

 -------
Dump of 0 Polygon3Ds
 -------
 -------
Dump of 0 PolygonOnTriangulations
 -------

 -------
Dump of 0 surfaces
 -------

 -------
Dump of 0 Triangulations
 -------



 -------
 Dump of 0 Locations
 -------



Draw[20]>Draw[21]> he XUpd*
XUpdateAssemblies : Doc : updates assembly compounds
Draw[21]> XUpdateAssemblies D1
Draw[22]> XGetShape s1 D1 0:1:1:1
Draw[23]> nbs s1
Number of shapes in s1
 VERTEX : 8
 EDGE : 12
 WIRE : 6
 FACE : 6
 SHELL : 1
 SOLID : 1
 COMPSOLID : 0
 COMPOUND : 1
 SHAPE : 35

(0087080)
abv (manager)
2019-09-14 08:25

Proposed DRAW commands do not allow reproducing the situation described in the issue since command XNewShape creates empty compound, i.e. the shape on the assembly root label always exists. By looking in the code I suspect that if the assembly label has no shape attached, it will not be updated with UpdateAssemblies() (i.e. no exception but also no action). To be checked
(0092080)
git (administrator)
2020-05-12 19:50

Branch CR26925 has been created by dpasukhi.

SHA-1: 72e6020d50e6d78474fbd4dfb420db28ff92caa0


Detailed log of new commits:

Author: dpasukhi
Date: Tue May 12 19:51:12 2020 +0300

    0026925: Data Exchange - Exception can be raised if assembly is empty
    
    - Issue is done in previous version OCCT
    - Add test to verify the creating of the label structure using plain OCAF/XDE API
    - Situation when the assembly label has no shape attached is correct
(0092086)
ika (developer)
2020-05-13 13:45

Only one test case was added, it passed successfully:
http://occt-tests/CR26925-master-dpasukhi-OCCT/Windows-64-VC14/bugs/step/bug26925.html [^]
http://occt-tests/CR26925-master-dpasukhi-OCCT/Debian80-64/bugs/step/bug26925.html [^]

No remarks.
(0092087)
ika (developer)
2020-05-13 13:46

Dear bugmaster,

please integrate:
OCCT - CR26925
PRODUCTS - NOT
(0092129)
bugmaster (administrator)
2020-05-15 11:06

Combination -
OCCT branch : WEEK-20
master SHA - d9eb6aca8789e6b8ff6742e3ad60a4dadf0cd37e
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : WEEK-20 SHA - eb85b0feb479f67f3a505bcb285922a288149f74
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: 17146.6200000001 / 17177.020000000186 [-0.18%]
Products
Total CPU difference: 11178.21000000009 / 11272.470000000078 [-0.84%]
Windows-64-VC14:
OCCT
Total CPU difference: 18609.671875 / 18646.015625 [-0.19%]
Products
Total CPU difference: 13007.71875 / 13180.21875 [-1.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0092184)
git (administrator)
2020-05-16 14:21

Branch CR26925 has been deleted by inv.

SHA-1: 72e6020d50e6d78474fbd4dfb420db28ff92caa0

- Related Changesets
occt: master 72e6020d
Timestamp: 2020-05-12 16:51:12
Author: dpasukhi
Details ] Diff ]
0026925: Data Exchange - Exception can be raised if assembly is empty

- Issue is done in previous version OCCT
- Add test to verify the creating of the label structure using plain OCAF/XDE API
- Situation when the assembly label has no shape attached is correct
add - tests/bugs/step/bug26925 Diff ] File ]

- Issue History
Date Modified Username Field Change
2015-11-25 11:04 gka New Issue
2015-11-25 11:04 gka Assigned To => gka
2015-11-25 11:05 gka Relationship added child of 0026314
2016-02-17 10:56 abv Target Version 7.0.0 => 7.1.0
2016-10-26 11:39 gka Target Version 7.1.0 => 7.2.0
2017-07-27 09:24 abv Target Version 7.2.0 => 7.4.0
2019-09-04 17:41 kgv Summary Exception can be raised if assembly is empty => Data Exchange - Exception can be raised if assembly is empty
2019-09-12 12:43 gka Status new => assigned
2019-09-12 17:12 gka Note Added: 0087026
2019-09-12 17:13 gka File Added: 26925.tcl
2019-09-12 17:13 gka Note Edited: 0087026 View Revisions
2019-09-12 17:14 gka Assigned To gka => abv
2019-09-12 17:14 gka Status assigned => resolved
2019-09-12 17:14 gka Steps to Reproduce Updated View Revisions
2019-09-14 08:25 abv Note Added: 0087080
2019-09-14 08:25 abv Assigned To abv => gka
2019-09-14 08:25 abv Status resolved => assigned
2019-09-14 08:25 abv Target Version 7.4.0 => 7.5.0
2020-04-15 21:27 gka Assigned To gka => dpasukhi
2020-05-12 19:50 git Note Added: 0092080
2020-05-12 19:53 dpasukhi Status assigned => resolved
2020-05-13 13:45 ika Note Added: 0092086
2020-05-13 13:46 ika Note Added: 0092087
2020-05-13 13:46 ika Assigned To dpasukhi => bugmaster
2020-05-13 13:46 ika Status resolved => reviewed
2020-05-15 11:06 bugmaster Note Added: 0092129
2020-05-15 11:06 bugmaster Status reviewed => tested
2020-05-15 11:07 bugmaster Test case number => bugs/step/bug26925
2020-05-16 14:07 dpasukhi Changeset attached => occt master 72e6020d
2020-05-16 14:07 dpasukhi Assigned To bugmaster => dpasukhi
2020-05-16 14:07 dpasukhi Status tested => verified
2020-05-16 14:07 dpasukhi Resolution open => fixed
2020-05-16 14:21 git Note Added: 0092184


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker