mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 21:38:12 +00:00
Safeguard against runtime error when invoking HLR without storey containment
This commit is contained in:
@@ -1155,16 +1155,20 @@ void SvgSerializer::write(const geometry_data& data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_floor_plan_ && storey) {
|
if (is_floor_plan_) {
|
||||||
if (storey_hlr.find(storey) == storey_hlr.end()) {
|
if (storey) {
|
||||||
if (use_hlr_poly_) {
|
if (storey_hlr.find(storey) == storey_hlr.end()) {
|
||||||
storey_hlr[storey] = new HLRBRep_PolyAlgo;
|
if (use_hlr_poly_) {
|
||||||
} else {
|
storey_hlr[storey] = new HLRBRep_PolyAlgo;
|
||||||
storey_hlr[storey] = new HLRBRep_Algo;
|
} else {
|
||||||
|
storey_hlr[storey] = new HLRBRep_Algo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
hlr_writer vis(*compound_to_hlr);
|
||||||
|
boost::apply_visitor(vis, storey_hlr[storey]);
|
||||||
|
} else {
|
||||||
|
Logger::Warning("Unable to invoke HLR due to absence of storey containment", data.product);
|
||||||
}
|
}
|
||||||
hlr_writer vis(*compound_to_hlr);
|
|
||||||
boost::apply_visitor(vis, storey_hlr[storey]);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hlr_writer vis(*compound_to_hlr);
|
hlr_writer vis(*compound_to_hlr);
|
||||||
|
|||||||
Reference in New Issue
Block a user