From 01d261e168311122aa3376ebab9e02f3b4ce9662 Mon Sep 17 00:00:00 2001 From: Xsoiou <32762440+Xsoiou@users.noreply.github.com> Date: Tue, 19 Dec 2017 12:10:19 +0100 Subject: [PATCH] SVG storey elevation (#315) IfcConvert SVG does not generate for IfcSpace. #313 --- src/ifcconvert/SvgSerializer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()));