Archived issue #0028024
Configuration - revise XSTEPResource initialization
Description
Current initialization logic of default Data Exchange STEP/IGES parameters defined by CSF_IGESDefaults/CSF_STEPDefaults environment variables src/XSTEPResource file should be revised.
src/XSTEPResource might be embedded using general resource embedding mechanism introduced within #0027258
src/XSTEPResource might be embedded using general resource embedding mechanism introduced within #0027258
Steps to reproduce
It's improvement
Public activity
26 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: atereshi
Date: Mon May 16 16:17:12 2022 +0300
0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: During loading STEP and IGES files automatic shape healing is applied to loaded entities. Parameters of applied shape healing described in resource files: XSTEPResource/STEP and XSTEPResource/IGES. This method is very inconvenient: you can't dynamically change parameter from the program to adjust healing process for a specific file.
Change: For each ShapeProcess operator described class with options (ShapeProcess_*OperatorName*Options). Default values for these options are assigned in the class constructor. Predefined values for sequences of operators of STEP or IGES loading (saving) processes are stored in ShapeProcess_PredefinedOptions class and applied in XSAlgo_AlgoContainer. A new DRAW command "param2" has been added to operationally redefine the operator option with a user value.
Result: ShapeProcess and the shape healing when reading STEP or IGES, in particular, no longer depend from the resource file. The user can operationally change the operator parameter from DRAW command to adjust the shape healing process.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon May 16 16:17:12 2022 +0300
0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: During loading STEP and IGES files automatic shape healing is applied to loaded entities. Parameters of applied shape healing described in resource files: XSTEPResource/STEP and XSTEPResource/IGES. This method is very inconvenient: you can't dynamically change parameter from the program to adjust healing process for a specific file.
Change: For each ShapeProcess operator described class with options (ShapeProcess_*OperatorName*Options). Default values for these options are assigned in the class constructor. Predefined values for sequences of operators of STEP or IGES loading (saving) processes are stored in ShapeProcess_PredefinedOptions class and applied in XSAlgo_AlgoContainer. A new DRAW command "param2" has been added to operationally redefine the operator option with a user value.
Result: ShapeProcess and the shape healing when reading STEP or IGES, in particular, no longer depend from the resource file. The user can operationally change the operator parameter from DRAW command to adjust the shape healing process.
Branch CR28024 is ready to review.
src/XSAlgo/AlgoContainer.hxx
src/XSAlgo/AlgoContainer.cxx
src/ShapeProcess/ShapeProcess_UOperator.hxx
src/ShapeProcess/ShapeProcess_UOperator.cxx
src/ShapeProcess/ShapeProcess_ShapeContext.hxx
src/ShapeProcess/ShapeProcess_ShapeContext.cxx
src/ShapeProcess/ShapeProcess_PredefinedOptions.hxx
src/ShapeProcess/ShapeProcess_PredefinedOptions.hxx
src/ShapeProcess/ShapeProcess_AllOptions.hxx
------------------------------------------
to be continued ...
src/XSAlgo/AlgoContainer.cxx
src/ShapeProcess/ShapeProcess_UOperator.hxx
src/ShapeProcess/ShapeProcess_UOperator.cxx
src/ShapeProcess/ShapeProcess_ShapeContext.hxx
src/ShapeProcess/ShapeProcess_ShapeContext.cxx
src/ShapeProcess/ShapeProcess_PredefinedOptions.hxx
src/ShapeProcess/ShapeProcess_PredefinedOptions.hxx
src/ShapeProcess/ShapeProcess_AllOptions.hxx
------------------------------------------
to be continued ...
Attachment 2 (TXT) (6,217 bytes)
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon May 16 16:17:12 2022 +0300
0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: During loading STEP and IGES files automatic shape healing is applied to loaded entities. Parameters of applied shape healing described in resource files: XSTEPResource/STEP and XSTEPResource/IGES. This method is very inconvenient: you can't dynamically change parameter from the program to adjust healing process for a specific file.
Change: For each ShapeProcess operator described class with options (ShapeProcess_*OperatorName*Options). Default values for these options are assigned in the class constructor. Predefined values for sequences of operators of STEP or IGES loading (saving) processes are stored in ShapeProcess_PredefinedOptions class and applied in XSAlgo_AlgoContainer. A new DRAW command "param2" has been added to operationally redefine the operator option with a user value.
Result: ShapeProcess and the shape healing when reading STEP or IGES, in particular, no longer depend from the resource file. The user can operationally change the operator parameter from DRAW command to adjust the shape healing process.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon May 16 16:17:12 2022 +0300
0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: During loading STEP and IGES files automatic shape healing is applied to loaded entities. Parameters of applied shape healing described in resource files: XSTEPResource/STEP and XSTEPResource/IGES. This method is very inconvenient: you can't dynamically change parameter from the program to adjust healing process for a specific file.
Change: For each ShapeProcess operator described class with options (ShapeProcess_*OperatorName*Options). Default values for these options are assigned in the class constructor. Predefined values for sequences of operators of STEP or IGES loading (saving) processes are stored in ShapeProcess_PredefinedOptions class and applied in XSAlgo_AlgoContainer. A new DRAW command "param2" has been added to operationally redefine the operator option with a user value.
Result: ShapeProcess and the shape healing when reading STEP or IGES, in particular, no longer depend from the resource file. The user can operationally change the operator parameter from DRAW command to adjust the shape healing process.
Commenter 5
I have corrected your remarks. Please check the branch CR28024_0.
I have corrected your remarks. Please check the branch CR28024_0.
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Tue Jul 5 15:54:46 2022 +0300
//# spaces rollback
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Tue Jul 5 15:54:46 2022 +0300
//# spaces rollback
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]
Please split long paragraphs in commit message.
Attachment 1 (PNG) (29,412 bytes)
Please add description to Upgrade Guide
dox/upgrade/upgrade.md
> Problem: During loading STEP and IGES files automatic shape healing is applied to loaded entities.
> Parameters of applied shape healing described in resource files: XSTEPResource/STEP and XSTEPResource/IGES.
> This method is very inconvenient: you can't dynamically change parameter from the program to adjust healing process for a specific file.
> ...
This long problem description doesn't belong to git message - it is better describing changes and new behavior rather than why "old method was inconvenient".
Could yo please add parameters necessary for translation in the Interface::Static class including ShapeHealing parameters.
Could you please implement possibility to load resource file in Test Harness application.
Could you please add in the Test Harness command "parameters" optional input format of the file for which parameters should be shown. For example " parametres --STEP"
Could you please implement possibility to load resource file in Test Harness application.
Could you please add in the Test Harness command "parameters" optional input format of the file for which parameters should be shown. For example " parametres --STEP"
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon May 16 16:17:12 2022 +0300
0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: There is no possibility to change shape healing options from DRAW without rewriting resource file.
Change: Shape healing parameters from STEP and IGES resource files were duplicated to InterfaceStatic. Resource manager initialize from InterfaceStatic if resource file name is empty.
Result: User can operationally change shape healing parameters from DRAW command using "param" command.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon May 16 16:17:12 2022 +0300
0028024: Data Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
Problem: There is no possibility to change shape healing options from DRAW without rewriting resource file.
Change: Shape healing parameters from STEP and IGES resource files were duplicated to InterfaceStatic. Resource manager initialize from InterfaceStatic if resource file name is empty.
Result: User can operationally change shape healing parameters from DRAW command using "param" command.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Galina,
The solution has been redesigned in accordance with our agreements
The solution has been redesigned in accordance with our agreements
Dear Andrey.
Could you please:
1. Rename method void Interface_Static::GetMap (NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString, TCollection_AsciiString>& theMap) in the Interface_Static::GetMap (NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString, TCollection_AsciiString>& theMap) and to use corresponding map from Resource_Manager as input argument;
2. Please add empty constructor in the class Resource_Manager.
3. Please add in the Resource_Manager method returning reference on the corresponding map (myRefMap) to fill it by parameters from Interface_Static in order to avoid redundant copy of parameters.
4. Please add in the ShapeProcess_Context and ShapeProcess_ShapeContext empty constructors or constructors initialized by shape to create Resource_Manager in them.
5.In the method XSAlgo_AlgoContainer::ProcessShape please initialize ShapeProcess_ShapeContext either the resource file name or parameters from Interface_Statice
Could you please:
1. Rename method void Interface_Static::GetMap (NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString, TCollection_AsciiString>& theMap) in the Interface_Static::GetMap (NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString, TCollection_AsciiString>& theMap) and to use corresponding map from Resource_Manager as input argument;
2. Please add empty constructor in the class Resource_Manager.
3. Please add in the Resource_Manager method returning reference on the corresponding map (myRefMap) to fill it by parameters from Interface_Static in order to avoid redundant copy of parameters.
4. Please add in the ShapeProcess_Context and ShapeProcess_ShapeContext empty constructors or constructors initialized by shape to create Resource_Manager in them.
5.In the method XSAlgo_AlgoContainer::ProcessShape please initialize ShapeProcess_ShapeContext either the resource file name or parameters from Interface_Statice
Branch [archived branch] has been updated by Participant.
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon Sep 26 12:56:01 2022 +0300
// added test, removed map copying
[revision removed]
Detailed log of new commits:
Author: atereshi
Date: Mon Sep 26 12:56:01 2022 +0300
// added test, removed map copying
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]
Galina,
I removed the intermediate copying of the map and added a test
I removed the intermediate copying of the map and added a test
Dear Andrey.
1. Please squash all commits lying in the branch CR28024_1
2. Please move creation of new Resource_Manager in the constructor ShapeProcess_Context::ShapeProcess_Context(const Standard_CString theScope)
from method - void ShapeProcess_Context::Init (const Standard_CString theScope).
After that please use method void ShapeProcess_Context::Init (const Standard_CString theScope) in both constructors in order to avoid duplication of the code
3. Please use previous syntax with default value defined for parameter scope:
Standard_EXPORT ShapeProcess_Context(const Standard_CString file, const Standard_CString scope = "");
Standard_EXPORT Standard_Boolean Init (const Standard_CString file, const Standard_CString scope = "");
4.Please note that Resource_manager contains two maps :
Resource_DataMapOfAsciiStringAsciiString myRefMap;
Resource_DataMapOfAsciiStringAsciiString myUserMap;
Therefore please add in the method GetMap flag which will define map which will be returned myUserMap or myRefMap.
1. Please squash all commits lying in the branch CR28024_1
2. Please move creation of new Resource_Manager in the constructor ShapeProcess_Context::ShapeProcess_Context(const Standard_CString theScope)
from method - void ShapeProcess_Context::Init (const Standard_CString theScope).
After that please use method void ShapeProcess_Context::Init (const Standard_CString theScope) in both constructors in order to avoid duplication of the code
3. Please use previous syntax with default value defined for parameter scope:
Standard_EXPORT ShapeProcess_Context(const Standard_CString file, const Standard_CString scope = "");
Standard_EXPORT Standard_Boolean Init (const Standard_CString file, const Standard_CString scope = "");
4.Please note that Resource_manager contains two maps :
Resource_DataMapOfAsciiStringAsciiString myRefMap;
Resource_DataMapOfAsciiStringAsciiString myUserMap;
Therefore please add in the method GetMap flag which will define map which will be returned myUserMap or myRefMap.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Galina,
All remarks have been corrected.
All remarks have been corrected.
Branch [archived branch] has been reviewed
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records
- #0027258 · related to · closedConfiguration - generate built-in replacement for mandatory resource files
- #0032963 · has duplicate · closedData Exchange - create a convenient mechanism for managing shape healing options when reading STEP or IGES file
- #0028414 · related to · closedData Exchange - Step entity not correctly read
- #0033242 · related to · newData Exchange, DE Wrapper - Propagate Shape healing parameters