DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0026314

Method XCAFDoc_ShapeTool::SetShape() works not correctly.

Open CASCADEOCCT:Data Exchangeclosed28 public notes

Search issues

Description

If you set the shape to the parts, sub-label of this part is not removed and the assembly, which contains a reference to a part is not updated.

Steps to reproduce

pload ALL
box b 0 0 0 1 1 1
box b1 -10 -10 -10 10 10 10
box b2 1 1 1 10 10 10
NewDoc d
compound b1 c1
XAddShape d b 1
XAddShape d c1 1
DFB d
XShow d
XSetShape d 0:1:1:3 b2
XShow d

Public activity

28 archived notes

Participants are labeled by their role within this record.

01Commenter 4
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Thu Jun 4 14:40:31 2015 +0300

    0026314: Method SetShape working not correctly.
02Commenter 4
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Commenter 3
Branch CR26314 is ready to be tested
04Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
05Commenter 5
Branch [archived branch] has been rebased on the current master
06Commenter 6
Dear Commenter 3,

Branch CR26314 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 25 (25 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 37 (37 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
http://occt-tests/CR26314-master-occt-64/Debian70-64/summary.html
http://occt-tests/CR26314-master-occt-64/Windows-64-VC10/summary.html
bugs xde bug22962
http://occt-tests/CR26314-master-products-64/Debian70-64/summary.html
http://occt-tests/CR26314-master-products-64/Windows-64-VC10/summary.html
dxf doc_1 A3, A6, A7, A8, D4, E8, F1, H6, H8, J2, K3, K6, L3
dxf read bug22396

Testing on Linux:
Total MEMORY difference: 97152584 / 97130406 [+0.02%]
Total CPU difference: 18654.179999999957 / 18400.239999999994 [+1.38%]

Testing on Windows:
Total MEMORY difference: 56435593 / 56538976 [-0.18%]
Total CPU difference: 17340.18195429885 / 17210.90392559895 [+0.75%]

There are differences in images found by testdiff:
http://occt-tests/CR26314-master-products-64/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR26314-master-products-64/Windows-64-VC10/diff-Windows-64-VC10.html
dxf read bug23611

07Commenter 4
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
08Commenter 8
Branch CR26314 is ready to be tested
09Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
10Commenter 10
Branch [archived branch] has been rebased on the current master.
11Commenter 4
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: apv
Date: Wed Jun 17 13:04:20 2015 +0300

    Test-cases for issues #0025441 and #0026314

12Commenter 4
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
13Commenter 13
Dear Commenter 3,

Branch CR26314 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 25 (25 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 37 (37 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
bugs xde bug26314 - FAILED
http://occt-tests/CR26314-master-occt-64/Debian70-64/bugs/xde/bug26314.html
http://occt-tests/CR26314-master-occt-64/Windows-64-VC10/bugs/xde/bug26314.html

Testing on Linux:
Total MEMORY difference: 96572409 / 97541184 [-0.99%]
Total CPU difference: 18283.38000000002 / 18422.260000000082 [-0.75%]

Testing on Windows:
Total MEMORY difference: 56617926 / 56623130 [-0.01%]
Total CPU difference: 17424.718896198992 / 17102.311629498927 [+1.89%]
14Commenter 4
Branch [archived branch] has been updated by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Wed Jun 17 14:36:53 2015 +0300

    small correction

15Commenter 15
Branch CR26314 is ready to be tested
16Commenter 4
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: apv
Date: Thu Jun 18 12:00:53 2015 +0300

    Small corrections of test-cases for issues #0025441 and #0026314

17Commenter 17
Dear Commenter 3,

Branch CR26314 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 25 (25 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 37 (37 on master)
   Windows: 0 (0 on master)

Regressions/Differences:
Not detected

Testing cases:
bugs xde bug26314 - OK
http://occt-tests/CR26314-master-occt-64/Debian70-64/bugs/xde/bug26314.html
http://occt-tests/CR26314-master-occt-64/Windows-64-VC10/bugs/xde/bug26314.html

Testing on Linux:
Total MEMORY difference: 96816352 / 96952890 [-0.14%]
Total CPU difference: 18233.14000000003 / 18238.510000000075 [-0.03%]

Testing on Windows:
Total MEMORY difference: 56620301 / 56625066 [-0.01%]
Total CPU difference: 17581.21909939906 / 17088.240339298918 [+2.88%]
18Commenter 4
Branch [archived branch] has been deleted by Participant.

[revision removed]
19Commenter 5
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.

This change can be worked around in user code by creating an empty compound.
20Commenter 4
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: abv
Date: Tue Feb 16 14:53:16 2016 +0300

    Revert "0026314: Method SetShape working not correctly."
    
    This reverts [revision removed].
21Commenter 21
I have reverted this change and committed it to branch CR26314, please test and integrate.

The reason of reversion is that this change causes serious performance regression in XDE when dealing with assemblies, as assembly gets updated in the process of filling its structure, and this leads to deep and useless recursive updates. For instance, on file Attachment 1 (STP) (attached), reading on current master takes 11 sec, while on CR26314 (and on previous versions of OCCT) only 3.5 sec.
22Commenter 22
We shall revise this fix and bring it to operable state after OCCT 7 release
23Commenter 4
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
24Commenter 24
Dear Commenter 3,
Branch CR26314 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 36 (36 on master)
Windows: 0 (0 on master)

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 90473352 / 89361649 [+1.24%]
Total CPU difference: 19432.299999999992 / 19290.179999999964 [+0.74%]
products component :
Total MEMORY difference: 25594787 / 25568818 [+0.10%]
Total CPU difference: 5331.849999999989 / 5408.809999999997 [-1.42%]

Testing on Windows:
occt component :
Total MEMORY difference: 57344998 / 57374211 [-0.05%]
Total CPU difference: 17924.686501098957 / 18532.903199898905 [-3.28%]
products component :
Total MEMORY difference: 17241216 / 17255879 [-0.08%]
Total CPU difference: 4996.088025999947 / 5203.382154799955 [-3.98%]

There are no differences in images found by testdiff.
25Commenter 25
Dear Commenter 3,
Branch CR26314 is TESTED.
26Commenter 26
Reverse completed, the issue should be re-considered
27Commenter 27
This issue is not relevant since more optimal approach has been implemented within #0028055 (in OCCT 7.2.0), closing it
28Commenter 4
Branch [archived branch] has been deleted by Commenter 6.

[revision removed]

Related records