#include "GEOM_Engine.hxx"#include "GEOM_Field.hxx"#include "GEOM_Function.hxx"#include "GEOM_ISubShape.hxx"#include "GEOM_PythonDump.hxx"#include "GEOM_Solver.hxx"#include "GEOM_SubShapeDriver.hxx"#include "Sketcher_Profile.hxx"#include "utilities.h"#include <Basics_Utils.hxx>#include <Basics_OCCTVersion.hxx>#include <TDF_Tool.hxx>#include <TDF_Data.hxx>#include <TDF_Reference.hxx>#include <TDF_LabelSequence.hxx>#include <TDataStd_Integer.hxx>#include <TDataStd_ChildNodeIterator.hxx>#include <TFunction_Driver.hxx>#include <TFunction_DriverTable.hxx>#include <TDataStd_ByteArray.hxx>#include <TDataStd_UAttribute.hxx>#include <TDF_ChildIterator.hxx>#include <TDataStd_Comment.hxx>#include <TopExp.hxx>#include <TopTools_IndexedMapOfShape.hxx>#include <TCollection_AsciiString.hxx>#include <TCollection_ExtendedString.hxx>#include <TColStd_SequenceOfAsciiString.hxx>#include <TColStd_MapOfTransient.hxx>#include <TColStd_HSequenceOfInteger.hxx>#include <TColStd_DataMapIteratorOfDataMapOfIntegerTransient.hxx>#include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>#include <BinDrivers.hxx>#include <StdDrivers_DocumentRetrievalDriver.hxx>#include <PCDM_StorageDriver.hxx>#include <set>#include <Standard_Failure.hxx>#include <Standard_ErrorHandler.hxx>Macros | |
| #define | COMMA ',' |
| #define | O_BRACKET '(' |
| #define | C_BRACKET ')' |
| #define | O_SQR_BRACKET '[' |
| #define | C_SQR_BRACKET ']' |
| #define | PY_NULL "None" |
| #define | TEXTURE_LABEL_ID 1 |
| #define | TEXTURE_LABEL_FILE 2 |
| #define | TEXTURE_LABEL_WIDTH 3 |
| #define | TEXTURE_LABEL_HEIGHT 4 |
| #define | TEXTURE_LABEL_DATA 5 |
Typedefs | |
| typedef std::map< TCollection_AsciiString, TCollection_AsciiString > | TSting2StringMap |
| typedef std::map< TCollection_AsciiString, TObjectData > | TSting2ObjDataMap |
| typedef std::map< TCollection_AsciiString, TObjectData * > | TSting2ObjDataPtrMap |
| typedef std::map< int, std::list< int > > | TIntToListIntMap |
Functions | |
| static TCollection_AsciiString | BuildIDFromObject (Handle(GEOM_BaseObject)&theObject) |
| bool | ProcessFunction (Handle(GEOM_Function)&theFunction, TCollection_AsciiString &theScript, TCollection_AsciiString &theAfterScript, const TVariablesList &theVariables, const bool, TDF_LabelMap &theProcessed, std::set< TCollection_AsciiString > &theIgnoreObjs, bool &theIsDumpCollected) |
| static int | GetTag (const TCollection_AsciiString &theEntry) |
| static void | FillMapOfRef (const Handle(GEOM_Function) &theFunction, TIntToListIntMap &theRefMap) |
| void | ReplaceVariables (TCollection_AsciiString &theCommand, const TVariablesList &theVariables) |
| Handle (TColStd_HSequenceOfInteger) FindEntries(TCollection_AsciiString &theString) | |
| void | ReplaceEntriesByNames (TCollection_AsciiString &theScript, TSting2ObjDataMap &aEntry2ObjData, const bool theIsPublished, TColStd_SequenceOfAsciiString &theObjListToPublish, Standard_Integer &objectCounter, Resource_DataMapOfAsciiStringAsciiString &aNameToEntry) |
| void | AddObjectColors (TCollection_AsciiString &theScript, const TSting2ObjDataMap &theEntry2ObjData) |
| void | AddTextures (TCollection_AsciiString &theScript) |
| void | PublishObject (TObjectData &theObjectData, TSting2ObjDataMap &theEntry2ObjData, const TSting2ObjDataPtrMap &theStEntry2ObjDataPtr, Resource_DataMapOfAsciiStringAsciiString &theNameToEntry, std::map< int, TCollection_AsciiString > &theEntryToCmdMap, std::set< TCollection_AsciiString > &theMapOfPublished) |
| static TCollection_AsciiString | GetPublishCommands (const int theTag, const std::map< int, TCollection_AsciiString > &theEntryToCmdMap, const TIntToListIntMap &theMapRefs, std::set< int > &thePublished) |
| Returns the string of publishing commands. Take into account that references should be published prior to the objects refer to them. More... | |
| void | Prettify (TCollection_AsciiString &theScript) |
| Handle (TDocStd_Document) GEOM_Engine | |
| Handle (GEOM_BaseObject) GEOM_Engine | |
| Handle (GEOM_Object) GEOM_Engine | |
| Adds a new object of the type theType in the OCAF document. More... | |
| Handle (TColStd_HSequenceOfAsciiString) GEOM_Engine | |
| Handle (TColStd_HArray1OfByte) GEOM_Engine | |
| TCollection_AsciiString | MakeCommandfor3DSketcher (const TCollection_AsciiString &theDescr) |
| static TCollection_AsciiString | pack_data (const Handle(TColStd_HArray1OfByte)&aData) |
Variables | |
| static GEOM_Engine * | TheEngine = NULL |
| #define C_BRACKET ')' |
| #define C_SQR_BRACKET ']' |
| #define COMMA ',' |
| #define O_BRACKET '(' |
| #define O_SQR_BRACKET '[' |
| #define PY_NULL "None" |
| #define TEXTURE_LABEL_DATA 5 |
| #define TEXTURE_LABEL_FILE 2 |
| #define TEXTURE_LABEL_HEIGHT 4 |
| #define TEXTURE_LABEL_ID 1 |
| #define TEXTURE_LABEL_WIDTH 3 |
| typedef std::map< int, std::list < int > > TIntToListIntMap |
| typedef std::map< TCollection_AsciiString, TObjectData > TSting2ObjDataMap |
| typedef std::map< TCollection_AsciiString, TObjectData* > TSting2ObjDataPtrMap |
| typedef std::map< TCollection_AsciiString, TCollection_AsciiString > TSting2StringMap |
| void AddObjectColors | ( | TCollection_AsciiString & | theScript, |
| const TSting2ObjDataMap & | theEntry2ObjData | ||
| ) |
AddObjectColors: Add color to objects
References GEOM::Color, GEOM_Engine::GetEngine(), and Handle().
| void AddTextures | ( | TCollection_AsciiString & | theScript | ) |
References GEOM_Engine::getAllTextures(), GEOM_Engine::GetEngine(), Handle(), and pack_data().
|
static |
|
static |
|
static |
References aResult, and GetPublishCommands().
|
static |
GetTag: Returns the tag from entry
| Handle | ( | GEOM_BaseObject | ) |
GetObject
AddBaseObject
References GEOM_Engine::_objects, GEOM_Engine::force, GEOM_FIELD_OBJTYPE, GEOM_FIELD_STEP_OBJTYPE, and GEOM_Engine::Handle().
| Handle | ( | GEOM_Object | ) |
AddSubShape
References GEOM_Engine::Handle().
| Handle | ( | TColStd_HArray1OfByte | ) |
GetBooleanArray
ConvertBoolArray
References GEOM_Engine::GetTextureGUID(), GEOM_Engine::Handle(), TEXTURE_LABEL_DATA, TEXTURE_LABEL_FILE, TEXTURE_LABEL_HEIGHT, TEXTURE_LABEL_ID, TEXTURE_LABEL_WIDTH, GEOM_Engine::theFileName, GEOM_Engine::theHeight, and GEOM_Engine::theWidth.
| Handle | ( | TColStd_HSequenceOfAsciiString | ) |
References GEOM_Engine::_studyEntry2NameMap, and GEOM_Engine::Handle().
| Handle | ( | TColStd_HSequenceOfInteger | ) | & |
FindEntries: Returns a sequence of start/end positions of entries in the string
References Handle().
| Handle | ( | TDocStd_Document | ) |
GetDocument
References GEOM_Engine::_UndoLimit, GEOM_Engine::force, and GEOM_Engine::Handle().
| TCollection_AsciiString MakeCommandfor3DSketcher | ( | const TCollection_AsciiString & | theDescr | ) |
MakeCommandfor3DSketcher: Make new command for 3DSketcher
References aResult.
|
static |
| void Prettify | ( | TCollection_AsciiString & | theScript | ) |
| bool ProcessFunction | ( | Handle(GEOM_Function)& | theFunction, |
| TCollection_AsciiString & | theScript, | ||
| TCollection_AsciiString & | theAfterScript, | ||
| const TVariablesList & | theVariables, | ||
| const bool | theIsPublished, | ||
| TDF_LabelMap & | theProcessed, | ||
| std::set< TCollection_AsciiString > & | theIgnoreObjs, | ||
| bool & | theIsDumpCollected | ||
| ) |
ProcessFunction: Dump function description into script
References Sketcher_Profile::GetDump(), MakeCommandfor3DSketcher(), and ReplaceVariables().
| void PublishObject | ( | TObjectData & | theObjectData, |
| TSting2ObjDataMap & | theEntry2ObjData, | ||
| const TSting2ObjDataPtrMap & | theStEntry2ObjDataPtr, | ||
| Resource_DataMapOfAsciiStringAsciiString & | theNameToEntry, | ||
| std::map< int, TCollection_AsciiString > & | theEntryToCmdMap, | ||
| std::set< TCollection_AsciiString > & | theIgnoreMap | ||
| ) |
PublishObject: publish object in study script
References TObjectData::_entry, TObjectData::_name, TObjectData::_pyName, TObjectData::_studyEntry, GEOM_Engine::GetEngine(), GetTag(), and GEOM_Engine::healPyName().
| void ReplaceEntriesByNames | ( | TCollection_AsciiString & | theScript, |
| TSting2ObjDataMap & | aEntry2ObjData, | ||
| const bool | , | ||
| TColStd_SequenceOfAsciiString & | theObjListToPublish, | ||
| Standard_Integer & | objectCounter, | ||
| Resource_DataMapOfAsciiStringAsciiString & | aNameToEntry | ||
| ) |
ReplaceEntriesByNames: Replace object entries by their names
References TObjectData::_name, TObjectData::_pyName, GEOM_Engine::GetEngine(), Handle(), and GEOM_Engine::healPyName().
| void ReplaceVariables | ( | TCollection_AsciiString & | theCommand, |
| const TVariablesList & | theVariables | ||
| ) |
ReplaceVariables: Replace parameters of the function by variales from Notebook if need
References C_BRACKET, C_SQR_BRACKET, COMMA, ObjectStates::GetCurrectState(), ObjectStates::IncrementState(), O_BRACKET, O_SQR_BRACKET, and PY_NULL.
|
static |