mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 10:43:46 +00:00
SVG storey elevation (#315)
IfcConvert SVG does not generate <path d=""> for IfcSpace. #313
This commit is contained in:
@@ -366,12 +366,15 @@ void SvgSerializer::write(const IfcGeom::BRepElement<real_t>* o)
|
|||||||
double cut_z;
|
double cut_z;
|
||||||
if (section_height) {
|
if (section_height) {
|
||||||
cut_z = section_height.get();
|
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.;
|
cut_z = storey_elevation.get() + 1.;
|
||||||
} else {
|
} else {
|
||||||
cut_z = zmin + 1.;
|
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
|
// 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()));
|
TopoDS_Shape result = BRepAlgoAPI_Section(moved_shape, gp_Pln(gp_Pnt(0, 0, cut_z), gp::DZ()));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user