View Issue Details

IDProjectCategoryView StatusLast Update
0033530Open CASCADEOCCT:Data Exchangepublic2024-02-19 01:28
Reporterdpasukhi Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status verifiedResolutionfixed 
Target Version7.8.0 
Summary0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support
DescriptionSimplified interface to read metadata should be implemented.
It is a first iteration with limited functionality, the main idea is read only : Handle(StepBasic_GeneralProperty)
Handle(StepBasic_GeneralProperty) gp = Handle(StepBasic_GeneralProperty)::DownCast(entity);
string id = gp->Id()->ToCString();
string name = gp->Name()->ToCString();
string desc = gp->Description()->ToCString();


Additional information
and documentation updates
https://www.mbx-if.org/documents/rec_prac_user_def_attributes_v18.pdf
http://davidemercanti.altervista.org/sources/1M001934.stp
TagsNo tags attached.
Test case number33530

Attached Files

  • dtk_A1.txt (1,755 bytes)
  • dtk_A6.txt (1,093 bytes)
  • dtk_A7.txt (8,637 bytes)
  • stp_A1.txt (323 bytes)
  • stp_A6.txt (800 bytes)
  • stp_A7.txt (7,367 bytes)
  • stp_A8.txt (1,430 bytes)
  • dtk_A8.txt (2,575 bytes)
  • stp_A6-2.txt (838 bytes)

Relationships

has duplicate 0031722 new Data Exchange, STEP - support translation of User Defined Attributes to XCAF document 

Activities

git

2023-12-15 13:16

administrator   ~0114746

Branch CR33530 has been created by ichesnokova.

SHA-1: ee542ba053c6306b5675cca9c412733b9a24bf4d


Detailed log of new commits:

Author: ichesnok
Date: Thu Dec 14 16:40:50 2023 +0000

    0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support
    
    General_Property support was added

Author: ichesnok
Date: Fri Nov 24 13:36:10 2023 +0000

    //start

git

2023-12-15 13:17

administrator   ~0114747

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: d19fee31561d4e980602e2b5982629ddd785dcb6

git

2024-01-18 12:24

administrator   ~0114921

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: 51bbf9bd8eb2c748d94e5b9609848f8b1cc7df48

git

2024-01-18 14:31

administrator   ~0114924

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: f8a9524cc85f563045e896550aaaf3d65db18c66

git

2024-01-18 15:23

administrator   ~0114926

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: cf3d3d2970e302dd856bafc8c1c3784695f15683

git

2024-01-18 16:46

administrator   ~0114927

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: a944e57c15956dd53962dbb35cc0a8fdb53488fa

git

2024-01-19 11:13

administrator   ~0114931

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: c1c51e6bddd532140b43faf005c35ab841841f42

git

2024-01-25 14:04

administrator   ~0114971

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: fbc9b49660c15d95b40768d779cb75a3b7205ca4

ichesnokova

2024-01-25 14:05

developer   ~0114972

dtk_A1.txt (1,755 bytes)
dtk_A6.txt (1,093 bytes)
dtk_A7.txt (8,637 bytes)

ichesnokova

2024-01-25 14:08

developer   ~0114973

Dear dpasukhi,
please review branch CR33530.

ichesnokova

2024-01-25 15:25

developer   ~0114975

stp_A1.txt (323 bytes)
stp_A6.txt (800 bytes)
stp_A7.txt (7,367 bytes)

git

2024-01-26 15:53

administrator   ~0114986

Branch CR33530 has been updated by ichesnokova.

SHA-1: c61b4783b2c0d44c4a2493605742287651459639


Detailed log of new commits:

Author: ichesnok
Date: Fri Jan 26 12:51:10 2024 +0000

    //

git

2024-01-26 20:11

administrator   ~0114991

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: 0220d08641f43551ebaea5dcb4b91dbee445db65

git

2024-01-30 11:53

administrator   ~0115002

Branch CR33530 has been updated forcibly by ichesnokova.

