View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033660 | Open CASCADE | OCCT:Data Exchange | public | 2024-04-01 17:50 | 2024-09-16 23:49 |
Reporter | Assigned To | dkulikov | |||
Priority | normal | Severity | minor | ||
Status | assigned | Resolution | open | ||
Target Version | 7.8.1 | ||||
Summary | 0033660: Data Exchange, Step Import - Adding product attributes to metadata | ||||
Description | Needs to update ReadMetadata method. | ||||
Steps To Reproduce | Not required | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
Branch CR33660 has been created by ichesnokova. SHA-1: b936aa6ed1a1ca2a34e07c6563091757104ee9fb Detailed log of new commits: Author: ichesnok Date: Mon Apr 1 12:13:15 2024 +0100 0033660: Data Exchange, Step Import - Adding product attributes to metadata Attributes of product was added to metadata. |
|
Dear dpasukhi, please review branch CR33660. |
|
There are new bug into Hoops are detected. No remarks about result of importing. But there are some remarks about code. Continue should be? + TopoDS_Shape aShape = TransferBRep::ShapeResult(aTP, aBinder); + if (aShape.IsNull()) + continue; + Better to rework from: + TDF_Label aShapeLabel; + if (myMap.IsBound(aShape)) + { + aShapeLabel = myMap.Find(aShape); + } + if (!aShapeLabel.IsNull()) + { to: + TDF_Label aShapeLabel; + if (myMap.Find(aShape, aShapeLabel)) + { There always Add can be perform. + if (!aGeneralLabelMap.Contains(aShapeLabel)) + { + aGeneralLabelMap.Add(aShapeLabel); + } to aGeneralLabelMap.Add(aShapeLabel); Just bacause the code of Add already have checking for existing :) The same remarks about Add @@ -5134,28 +5172,78 @@ Standard_Boolean STEPCAFControl_Reader::ReadMetadata(const Handle(XSControl_Work if (!aShapeLabel.IsNull()) { aLabelSeq.Append(aShapeLabel); + if (!aGeneralLabelMap.Contains(aShapeLabel)) + { + aGeneralLabelMap.Add(aShapeLabel); + } // fill user defined attribute map Can be optimize to use instead of isBound Seek operation and working with pointer. Nor Bind all the time, we can work with map element directly all the time to avoid copying :) Anything else about IsBoind then Find can be replaces just with Find :) There more samples, please check your fix with that kind of remarks + if (anAttrMap.IsBound(aLabelIt.Value())) + { + NCollection_Sequence<Handle(StepRepr_PropertyDefinition)> anAttrib = anAttrMap.Find(aLabelIt.Value()); |
|
Branch CR33660_1 has been created by ichesnokova. SHA-1: fdd94ff6c6d36c3c66d682448e17f4e8256b2342 Detailed log of new commits: Author: ichesnok Date: Mon Apr 1 12:13:15 2024 +0100 0033660: Data Exchange, Step Import - Adding product attributes to metadata Attributes of product was added to metadata. |
|
Dear dpasukhi, remarks were fixed. Please review branch CR33660_1. |
|
Needs to use "const auto& aPair" I mean needs to use reference.+ std::pair<TCollection_AsciiString, Handle(TCollection_HAsciiString)> aPair = aSeqIt.Value(); + if (aPair.second.IsNull() || aPair.second->String().IsEmpty()) + { No more remarks |
|
Branch CR33660_1 has been updated forcibly by ichesnokova. SHA-1: ade87423fedf4002b235eeadebae5b418e5463f1 |
|
Need to think about integrate this solution into OCCT. But in that case need to think about special flag or enum for metadata |
|
Need to verify and integrate to the master if no conflicts. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-04-01 17:50 |
|
New Issue | |
2024-04-01 17:50 |
|
Assigned To | => ichesnokova |
2024-04-01 17:53 |
|
Summary | Data Exchange - Adding product attributes to metadata => Data Exchange, Step Import - Adding product attributes to metadata |
2024-04-01 18:23 | git | Note Added: 0115531 | |
2024-04-01 18:31 |
|
Assigned To | ichesnokova => dpasukhi |
2024-04-01 18:31 |
|
Status | new => resolved |
2024-04-01 18:31 |
|
Note Added: 0115533 | |
2024-04-03 19:29 | dpasukhi | Assigned To | dpasukhi => ichesnokova |
2024-04-03 19:29 | dpasukhi | Status | resolved => assigned |
2024-04-03 19:29 | dpasukhi | Note Added: 0115565 | |
2024-04-04 17:44 | git | Note Added: 0115585 | |
2024-04-04 17:47 |
|
Assigned To | ichesnokova => dpasukhi |
2024-04-04 17:47 |
|
Status | assigned => resolved |
2024-04-04 17:47 |
|
Note Added: 0115587 | |
2024-04-04 19:07 | dpasukhi | Note Added: 0115592 | |
2024-04-04 19:08 | dpasukhi | Assigned To | dpasukhi => ichesnokova |
2024-04-04 19:08 | dpasukhi | Status | resolved => feedback |
2024-04-04 20:39 | git | Note Added: 0115593 | |
2024-04-10 18:20 | dpasukhi | Note Added: 0115679 | |
2024-08-26 19:41 | dpasukhi | Assigned To | ichesnokova => dpasukhi |
2024-08-26 19:41 | dpasukhi | Status | feedback => resolved |
2024-08-26 19:41 | dpasukhi | Steps to Reproduce Updated | |
2024-08-26 19:41 | dpasukhi | Note Added: 0116558 | |
2024-09-16 23:48 | dpasukhi | Assigned To | dpasukhi => dkulikov |
2024-09-16 23:48 | dpasukhi | Status | resolved => assigned |
2024-09-16 23:49 | dpasukhi | Project | Internal => Open CASCADE |