mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
#487 perform fix after sewing if not valid
This commit is contained in:
@@ -324,7 +324,18 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l
|
|||||||
try {
|
try {
|
||||||
builder.Perform();
|
builder.Perform();
|
||||||
shape = builder.SewedShape();
|
shape = builder.SewedShape();
|
||||||
valid_shell = BRepCheck_Analyzer(shape).IsValid() != 0 && count(shape, TopAbs_SHELL) > 0;
|
|
||||||
|
{
|
||||||
|
BRepCheck_Analyzer ana(shape);
|
||||||
|
if (!ana.IsValid()) {
|
||||||
|
ShapeFix_Shape sfs(shape);
|
||||||
|
sfs.Perform();
|
||||||
|
shape = sfs.Shape();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BRepCheck_Analyzer ana(shape);
|
||||||
|
valid_shell = ana.IsValid() != 0 && count(shape, TopAbs_SHELL) > 0;
|
||||||
} catch (const Standard_Failure& e) {
|
} catch (const Standard_Failure& e) {
|
||||||
if (e.GetMessageString() && strlen(e.GetMessageString())) {
|
if (e.GetMessageString() && strlen(e.GetMessageString())) {
|
||||||
Logger::Error(e.GetMessageString());
|
Logger::Error(e.GetMessageString());
|
||||||
|
|||||||
Reference in New Issue
Block a user