SHA-1: ac606a1e865f2f9c24ae70bcbc2559ab65e3acad

ichesnokova

2024-01-30 11:58

developer   ~0115003

Dear dpasukhi,
please review branch CR33530

ichesnokova

2024-01-30 12:25

developer   ~0115005

stp_A8.txt (1,430 bytes)
dtk_A8.txt (2,575 bytes)
stp_A6-2.txt (838 bytes)

ika

2024-02-06 14:24

developer   ~0115044

Dear ichesnokova,

I have several remarks:

1) StepData_StepReaderData.cxx
+ if (FP.ParamType() != Interface_ParamInteger
+ && FP.ParamType() != Interface_ParamReal)
+ errmess = new String("Parameter n0.%d (%s) not an Integer");
not a "Number" in error message? Real is not an Integer, but according to the check it is accepted.

2) XSDRAWSTEP.cxx
+ "Doc filename [mode] [-metadata] [-stream]"
I do not like very much definition of one of the modes in the draw command, isn't it possible to use only common configuration parameters?

3) STEPCAFControl_Reader.hxx

+ Standard_EXPORT Standard_Boolean ReadMetadata(const Handle(XSControl_WorkSession)& WS,
+ const Handle(TDocStd_Document)& doc,
+ const StepData_Factors& theLocalFactors = StepData_Factors()) const;
please update names according to the code rules

+ NCollection_List<Handle(Transfer_Binder)>&theBinders) const;
space missed

4) All new files

+// Copyright (c) 2023 OPEN CASCADE SAS
please update the year

5) RWStepRepr_RWRealRepresentationItem.cxx

+void RWStepRepr_RWRealRepresentationItem::WriteStep(StepData_StepWriter& SW,
+ const Handle(StepRepr_RealRepresentationItem)& ent) const
please fix indents

6) RWStepAP214_ReadWriteModule.cxx

+static TCollection_AsciiString Reco_BooleanRepresentationItem("BOLEAN_REPRESENTATION_ITEM");
misprint one O missed in "boolean"

+ RWStepRepr_RWBooleanRepresentationItem tool; x2
+ RWStepRepr_RWRealRepresentationItem tool; x2
update names according to the code rules

7) RWStepBasic_RWGeneralPropertyRelationship.cxx
+void RWStepBasic_RWGeneralPropertyRelationship::ReadStep(const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepBasic_GeneralPropertyRelationship)& ent) const
please fix indents

8) tests/metadata/end
+set dump_file 1
forgot to return test generation mode to 0

9) StepBasic_GeneralPropertyRelationship.cxx
+void StepBasic_GeneralPropertyRelationship::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
+{
+ theDescription = aDescription;
+}
I think hasDescription should also be updated here

10) STEPCAFControl_Reader.cxx

+ myMetaMode(Standard_True)
but in StepData_ConfParameters.hxx this parameter is set for "false", is it turned ON or OFF by default?

+ // skip if key is empty
+ if (thePropDef->Name().IsNull())
string can be empty, even if it is not NULL, should such cases also be skipped?

+ Standard_Real afact = 1.;
name does not correspond to the code rules

11) Documentation
I do not see any changes in *.md files, dis you add any information about this new functionality? Please update the documentation.

12) Please start Jenkins testing for this new patch and do not forget to check for new warnings in both OS.

git

2024-02-09 15:43

administrator   ~0115061

Branch CR33530_1 has been created by ichesnokova.

SHA-1: 16905587c479998c829963fac2aba00451ef89d3


Detailed log of new commits:

Author: ichesnok
Date: Fri Feb 9 12:41:04 2024 +0000

    //remarks fixed

Author: ichesnok
Date: Fri Nov 24 13:36:10 2023 +0000

    0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support
    
    The necessary classes for GeneralProperty support were added.
    The ReadMetadata method was created for reading and saving attributes.

ichesnokova

2024-02-12 12:39

developer   ~0115063

Dear ika,
please review branch CR33530_1.
Tests: http://jenkins-test-10.nnov.opencascade.com/view/CR33530-master-ichesnok/view/COMPARE/

