View Issue Details

IDProjectCategoryView StatusLast Update
0028104Open CASCADEOCCT:Data Exchangepublic2021-11-23 11:01
ReporterakzAssigned Tosmoskvin 
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.6.0Fixed in Version7.6.0 
Summary0028104: Data Exchange - Extract sub-assembly (XDE)
DescriptionExtraction of specified parts from XDE assembly with attached colors, layers and materials to a new document (or possibly into the specified place of another existing document).

A proposed place for a new functionality is XCAFDoc_Editor.
Steps To Reproducetest bugs xde bug28104
TagsNo tags attached.
Test case numberbugs/xde/bug28104, bugs/xde/bug28104_1

Relationships

parent of 0032683 closedsmoskvin Open CASCADE Coding Rules, XCAFDoc_Editor::CloneMetaData() - unexpected bitwise operations 
related to 0026302 assigneddpasukhi Open CASCADE Data Exchange - new functionality XCAFDoc_Editor::Compact() converting the assembly to compound 

Activities

ssv

2016-11-14 18:49

developer   ~0060321

One addendum: this does not include PMI (to be treated in a separate issue).

git

2016-11-21 12:18

administrator   ~0060606

Branch CR28104 has been created by akz.

SHA-1: bd34f77a0ad2f6ce4486c2734d82756f3df8f477


Detailed log of new commits:

Author: akz
Date: Mon Nov 21 12:18:08 2016 +0300

    0028104: Extract sub-assembly (XDE). Added new functionality to XCAFDoc_Editor that extracts labels and put them as components of the specified label

dpasukhi

2021-09-26 23:50

administrator   ~0104383

Analyzing & Solution elaboration

git

2021-09-28 03:43

administrator   ~0104411

Branch CR28104_1 has been created by dpasukhi.

SHA-1: 2590309104e6bf2b49b8c980029d5982e0b6da99


Detailed log of new commits:

Author: dpasukhu
Date: Mon Nov 21 12:18:08 2016 +0300

    0028104: Data Exchange - Extract sub-assembly (XDE)
    
    - Added getting and setting Material to XCAFDoc_Editor::Expand.
    - Added XCAFDoc_Editor::Extract to transfer part to a new location.
    XCAFDoc_Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers and materials

git

2021-10-01 05:11

administrator   ~0104460

Branch CR28104_2 has been created by dpasukhi.

SHA-1: 8fa59e84c6729c71dab652f7f2caf6468b341bb5


Detailed log of new commits:

Author: dpasukhu
Date: Mon Nov 21 12:18:08 2016 +0300

    0028104: Data Exchange - Extract sub-assembly (XDE)
    
    - Added getting and setting Material to XCAFDoc_Editor::Expand.
    - Added XCAFDoc_Editor::Extract to transfer part to a new location.
    XCAFDoc_Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers and materials

git

2021-10-02 18:11

administrator   ~0104491

Branch CR28104_3 has been created by dpasukhi.

SHA-1: 5f3d6793d860cb08879fd9eaf20a52698a4002b4


Detailed log of new commits:

Author: dpasukhu
Date: Mon Nov 21 12:18:08 2016 +0300

    0028104: Data Exchange - Extract sub-assembly (XDE)
    
    - Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
    - Added XCAFDoc_Editor::Extract to transfer part to a new location.
    XCAFDoc_Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props

git

2021-10-02 18:19

administrator   ~0104492

Branch CR28104_3 has been updated forcibly by dpasukhi.

SHA-1: bbc87381abea2b502c3f54bc663eae668926c12d

git

2021-10-10 16:00

administrator   ~0104579

Branch CR28104_4 has been created by dpasukhi.

SHA-1: 527d8c97a87bce4047e8b7ac0837c372759f8150


Detailed log of new commits:

Author: dpasukhu
Date: Mon Nov 21 12:18:08 2016 +0300

    0028104: Data Exchange - Extract sub-assembly (XDE)
    
    - Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
    - Added XCAFDoc_Editor::Extract to transfer part to a new location.
    XCAFDoc_Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props

git

2021-10-11 11:48

administrator   ~0104583

Branch CR28104_4 has been updated forcibly by dpasukhi.

