mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-13 00:03:06 +05:00
0021833: [CEA] problem with naming when exploding a step file
Correct regression caused by fix for issue 0021805
This commit is contained in:
parent
30919b026f
commit
6c588d710b
@ -748,11 +748,6 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (SALOMEDS::Study_ptr theStudy,
|
|||||||
aResultSO = PublishInStudy(theStudy, aResultSO, theObject, theName);
|
aResultSO = PublishInStudy(theStudy, aResultSO, theObject, theName);
|
||||||
if(aResultSO->_is_nil()) return aResultSO._retn();
|
if(aResultSO->_is_nil()) return aResultSO._retn();
|
||||||
|
|
||||||
// ignore internal name (for example, read from STEP file)
|
|
||||||
// in case of publishing from script
|
|
||||||
if (strlen(theName) > 0)
|
|
||||||
aResultSO->SetAttrString("AttributeName", theName);
|
|
||||||
|
|
||||||
GEOM::ListOfGO_var aList = theObject->GetDependency();
|
GEOM::ListOfGO_var aList = theObject->GetDependency();
|
||||||
Standard_Integer aLength = aList->length();
|
Standard_Integer aLength = aList->length();
|
||||||
if(aLength < 1) return aResultSO._retn();
|
if(aLength < 1) return aResultSO._retn();
|
||||||
|
@ -486,6 +486,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
try:
|
try:
|
||||||
aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
|
aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
|
||||||
|
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
|
||||||
if doRestoreSubShapes:
|
if doRestoreSubShapes:
|
||||||
self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
|
self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
|
||||||
theFindMethod, theInheritFirstArg, True )
|
theFindMethod, theInheritFirstArg, True )
|
||||||
@ -516,6 +517,7 @@ class geompyDC(GEOM._objref_GEOM_Gen):
|
|||||||
# Example: see GEOM_TestAll.py
|
# Example: see GEOM_TestAll.py
|
||||||
try:
|
try:
|
||||||
aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
|
aSObject = self.AddInStudy(self.myStudy, aShape, aName, aFather)
|
||||||
|
if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
|
||||||
except:
|
except:
|
||||||
print "addToStudyInFather() failed"
|
print "addToStudyInFather() failed"
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
Reference in New Issue
Block a user