ika

2024-02-12 19:20

developer   ~0115068

1) StepData_StepReaderData.cxx
    if (FP.ParamType() == Interface_ParamInteger)
      val = atoi(FP.CValue());
    else if (FP.ParamType() == Interface_ParamReal)
      val = std::round(Interface_FileReaderData::Fastof(FP.CValue()));
    if (FP.ParamType() != Interface_ParamInteger)
      errmess = new String("Parameter n0.%d (%s) not an Integer");
 
I still think that it is not a good approach to have equal reactions for "Real" and (!(Real || Integer)) cases, maybe it will be better to split messages one for pure error and one for a kind of warning that the value was rounded.
 
6) RWStepAP214_ReadWriteModule.cxx
 
+ RWStepRepr_RWBooleanRepresentationItem tool; x2
+ RWStepRepr_RWRealRepresentationItem tool; x2
update names according to the code rules
 
this remark was missed.
 
9) StepBasic_GeneralPropertyRelationship.cxx
 void StepBasic_GeneralPropertyRelationship::SetDescription (const Handle(TCollection_HAsciiString)& aDescription)
 {
+ defDescription = true;
   theDescription = aDescription;
 }

I suggest making a bit more precise check and setting the flag to "true", in the common case and to "false" in case of setting a null description (unset).

git

2024-02-14 14:56

administrator   ~0115079

Branch CR33530_2 has been created by ichesnokova.

SHA-1: 6ef7226eaed9c9eb99e7012e99745a9838786597


Detailed log of new commits:

Author: ichesnok
Date: Wed Feb 14 11:42:04 2024 +0000

    //remarks fixed

Author: ichesnok
Date: Fri Nov 24 13:36:10 2023 +0000

    0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support
    
    The necessary classes for GeneralProperty support were added.
    The ReadMetadata method was created for reading and saving attributes.

ichesnokova

2024-02-14 15:08

developer   ~0115080

Dear ika,
please review branch CR33530_2.

git

2024-02-14 18:15

administrator   ~0115084

Branch CR33530_2 has been updated forcibly by ichesnokova.

SHA-1: ce956a52ea4eb4efd69668c87b7e5f0d34988e9d

git

2024-02-15 17:01

administrator   ~0115106

Branch CR33530_2 has been updated forcibly by ichesnokova.

SHA-1: f286953d85c4177f5b62c8ce135a54d1e69e14f5

ika

2024-02-15 17:24

developer   ~0115108

No more remarks.

Dear bugmaster,
please integrate
OCCT: CR33530_2

vglukhik

2024-02-19 01:19

administrator   ~0115125

