-// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#ifdef WNT
#pragma warning( disable:4786 )
GEOM_Engine::GEOM_Engine()
{
TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
-
+
_OCAFApp = new GEOM_Application();
_UndoLimit = 10;
}
if (_objects.IsBound(anID)) _objects.UnBind(anID);
_objects.Bind(anID, anObject);
- // Put this subshape in the list of subshapes of theMainShape
+ // Put this sub-shape in the list of sub-shapes of theMainShape
aMainShape->AddSubShapeReference(aFunction);
GEOM::TPythonDump pd (aFunction);
TCollection_AsciiString anID = BuildIDFromObject(theObject);
if (_objects.IsBound(anID)) _objects.UnBind(anID);
- // If subshape, remove it from the list of subshapes of its main shape
+ // If sub-shape, remove it from the list of sub-shapes of its main shape
if (!theObject->IsMainShape()) {
Handle(GEOM_Function) aFunction = theObject->GetFunction(1);
GEOM_ISubShape aSSI (aFunction);
continue;
// add function description before dump
if (!aCurScript.IsEmpty())
+ {
+ if ( aFunction->GetDriverGUID() == GEOM_Object::GetSubShapeID() )
+ // avoid repeated SubShape...() command at the end
+ if (aFuncScript.Location( aCurScript,
+ aFuncScript.Length() - aCurScript.Length(),
+ aFuncScript.Length()))
+ continue;
aFuncScript += aCurScript;
+ }
if (isDumpCollected ) {
// Replace entries by the names
ReplaceEntriesByNames( aFuncScript, aEntry2ObjData, isPublished,
else
aEndParamPos = aSection.Length() + 1;
+ if(MYDEBUG)
+ cout<<"aParamIndex: "<<aParamIndex<<" aStartParamPos: " <<aStartParamPos<<" aEndParamPos: "<<aEndParamPos<<endl;
+
+ if ( aStartParamPos == aEndParamPos)
+ continue;
+
aParameter = aSection.SubString(aStartParamPos, aEndParamPos-1);
if(MYDEBUG)
cout<<"aParameter: "<<aParameter<<endl;