1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

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.
This commit is contained in:
atereshi
2022-05-16 16:17:12 +03:00
committed by smoskvin
parent 13f5da81ad
commit 51329afcef
14 changed files with 275 additions and 21 deletions

View File

@@ -128,6 +128,16 @@ Resource_Manager::Resource_Manager(const Standard_CString aName,
std::cout << "Resource Manager Warning: Environment variable \"CSF_" << aName << "UserDefaults\" not set." << std::endl;
}
// =======================================================================
// function : Resource_Manager
// purpose :
// =======================================================================
Resource_Manager::Resource_Manager()
: myName(""), myVerbose(Standard_False)
{
}
// =======================================================================
// function : Load
// purpose :
@@ -538,3 +548,12 @@ void Resource_Manager::GetResourcePath (TCollection_AsciiString& aPath, const St
anOSDPath.SystemName(aPath);
}
//=======================================================================
// function : GetMap
// purpose :
//=======================================================================
Resource_DataMapOfAsciiStringAsciiString& Resource_Manager::GetMap(Standard_Boolean theRefMap)
{
return theRefMap ? myRefMap : myUserMap;
}

View File

@@ -54,6 +54,9 @@ public:
//! syntax of an individual resource line is:
Standard_EXPORT Resource_Manager(const Standard_CString aName, const Standard_Boolean Verbose = Standard_False);
//! Create an empty Resource manager
Standard_EXPORT Resource_Manager();
//! Create a Resource manager.
//! @param theName [in] description file name
//! @param theDefaultsDirectory [in] default folder for looking description file
@@ -112,6 +115,9 @@ public:
//! or file doesn't exist returns empty string.
Standard_EXPORT static void GetResourcePath (TCollection_AsciiString& aPath, const Standard_CString aName, const Standard_Boolean isUserDefaults);
//! Returns internal Ref or User map with parameters
Standard_EXPORT Resource_DataMapOfAsciiStringAsciiString& GetMap(Standard_Boolean theRefMap = Standard_True);
private:
Standard_EXPORT void Load (const TCollection_AsciiString& thePath,