DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0033737

Data Exchange, XCAF - Implementing filter tree functionality

Open CASCADEOCCT:Data Exchangeverified17 public notes

Search issues

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.

Steps to reproduce

Not required

Public activity

17 archived notes

Participants are labeled by their role within this record.

01Commenter 2
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
02Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
03Author
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.
04Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
05Commenter 3
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.
06Commenter 2
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
07Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
08Author
Dear ika, remarks fixed (see CR33737_dev)
Combined branch - CR33737

Please check
09Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
10Author
Changes out-of-dev
I can't avoid a small optimization :^)
Attachment 1 (PNG) (139,750 bytes)   
11Commenter 3
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.
12Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
13Author
Remarks fixed, please wait before test system recovering.
14Author
15Commenter 3
Ready for integration.

OCCT: CR33737
16Commenter 2
Branch [archived branch] has been deleted by Author.

[revision removed]
17Commenter 2
Branch [archived branch] has been deleted by Author.

[revision removed]