SHA-1: 901df8c9dd1048f2644c8f55d32ae202ca3af13b

dpasukhi

2021-10-11 11:52

administrator   ~0104584

Dear IKA,
Please review:
OCCT: CR28104_4
PROD: NO

Added a new draw command "XExtract dstDoc [dstAssmblSh] srcDoc srcLabel1 srcLabel2 ...". You can test it with any XDE document.

All tests are OK, see:
http://jenkins-test-occt.nnov.opencascade.com/view/CR28104-master-dpasukhi/view/COMPARE/

ika

2021-10-11 14:13

manager   ~0104588

Dear dpasukhi,

I have several remarks:

XCAFDoc_Editor.hxx

1) + //! or creates new shape label if theDstLabel is Doc
I can guess what you meant, but it is not very clear from the description how label can be a document? Also you do not check isn't a label a color label, for example, it will work at the same way as the main document label.

2) Standard_EXPORT static TDF_Label CloneShapeLebel - a misprint

3) getParams/setParams
As for me, it will be more readable and useful to make a simple method like copyMetaData(theFromLabel, theNewLabel, TheSomeFlags) and update its body after adding a new metadata type, not the parameters list. Such method also can be used as a public for some reasons.

XCAFDoc_Editor.cxx

4) aDstShapeTool->SetAutoNaming(Standard_False);
Why do you switch off autonaming? If I am not mistaken, all the named shapes will get necessary names during parameters coping, but additional processing of unnamed can be removed from setParams() with the swithed on autonaming.

5) If you do not agree with (3) some remarks about getParams:

aColorTool->GetColor(theLabel, aTypes[anInd], aColor);
And what if there is no such type of color? You will add a default one? Because False result is not processed.

for (TDF_AttributeIterator anAttIter(theLabel); anAttIter.More(); anAttIter.Next())
According to my experience, also Location and ShapeMap shouldn't be copied.

git

2021-10-26 23:49

administrator   ~0104886

Branch CR28104_5 has been created by dpasukhi.

SHA-1: a7eda44cecbfaa7cad7168b04fd407d80e3ff388


Detailed log of new commits:

Author: dpasukhi
Date: Tue Oct 26 23:45:42 2021 +0300

    0028104: Data Exchange - Extract sub-assembly (XDE)
    
    - Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
    - Added XCAFDoc_Editor::Extract to transfer part to a new location
      - XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props
    - Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location
    - Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document
    - Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool
    - Protected against creating a new label for non-existent tools via extract or expand process

git

2021-10-27 09:30

administrator   ~0104887

Branch CR28104_5 has been updated forcibly by dpasukhi.

SHA-1: 97ec42b02ad38dd87421defa5174eeeb261f9e8a

dpasukhi

2021-10-27 10:48

administrator   ~0104890

Dear IKA,
please review CR28104_5

All remarks have been done.
Protection against a forced creation of non-existing tools was added.

All tests are OK, see:
http://jenkins-test-08.nnov.opencascade.com/view/CR28104-master-dpasukhi/view/COMPARE/

ika

2021-10-27 17:41

manager   ~0104907

Dear dpasukhi,

+ //! Copies meta data conteins from the source label to the destination label
contAins

+ const Standard_Boolean toCopyMaterial = theToCopyMaterial & XCAFDoc_DocumentTool::CheckLayerTool(theSrcLabel);
+ const Standard_Boolean toCopyVisMaterial = XCAFDoc_DocumentTool::CheckLayerTool(theSrcLabel);

Layer tool? Not the corresponded tools?

kgv

2021-10-27 21:11

developer   ~0104919

git

2021-10-27 23:42

administrator   ~0104925

Branch CR28104_5 has been updated by dpasukhi.

SHA-1: 7357e292fe3e9e5d3e8da67d5565759cb1a61a8b


Detailed log of new commits:

Author: dpasukhi
Date: Wed Oct 27 23:41:57 2021 +0300

    // all remarks have been done

git

2021-10-27 23:43

administrator   ~0104926

Branch CR28104_6 has been created by dpasukhi.

SHA-1: a8bdc97ae1e03296d9a1cb87ff6d7a1952e9656e


