diff --git a/src/ifcconvert/SvgSerializer.cpp b/src/ifcconvert/SvgSerializer.cpp index 7821cf519b..2b7413ad26 100644 --- a/src/ifcconvert/SvgSerializer.cpp +++ b/src/ifcconvert/SvgSerializer.cpp @@ -366,12 +366,15 @@ void SvgSerializer::write(const IfcGeom::BRepElement* o) double cut_z; if (section_height) { cut_z = section_height.get(); - } else if (storey_elevation) { + } else if (storey_elevation && !(zmin > *storey_elevation || zmax < *storey_elevation)) { cut_z = storey_elevation.get() + 1.; } else { cut_z = zmin + 1.; } + if (zmin > cut_z || zmax < cut_z) continue; + + // Create a horizontal cross section 1 meter above the bottom point of the shape TopoDS_Shape result = BRepAlgoAPI_Section(moved_shape, gp_Pln(gp_Pnt(0, 0, cut_z), gp::DZ()));