Archived issue #0028104
Data Exchange - Extract sub-assembly (XDE)
Description
Extraction 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.
A proposed place for a new functionality is XCAFDoc_Editor.
Steps to reproduce
test bugs xde bug28104
Public activity
27 archived notes
Participants are labeled by their role within this record.
One addendum: this does not include PMI (to be treated in a separate issue).
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
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
[revision removed]
Detailed log of new commits:
Author: Author
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
Analyzing & Solution elaboration
Branch [archived branch] has been created by Commenter 1.
[revision removed]
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
[revision removed]
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
Branch [archived branch] has been created by Commenter 1.
[revision removed]
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
[revision removed]
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
Branch [archived branch] has been created by Commenter 1.
[revision removed]
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
[revision removed]
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
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been created by Commenter 1.
[revision removed]
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
[revision removed]
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
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
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-Commenter 1/view/COMPARE/
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-Commenter 1/view/COMPARE/
Dear Commenter 1,
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.
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.
Branch [archived branch] has been created by Commenter 1.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
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
[revision removed]
Detailed log of new commits:
Author: Commenter 1
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
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
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-Commenter 1/view/COMPARE/
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-Commenter 1/view/COMPARE/
Dear Commenter 1,
+ //! 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?
+ //! 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?
Branch [archived branch] has been updated by Commenter 1.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Wed Oct 27 23:41:57 2021 +0300
// all remarks have been done
[revision removed]
Detailed log of new commits:
Author: Commenter 1
Date: Wed Oct 27 23:41:57 2021 +0300
// all remarks have been done
Branch [archived branch] has been created by Commenter 1.
[revision removed]
Detailed log of new commits:
Author: Commenter 1
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
[revision removed]
Detailed log of new commits:
Author: Commenter 1
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
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
No more remarks.
Dear Commenter 5,
please integrate:
OCCT - CR28104_6
Products - NOT
Dear Commenter 5,
please integrate:
OCCT - CR28104_6
Products - NOT
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
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
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records