Detailed log of new commits:

Author: dpasukhi
Date: Tue Oct 26 23:45:42 2021 +0300

    0028104: Data Exchange - Extract sub-assembly (XDE)
    
    - Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
    - Added XCAFDoc_Editor::Extract to transfer part to a new location
      - XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props
    - Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location
    - Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document
    - Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool
    - Protected against creating a new label for non-existent tools via extract or expand process

git

2021-10-28 10:25

administrator   ~0104929

Branch CR28104_6 has been updated forcibly by dpasukhi.

SHA-1: 0d6efcedb2d6a6288b0753f19baf270d5cfb99ed

ika

2021-10-28 13:14

manager   ~0104937

No more remarks.

Dear bugmaster,
please integrate:
OCCT - CR28104_6
Products - NOT

smoskvin

2021-10-30 11:21

administrator   ~0104981

Combination -
OCCT branch : OCCT-760
master SHA - 0d186a91c07a6217cd132ec7ea03f1e6f7a2a9ce
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : OCCT-760 SHA - c472aa8da77ba932a88c890c58c81b09f9ae00b5
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: 17728.310000000427 / 17750.15000000046 [-0.12%]
Products
Total CPU difference: 11578.090000000113 / 11624.980000000118 [-0.40%]
Windows-64-VC14:
OCCT
Total CPU difference: 19746.84375 / 19683.796875 [+0.32%]
Products
Total CPU difference: 12740.0 / 10994.3125 [+15.88%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2021-11-02 21:08

administrator   ~0105010

Branch CR28104 has been deleted by mnt.

SHA-1: bd34f77a0ad2f6ce4486c2734d82756f3df8f477

git

2021-11-02 21:08

administrator   ~0105011

Branch CR28104_1 has been deleted by mnt.

SHA-1: 2590309104e6bf2b49b8c980029d5982e0b6da99

git

2021-11-02 21:08

administrator   ~0105012

Branch CR28104_2 has been deleted by mnt.

SHA-1: 8fa59e84c6729c71dab652f7f2caf6468b341bb5

git

2021-11-02 21:08

administrator   ~0105013

Branch CR28104_3 has been deleted by mnt.

SHA-1: bbc87381abea2b502c3f54bc663eae668926c12d

git

2021-11-02 21:09

administrator   ~0105014

Branch CR28104_4 has been deleted by mnt.

SHA-1: 901df8c9dd1048f2644c8f55d32ae202ca3af13b

git

2021-11-02 21:09

administrator   ~0105015

Branch CR28104_5 has been deleted by mnt.

SHA-1: 7357e292fe3e9e5d3e8da67d5565759cb1a61a8b

git

2021-11-02 21:09

administrator   ~0105016

Branch CR28104_6 has been deleted by mnt.

SHA-1: 0d6efcedb2d6a6288b0753f19baf270d5cfb99ed

Related Changesets

occt: master 510d099d

2021-10-26 20:45:42

dpasukhi


Committer: smoskvin Details Diff
0028104: Data Exchange - Extract sub-assembly (XDE)

- Added getting and setting Material, VisMaterial and Props to XCAFDoc_Editor::Expand.
- Added XCAFDoc_Editor::Extract to transfer part to a new location
- XCAFDoc_Editor::Extract allows to extract a part as a component or simply extract to an empty label with attached colors, layers, materials, vismaterials and props
- Added XCAFDoc_Editor::CloneMetaData to clone shape's attributes to new location
- Added XCAFDoc_Editor::CloneShapeLabel to clone shape to new document
- Added XCAFDoc_DocumentTool::Check*Tool methods to check an existing of an any tool
- Protected against creating a new label for non-existent tools via extract or expand process
Affected Issues
0028104
mod - src/XCAFDoc/XCAFDoc_DocumentTool.cxx Diff File
mod - src/XCAFDoc/XCAFDoc_DocumentTool.hxx Diff File
mod - src/XCAFDoc/XCAFDoc_Editor.cxx Diff File
mod - src/XCAFDoc/XCAFDoc_Editor.hxx Diff File
mod - src/XDEDRAW/XDEDRAW_Common.cxx Diff File
add - tests/bugs/xde/bug28104 Diff File
add - tests/bugs/xde/bug28104_1 Diff File

Issue History

Date Modified Username Field Change
2016-11-14 18:45 akz New Issue
2016-11-14 18:45 akz Assigned To => akz
2016-11-14 18:49 ssv Note Added: 0060321
2016-11-14 18:53 akz Status new => assigned
2016-11-21 12:18 git Note Added: 0060606
2017-07-27 10:38 abv Target Version 7.2.0 => 7.4.0
2019-09-04 12:58 abv Target Version 7.4.0 => 7.5.0
2020-09-17 20:26 gka Assigned To akz =>
2020-09-17 20:26 gka Target Version 7.5.0 => 7.6.0
2021-02-09 15:20 asuraven Assigned To => asuraven
2021-02-09 15:26 kgv Summary Extract sub-assembly (XDE) => Data Exchange - Extract sub-assembly (XDE)
2021-08-31 10:26 szy Assigned To asuraven => dpasukhi
2021-08-31 14:28 gka Target Version 7.6.0 => 7.7.0
2021-09-26 23:50 dpasukhi Note Added: 0104383
2021-09-28 03:43 git Note Added: 0104411
2021-10-01 05:11 git Note Added: 0104460
2021-10-02 18:11 git Note Added: 0104491
2021-10-02 18:19 git Note Added: 0104492
2021-10-10 16:00 git Note Added: 0104579
2021-10-11 11:48 git Note Added: 0104583
2021-10-11 11:52 dpasukhi Note Added: 0104584
2021-10-11 11:52 dpasukhi Assigned To dpasukhi => ika
2021-10-11 11:52 dpasukhi Status assigned => resolved
2021-10-11 11:52 dpasukhi Steps to Reproduce Updated
2021-10-11 14:13 ika Note Added: 0104588
2021-10-11 14:14 ika Assigned To ika => dpasukhi
2021-10-11 14:14 ika Status resolved => assigned
2021-10-26 23:49 git Note Added: 0104886
2021-10-27 09:30 git Note Added: 0104887
2021-10-27 10:45 dpasukhi Relationship added related to 0026302
2021-10-27 10:48 dpasukhi Note Added: 0104890
2021-10-27 10:48 dpasukhi Assigned To dpasukhi => ika
2021-10-27 10:48 dpasukhi Status assigned => resolved
2021-10-27 17:41 ika Note Added: 0104907
2021-10-27 17:41 ika Assigned To ika => dpasukhi
2021-10-27 17:41 ika Status resolved => assigned
2021-10-27 21:11 kgv Note Added: 0104919
2021-10-27 23:42 git Note Added: 0104925
2021-10-27 23:43 git Note Added: 0104926
2021-10-28 10:25 git Note Added: 0104929
2021-10-28 12:04 dpasukhi Assigned To dpasukhi => ika
2021-10-28 12:04 dpasukhi Status assigned => resolved
2021-10-28 13:14 ika Note Added: 0104937
2021-10-28 13:14 ika Assigned To ika => bugmaster
2021-10-28 13:14 ika Status resolved => reviewed
2021-10-29 17:19 bugmaster Target Version 7.7.0 => 7.6.0
2021-10-30 11:21 smoskvin Note Added: 0104981
2021-10-30 11:21 smoskvin Status reviewed => tested
2021-10-30 11:24 smoskvin Test case number => bugs/xde/bug28104, bugs/xde/bug28104_1
2021-11-02 17:57 smoskvin Changeset attached => occt master 510d099d
2021-11-02 17:57 smoskvin Assigned To bugmaster => smoskvin
2021-11-02 17:57 smoskvin Status tested => verified
2021-11-02 17:57 smoskvin Resolution open => fixed
2021-11-02 21:08 git Note Added: 0105010
2021-11-02 21:08 git Note Added: 0105011
2021-11-02 21:08 git Note Added: 0105012
2021-11-02 21:08 git Note Added: 0105013
2021-11-02 21:09 git Note Added: 0105014
2021-11-02 21:09 git Note Added: 0105015
2021-11-02 21:09 git Note Added: 0105016
2021-11-23 11:01 kgv Relationship added parent of 0032683