SVG serialization UnifyInputs option

This commit is contained in:
Thomas Krijnen
2023-07-29 10:07:33 +08:00
parent 6575921ccd
commit 630bb88a15
2 changed files with 19 additions and 1 deletions
+9 -1
View File
@@ -79,6 +79,7 @@
#include "../ifcparse/IfcGlobalId.h"
#include "../ifcgeom_schema_agnostic/base_utils.h"
#include "../ifcgeom_schema_agnostic/boolean_utils.h"
#include <boost/format.hpp>
#include <boost/tokenizer.hpp>
@@ -1179,7 +1180,14 @@ void SvgSerializer::write(const geometry_data& data) {
// Iterate over components of compound to have better chance of matching section edges to closed wires
for (; it.More(); it.Next(), ++dash_it) {
const TopoDS_Shape& subshape = it.Value();
const TopoDS_Shape& subshape_before_unification = it.Value();
TopoDS_Shape subshape;
if (unify_inputs_) {
subshape = IfcGeom::util::unify(subshape_before_unification, 1. - 6);
} else {
subshape = subshape_before_unification;
}
Bnd_Box bb;
try {