mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 02:00:35 +05:00
Fix pb with contour closure: respect NULL wires list
This commit is contained in:
parent
131a4abe50
commit
150ae46477
@ -365,7 +365,10 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
|
|||||||
SetErrorCode(KO);
|
SetErrorCode(KO);
|
||||||
|
|
||||||
if (theObject.IsNull())
|
if (theObject.IsNull())
|
||||||
|
{
|
||||||
|
SetErrorCode("NULL object given");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
|
Handle(GEOM_Function) aFunction, aLastFunction = theObject->GetLastFunction();
|
||||||
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
|
||||||
@ -408,11 +411,14 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
|
|||||||
pd << aNewObject << " = geompy.CloseContour(" << theObject << ", [";
|
pd << aNewObject << " = geompy.CloseContour(" << theObject << ", [";
|
||||||
|
|
||||||
// list of wire ids
|
// list of wire ids
|
||||||
int i = theWires->Lower(), nb = theWires->Upper();
|
if (!theWires.IsNull())
|
||||||
for ( ; i <= nb; i++)
|
{
|
||||||
pd << theWires->Value( i ) << (( i < nb ) ? ", " : "], ");
|
int i = theWires->Lower(), nb = theWires->Upper();
|
||||||
|
pd << theWires->Value(i++);
|
||||||
pd << (int)isCommonVertex << ")";
|
while (i <= nb)
|
||||||
|
pd << ", " << theWires->Value(i++);
|
||||||
|
}
|
||||||
|
pd << "], " << (int)isCommonVertex << ")";
|
||||||
|
|
||||||
SetErrorCode(OK);
|
SetErrorCode(OK);
|
||||||
return aNewObject;
|
return aNewObject;
|
||||||
|
Loading…
Reference in New Issue
Block a user