View Issue Details

IDProjectCategoryView StatusLast Update
0032954Open CASCADEOCCT:Data Exchangepublic2022-06-12 23:15
Reportersnn Assigned Tosnn  
PrioritynormalSeverityfeature 
Status verifiedResolutionfixed 
Target Version7.7.0 
Summary0032954: Data Exchange - Tool for applying transformation to XCAF document
DescriptionDevelop and implement a tool for applying changes to model components, for instance:
* change model part geometrical scaling
* replace some model parts for canonical primitives
* explode compound parts into sub-assemblies
* collapse sub-assemblies into model parts

Provide utilities for iterating through model graph/tree structure.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numbertests/xcaf/rescale/A1, tests/xcaf/rescale/A2, tests/xcaf/rescale/B1, tests/xcaf/rescale/C1

Relationships

related to 0031382 closedbugmaster Open CASCADE Data Exchange - BinXCAF should preserve length unit information 
Not all the children of this issue are yet resolved or closed.

Activities

git

2022-06-01 16:38

administrator   ~0108769

Branch CR32954 has been created by snn.

SHA-1: cd8a6a3bdf211ead2cbc576e88057da774dd34aa


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Fri May 13 12:53:03 2022 +0300

    0032954: Tool for applying transformation to OCAF document

git

2022-06-01 18:03

administrator   ~0108772

Branch CR32954 has been updated forcibly by snn.

SHA-1: 6831c76df24313ecb12c643fe21e97374cdd789e

git

2022-06-01 18:33

administrator   ~0108774

Branch CR32954 has been updated forcibly by snn.

SHA-1: edc4e9dc4f8973003705bbe9193a33b225763c65

git

2022-06-03 14:10

administrator   ~0108831

Branch CR32954 has been updated forcibly by snn.

SHA-1: a7ab7d9d4105a646af7b3802767602a4fed57c63

msv

2022-06-06 23:44

developer   ~0108871

src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx
Please name the fields in the structure AuxAssemblyItem with no 'my' prefix, as they are publicly available.

