Surface: [skip ci] only try to build surface if at least two boundary curves are used
This commit is contained in:
@@ -298,6 +298,7 @@ App::DocumentObjectExecReturn *Filling::execute(void)
|
||||
}
|
||||
|
||||
// Add the constraints of border curves/faces (bound)
|
||||
int numBoundaries = BoundaryEdges.getSize();
|
||||
addConstraints(builder, BoundaryEdges, BoundaryFaces, BoundaryOrder, Standard_True);
|
||||
|
||||
// Add additional edge constraints if available (unbound)
|
||||
@@ -316,7 +317,8 @@ App::DocumentObjectExecReturn *Filling::execute(void)
|
||||
}
|
||||
|
||||
//Build the face
|
||||
builder.Build();
|
||||
if (numBoundaries > 1)
|
||||
builder.Build();
|
||||
if (!builder.IsDone()) {
|
||||
Standard_Failure::Raise("Failed to create a face from constraints");
|
||||
}
|
||||
@@ -327,7 +329,6 @@ App::DocumentObjectExecReturn *Filling::execute(void)
|
||||
return App::DocumentObject::StdReturn;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
return new App::DocumentObjectExecReturn(e.GetMessageString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user