Archived issue #0033737
Data Exchange, XCAF - Implementing filter tree functionality
Description
Needs to extend XCAFDoc_Editor with new functionality to filter tree by input labels with keeping structure.
The main goal is to simplify XCAF and keep only necessary leaf with related structure.
Additionally, needs to prepare DRAW command for that.
The main goal is to simplify XCAF and keep only necessary leaf with related structure.
Additionally, needs to prepare DRAW command for that.
Steps to reproduce
Not required
Public activity
17 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Jun 8 13:43:24 2024 +0000
0033737: Data Exchange, XCAF - Implementing filter tree functionality
Implement base functionality to filter tree with input label to keep.
TODO: test cases
[revision removed]
Detailed log of new commits:
Author: Author
Date: Sat Jun 8 13:43:24 2024 +0000
0033737: Data Exchange, XCAF - Implementing filter tree functionality
Implement base functionality to filter tree with input label to keep.
TODO: test cases
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Dear Ika,
please look into my changes.
OCCT: 33737
I tested with some files and it looks fine.
What do you think, it is fine to use something like this?
I will add some test cases on lovely step file if it will be fine from your side.
please look into my changes.
OCCT: 33737
I tested with some files and it looks fine.
What do you think, it is fine to use something like this?
I will add some test cases on lovely step file if it will be fine from your side.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Dear Author,
I tried to imagine problems with such a filtered shape tree, but I didn't find any, the solution is OK for me. The only remark is, do you care only about the assembly tree? GDTs and Notes will be corrupted after such an action. Please update these relations also or add an appropriate comment in the method description.
Also, I have a couple of remarks:
1)
+//=======================================================================
+//function : Extract
+//purpose :
+//=======================================================================
wrong name in the method header.
XCAFDoc_Editor.hxx
2) It is not so easy to recognize up-down relations in the description and names, there is no mistake, maybe it will be more human-readable after reformulation in child-parent words.
3) An empty line is missed before the last method.
+ Standard_EXPORT static bool GetDownRelatedShapeLabels(const TDF_Label& theLabel,
+ TDF_LabelMap& theRelatedLabels);
+ //! Filters original shape tree with keeping structure.
XCAFDoc_Editor.cxx
4) It looks like you do not need the returned result of GetUp../Down.. methods.
I tried to imagine problems with such a filtered shape tree, but I didn't find any, the solution is OK for me. The only remark is, do you care only about the assembly tree? GDTs and Notes will be corrupted after such an action. Please update these relations also or add an appropriate comment in the method description.
Also, I have a couple of remarks:
1)
+//=======================================================================
+//function : Extract
+//purpose :
+//=======================================================================
wrong name in the method header.
XCAFDoc_Editor.hxx
2) It is not so easy to recognize up-down relations in the description and names, there is no mistake, maybe it will be more human-readable after reformulation in child-parent words.
3) An empty line is missed before the last method.
+ Standard_EXPORT static bool GetDownRelatedShapeLabels(const TDF_Label& theLabel,
+ TDF_LabelMap& theRelatedLabels);
+ //! Filters original shape tree with keeping structure.
XCAFDoc_Editor.cxx
4) It looks like you do not need the returned result of GetUp../Down.. methods.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Jun 11 17:07:31 2024 +0000
// remark fixed
[revision removed]
Detailed log of new commits:
Author: Author
Date: Tue Jun 11 17:07:31 2024 +0000
// remark fixed
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Dear ika, remarks fixed (see CR33737_dev)
Combined branch - CR33737
Please check
Combined branch - CR33737
Please check
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Changes out-of-dev
I can't avoid a small optimization :^)
I can't avoid a small optimization :^)
Attachment 1 (PNG) (139,750 bytes)
Just one more style remark, wrong indent in
XCAFDoc_Editor.cxx
+void XCAFDoc_Editor::GetChildShapeLabels(const TDF_Label& theLabel,
+ TDF_LabelMap& theRelatedLabels)
Please proceed with testing and integration after this small fix.
XCAFDoc_Editor.cxx
+void XCAFDoc_Editor::GetChildShapeLabels(const TDF_Label& theLabel,
+ TDF_LabelMap& theRelatedLabels)
Please proceed with testing and integration after this small fix.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Remarks fixed, please wait before test system recovering.
Ready for integration.
OCCT: CR33737
OCCT: CR33737
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Author.
[revision removed]
[revision removed]