src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx
92: IsSimpleShape is always false, because IsReference is true.
94: myJumpLabel is not used and can be removed.
84,188:
  if (myShapeTool->IsReference(aSeed.myLabel))
  {
    Handle(TDataStd_TreeNode) aJumpNode;
    aSeed.myLabel.FindAttribute(XCAFDoc::ShapeRefGUID(), aJumpNode);
    if (aJumpNode->HasFather())
    {
      anOriginal = aJumpNode->Father()->Label();
    }

It is shorter to write:
  if (myShapeTool->GetReferredShape (aSeed.myLabel, anOriginal))


src/XCAFDoc/XCAFDoc_AssemblyTool.hxx
33,58: travesing => traversing
58: beginig => beginning
61,71: grpah => graph
62: accent => accept
79: please describe parameter theNode

msv

2022-06-07 16:25

developer   ~0108895

src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx
71: use "myGraph->NbNodes()" instead of "myGraph->GetNodes().Extent()"
95,100: Constucts => Constructs
150: oneBasedNodeId => theN
205: theParentId is not described.

src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx
134: use GetReferredShape
153-160: All this code can be replaced with "aLabel = anOriginal".
195-202: replace with GetReferredShape.

src/XCAFDoc/XCAFDoc_Editor.hxx
105: shoild => should
111: indeed it is not true, it does not raise exception.

src/XCAFDoc/XCAFDoc_Editor.cxx
574: anIsDone must be checked just after Traverse() for the subject of returning in case of failure.
594: please replace "Pow(theScaleFactor, 2)" with "theScaleFactor * theScaleFactor".
667: Use anItemId.GetPath().Last() instead of First().
645,676: these two block of code are duplicates, it is better to make a function.
749: returning false is too strong. We can just skip to continue with next dimension.
753: add "default" clause for the switch.
815,843: these two block of code are duplicates, it is better to make a function.
813,841: these flags are true because they are checked in line 744.

msv

2022-06-07 19:17

developer   ~0108898

src/XDEDRAW/XDEDRAW.cxx
1469: add " -> Standard_Boolean"
1496: remove trailing << ""

src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx
185: spelling NbOccurrances => NbOccurrences

git

2022-06-08 12:17

administrator   ~0108907

Branch CR32954 has been updated by snn.

SHA-1: a9d8e225211bb1f5098d94888b9f1f57f6856209


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Wed Jun 8 12:17:15 2022 +0300

    #Post-review changes

git

2022-06-08 12:19

administrator   ~0108908

Branch CR32954 has been updated forcibly by snn.

SHA-1: 7fcc7addb07cd782ccd20d996b8e038df40c002f

git

2022-06-09 16:09

administrator   ~0108939

Branch CR32954 has been updated by snn.

SHA-1: 7e690133aeca524453ff9e5ad661ad6c9aae0ab4


Detailed log of new commits:

Author: Sergey NIKONOV
Date: Thu Jun 9 15:24:09 2022 +0300

    #Post-review changes

git

2022-06-09 19:08

administrator   ~0108947

Branch CR32954 has been updated forcibly by msv.

SHA-1: 42c1c9f1900b2814a359e846344128153a63336a

msv

2022-06-09 19:08

developer   ~0108948

For integration:
occt - CR32954
products - none

kgv

2022-06-09 22:01

developer   ~0108949

+// Created on: 2022-05-11
+// Copyright (c) 2000-2022 OPEN CASCADE SAS

Header statements in new files look a little bit inconclusive.

git

2022-06-10 10:11

administrator   ~0108954

Branch CR32954 has been updated forcibly by msv.

SHA-1: b72b7ae6504b9bcf38e52fc931df5e52f3cf8e5c

afokin

2022-06-11 06:30

administrator   ~0108963

Combination -
OCCT branch : IR-2022-06-10
master SHA - 714fb6b5161c61af461fb6f804c3257e7c255e26
e0ceb716c70188b98130b1550914140d0502a6f9
Products branch : IR-2022-06-10 SHA - 922099197abc47b8fb21ee87dfeed841180dff8f
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: 18857.240000000642 / 18742.050000000618 [+0.61%]
Products
Total CPU difference: 11716.1900000001 / 11708.410000000114 [+0.07%]
Windows-64-VC14:
OCCT
Total CPU difference: 20667.296875 / 20643.21875 [+0.12%]
Products
Total CPU difference: 13249.671875 / 13299.6875 [-0.38%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2022-06-12 23:14

administrator   ~0108977

Branch CR32954 has been deleted by mnt.

SHA-1: b72b7ae6504b9bcf38e52fc931df5e52f3cf8e5c

Related Changesets

occt: master 714fb6b5

2022-05-13 12:53:03

snn


Committer: afokin Details Diff
0032954: Tool for applying transformation to OCAF document

New XCAFDoc classes:
- XCAFDoc_AssemblyIterator: iterator in depth along the assembly tree
- XCAFDoc_AssemblyGraph: assembly graph with iterator
- XCAFDoc_AssemblyTool: provides generic methods for traversing assembly tree and graph

A method for re-scaling (sub-)assembly geometry is added to XCAFDoc_Editor.

New DRAW commands:
- XDumpAssemblyTree: iterates through the assembly tree in depth up to the specified level, if any
- XDumpAssemblyGraph: prints assembly graph structure
- XDumpNomenclature: prints number of (sub-)assembly/part instances
- XRescaleGeometry: applies geometrical scale to (sub-)assembly
Affected Issues
0032954
mod - src/XCAFDoc/FILES Diff File
add - src/XCAFDoc/XCAFDoc_AssemblyGraph.cxx Diff File
add - src/XCAFDoc/XCAFDoc_AssemblyGraph.hxx Diff File
add - src/XCAFDoc/XCAFDoc_AssemblyIterator.cxx Diff File
add - src/XCAFDoc/XCAFDoc_AssemblyIterator.hxx Diff File
add - src/XCAFDoc/XCAFDoc_AssemblyTool.hxx Diff File
mod - src/XCAFDoc/XCAFDoc_Editor.cxx Diff File
mod - src/XCAFDoc/XCAFDoc_Editor.hxx Diff File
mod - src/XDEDRAW/XDEDRAW.cxx Diff File
mod - tests/xcaf/end Diff File
mod - tests/xcaf/grids.list Diff File
add - tests/xcaf/rescale/A1 Diff File
add - tests/xcaf/rescale/A2 Diff File
add - tests/xcaf/rescale/B1 Diff File
add - tests/xcaf/rescale/C1 Diff File
add - tests/xcaf/traverse/A1 Diff File
add - tests/xcaf/traverse/A2 Diff File
add - tests/xcaf/traverse/A3 Diff File
add - tests/xcaf/traverse/B1 Diff File

Issue History

Date Modified Username Field Change
2022-04-29 16:35 snn New Issue
2022-04-29 16:35 snn Assigned To => msv
2022-04-29 16:48 kgv Relationship added related to 0031382
2022-04-29 17:54 msv Assigned To msv => snn
2022-04-29 17:54 msv Severity minor => feature
2022-04-29 17:54 msv Product Version Unscheduled =>
2022-04-29 17:54 msv Target Version Unscheduled => 7.6.3
2022-04-29 17:54 msv Summary Tool for applying transformation to OCAF document => Data Exchange - Tool for applying transformation to XCAF document
2022-04-29 17:54 msv Steps to Reproduce Updated
2022-04-29 17:54 msv Status new => assigned
2022-04-29 17:58 azv Target Version 7.6.3 => 7.7.0
2022-06-01 16:38 git Note Added: 0108769
2022-06-01 18:03 git Note Added: 0108772
2022-06-01 18:33 git Note Added: 0108774
2022-06-03 14:10 git Note Added: 0108831
2022-06-05 20:37 snn Assigned To snn => msv
2022-06-05 20:37 snn Status assigned => resolved
2022-06-06 23:44 msv Note Added: 0108871
2022-06-07 16:25 msv Note Added: 0108895
2022-06-07 19:17 msv Note Added: 0108898
2022-06-07 19:17 msv Assigned To msv => snn
2022-06-07 19:17 msv Status resolved => assigned
2022-06-08 12:17 git Note Added: 0108907
2022-06-08 12:19 git Note Added: 0108908
2022-06-08 16:32 snn Assigned To snn => msv
2022-06-08 16:32 snn Status assigned => resolved
2022-06-09 16:09 git Note Added: 0108939
2022-06-09 19:08 git Note Added: 0108947
2022-06-09 19:08 msv Assigned To msv => bugmaster
2022-06-09 19:08 msv Status resolved => reviewed
2022-06-09 19:08 msv Note Added: 0108948
2022-06-09 22:01 kgv Note Added: 0108949
2022-06-10 10:11 git Note Added: 0108954
2022-06-11 06:29 afokin Test case number => tests/xcaf/rescale/A1, tests/xcaf/rescale/A2, tests/xcaf/rescale/B1, tests/xcaf/rescale/C1
2022-06-11 06:30 afokin Status reviewed => tested
2022-06-11 06:30 afokin Note Added: 0108963
2022-06-12 17:52 afokin Changeset attached => occt master 714fb6b5
2022-06-12 17:52 snn Assigned To bugmaster => snn
2022-06-12 17:52 snn Status tested => verified
2022-06-12 17:52 snn Resolution open => fixed
2022-06-12 23:14 git Note Added: 0108977