Combination -
OCCT branch : IR-2024-02-16
master SHA - f286953d85c4177f5b62c8ce135a54d1e69e14f5
d2ef868da4165400c82322bd7f11b652decce47a
Products branch : IR-2024-02-16 SHA - 4019cd9a039aa9bb8252b865410207f8d4cf3eb4
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:
Ubuntu2004-64:
OCCT
Total CPU difference: 18281.94999999991 / 19921.70000000019 [-8.23%]
Products
Total CPU difference: 11399.109999999964 / 11627.009999999995 [-1.96%]
Windows-64-VC142:
OCCT
Total CPU difference: 20509.296875 / 20003.28125 [+2.53%]
Products
Total CPU difference: 12669.96875 / 12552.09375 [+0.94%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2024-02-19 01:28

administrator   ~0115132

Branch CR33530 has been deleted by vglukhik.

SHA-1: ac606a1e865f2f9c24ae70bcbc2559ab65e3acad

git

2024-02-19 01:28

administrator   ~0115133

Branch CR33530_1 has been deleted by vglukhik.

SHA-1: 16905587c479998c829963fac2aba00451ef89d3

git

2024-02-19 01:28

administrator   ~0115134

Branch CR33530_2 has been deleted by vglukhik.

SHA-1: f286953d85c4177f5b62c8ce135a54d1e69e14f5

Related Changesets

occt: master f286953d

2023-11-24 13:36:10

ichesnok

Details Diff
0033530: Data Exchange, Step Import - Implement GENERAL_PROPERTY support

The necessary classes for GeneralProperty support were added.
The ReadMetadata method was created for reading and saving attributes.
Affected Issues
0033530
mod - dox/user_guides/step/step.md Diff File
mod - src/RWStepAP214/RWStepAP214_GeneralModule.cxx Diff File
mod - src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx Diff File
mod - src/RWStepBasic/FILES Diff File
add - src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.cxx Diff File
add - src/RWStepBasic/RWStepBasic_RWGeneralPropertyAssociation.hxx Diff File
add - src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.cxx Diff File
add - src/RWStepBasic/RWStepBasic_RWGeneralPropertyRelationship.hxx Diff File
mod - src/RWStepRepr/FILES Diff File
add - src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.cxx Diff File
add - src/RWStepRepr/RWStepRepr_RWBooleanRepresentationItem.hxx Diff File
add - src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.cxx Diff File
add - src/RWStepRepr/RWStepRepr_RWRealRepresentationItem.hxx Diff File
mod - src/StepAP214/StepAP214_Protocol.cxx Diff File
mod - src/StepBasic/FILES Diff File
add - src/StepBasic/StepBasic_GeneralPropertyAssociation.cxx Diff File
add - src/StepBasic/StepBasic_GeneralPropertyAssociation.hxx Diff File
add - src/StepBasic/StepBasic_GeneralPropertyRelationship.cxx Diff File
add - src/StepBasic/StepBasic_GeneralPropertyRelationship.hxx Diff File
mod - src/StepBasic/StepBasic_MeasureValueMember.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_ConfigurationNode.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Provider.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Reader.cxx Diff File
mod - src/STEPCAFControl/STEPCAFControl_Reader.hxx Diff File
mod - src/StepData/StepData_ConfParameters.cxx Diff File
mod - src/StepData/StepData_ConfParameters.hxx Diff File
mod - src/StepData/StepData_StepReaderData.cxx Diff File
mod - src/StepRepr/FILES Diff File
add - src/StepRepr/StepRepr_BooleanRepresentationItem.cxx Diff File
add - src/StepRepr/StepRepr_BooleanRepresentationItem.hxx Diff File
add - src/StepRepr/StepRepr_RealRepresentationItem.cxx Diff File
add - src/StepRepr/StepRepr_RealRepresentationItem.hxx Diff File
mod - src/XSDRAWSTEP/XSDRAWSTEP.cxx Diff File
mod - tests/de_wrapper/configuration/A3 Diff File
mod - tests/de_wrapper/configuration/A4 Diff File
add - tests/metadata/begin Diff File
add - tests/metadata/end Diff File
add - tests/metadata/grids.list Diff File
add - tests/metadata/parse.rules Diff File
add - tests/metadata/step/A1 Diff File
add - tests/metadata/step/A2 Diff File
add - tests/metadata/step/A3 Diff File
add - tests/metadata/step/A4 Diff File
add - tests/metadata/step/A5 Diff File
add - tests/metadata/step/A6 Diff File
add - tests/metadata/step/A7 Diff File
add - tests/metadata/step/A8 Diff File
add - tests/metadata/step/A9 Diff File
add - tests/metadata/step/begin Diff File

Issue History

Date Modified Username Field Change
2023-11-14 12:48 dpasukhi New Issue
2023-11-14 12:48 dpasukhi Assigned To => dpasukhi
2023-11-14 12:49 dpasukhi Severity minor => feature
2023-11-14 12:49 dpasukhi Summary Data Exchange, Step Import - Implemen GENERAL_PROPERTY support => Data Exchange, Step Import - Implement GENERAL_PROPERTY support
2023-11-24 12:14 dpasukhi Description Updated
2023-11-24 12:14 dpasukhi Additional Information Updated
2023-11-24 12:14 dpasukhi Assigned To dpasukhi => ichesnokova
2023-12-15 13:16 git Note Added: 0114746
2023-12-15 13:17 git Note Added: 0114747
2024-01-18 12:24 git Note Added: 0114921
2024-01-18 14:31 git Note Added: 0114924
2024-01-18 15:23 git Note Added: 0114926
2024-01-18 16:46 git Note Added: 0114927
2024-01-19 11:14 git Note Added: 0114931
2024-01-25 14:04 git Note Added: 0114971
2024-01-25 14:05 ichesnokova Note Added: 0114972
2024-01-25 14:05 ichesnokova File Added: dtk_A1.txt
2024-01-25 14:05 ichesnokova File Added: dtk_A6.txt
2024-01-25 14:05 ichesnokova File Added: dtk_A7.txt
2024-01-25 14:08 ichesnokova Assigned To ichesnokova => dpasukhi
2024-01-25 14:08 ichesnokova Status new => resolved
2024-01-25 14:08 ichesnokova Note Added: 0114973
2024-01-25 15:25 ichesnokova Note Added: 0114975
2024-01-25 15:25 ichesnokova File Added: stp_A1.txt
2024-01-25 15:25 ichesnokova File Added: stp_A6.txt
2024-01-25 15:25 ichesnokova File Added: stp_A7.txt
2024-01-25 18:27 dpasukhi Assigned To dpasukhi => ichesnokova
2024-01-25 18:27 dpasukhi Status resolved => assigned
2024-01-25 18:28 dpasukhi Relationship added has duplicate 0031722
2024-01-26 15:53 git Note Added: 0114986
2024-01-26 20:11 git Note Added: 0114991
2024-01-30 11:53 git Note Added: 0115002
2024-01-30 11:58 ichesnokova Assigned To ichesnokova => dpasukhi
2024-01-30 11:58 ichesnokova Status assigned => resolved
2024-01-30 11:58 ichesnokova Note Added: 0115003
2024-01-30 12:25 ichesnokova Note Added: 0115005
2024-01-30 12:25 ichesnokova File Added: stp_A8.txt
2024-01-30 12:25 ichesnokova File Added: dtk_A8.txt
2024-01-30 12:25 ichesnokova File Added: stp_A6-2.txt
2024-02-05 18:28 dpasukhi Assigned To dpasukhi => ika
2024-02-06 14:24 ika Assigned To ika => ichesnokova
2024-02-06 14:24 ika Status resolved => assigned
2024-02-06 14:24 ika Note Added: 0115044
2024-02-09 15:43 git Note Added: 0115061
2024-02-12 12:39 ichesnokova Assigned To ichesnokova => ika
2024-02-12 12:39 ichesnokova Status assigned => resolved
2024-02-12 12:39 ichesnokova Note Added: 0115063
2024-02-12 19:20 ika Assigned To ika => ichesnokova
2024-02-12 19:20 ika Status resolved => assigned
2024-02-12 19:20 ika Note Added: 0115068
2024-02-14 14:56 git Note Added: 0115079
2024-02-14 15:08 ichesnokova Assigned To ichesnokova => ika
2024-02-14 15:08 ichesnokova Status assigned => resolved
2024-02-14 15:08 ichesnokova Note Added: 0115080
2024-02-14 18:15 git Note Added: 0115084
2024-02-15 17:01 git Note Added: 0115106
2024-02-15 17:24 ika Assigned To ika => bugmaster
2024-02-15 17:24 ika Status resolved => reviewed
2024-02-15 17:24 ika Note Added: 0115108
2024-02-19 01:19 vglukhik Note Added: 0115125
2024-02-19 01:22 Changeset attached => occt master f286953d
2024-02-19 01:25 vglukhik Status reviewed => verified
2024-02-19 01:25 vglukhik Resolution open => fixed
2024-02-19 01:25 vglukhik Test case number => 33530
2024-02-19 01:28 git Note Added: 0115132
2024-02-19 01:28 git Note Added: 0115133
2024-02-19 01:28 git Note Added: 0115134