MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0026925Open CASCADE[OCCT] OCCT:Data Exchangepublic2015-11-25 11:042019-09-14 08:25
Reportergka 
Assigned Togka 
PrioritynormalSeveritymajor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.9.1 
Target Version[OCCT] 7.5.0*Fixed 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 number
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

- 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*


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker