Archived issue #0033530
Data Exchange, Step Import - Implement GENERAL_PROPERTY support
Description
Simplified interface to read metadata should be implemented.
It is a first iteration with limited functionality, the main idea is read only : Handle(StepBasic_GeneralProperty)
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
Public activity
29 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
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
[revision removed]
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
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Attachment 1 (TXT) (1,755 bytes)
Attachment 2 (TXT) (1,093 bytes)
Attachment 3 (TXT) (8,637 bytes)
Dear Author,
please review branch CR33530.
please review branch CR33530.
Attachment 5 (TXT) (323 bytes)
Attachment 7 (TXT) (800 bytes)
Attachment 8 (TXT) (7,367 bytes)
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: ichesnok
Date: Fri Jan 26 12:51:10 2024 +0000
//
[revision removed]
Detailed log of new commits:
Author: ichesnok
Date: Fri Jan 26 12:51:10 2024 +0000
//
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Dear Author,
please review branch CR33530
please review branch CR33530
Attachment 9 (TXT) (1,430 bytes)
Attachment 4 (TXT) (2,575 bytes)
Attachment 6 (TXT) (838 bytes)
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.
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.
Branch [archived branch] has been created by Participant.
[revision removed]
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.
[revision removed]
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.
Dear ika,
please review branch CR33530_1.
Tests: http://jenkins-test-10.nnov.opencascade.com/view/CR33530-master-ichesnok/view/COMPARE/
please review branch CR33530_1.
Tests: http://jenkins-test-10.nnov.opencascade.com/view/CR33530-master-ichesnok/view/COMPARE/
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).
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).
Branch [archived branch] has been created by Participant.
[revision removed]
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.
[revision removed]
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.
Dear ika,
please review branch CR33530_2.
please review branch CR33530_2.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
No more remarks.
Dear Commenter 1,
please integrate
OCCT: CR33530_2
Dear Commenter 1,
please integrate
OCCT: CR33530_2
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:
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
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:
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
Branch [archived branch] has been deleted by Commenter 4.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Commenter 4.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Commenter 4.
[revision removed]
[revision removed]
Related records