mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 04:59:52 +00:00
#1153 temporary y offset fix
This commit is contained in:
@@ -643,9 +643,15 @@ void SvgSerializer::write(const IfcGeom::BRepElement* brep_obj) {
|
|||||||
pi.SetTransformation(pln->Position());
|
pi.SetTransformation(pln->Position());
|
||||||
pi.Invert();
|
pi.Invert();
|
||||||
v.Transform(pi);
|
v.Transform(pi);
|
||||||
|
auto v_y = v.Y();
|
||||||
|
if (std::fabs(1.0 - pln->Position().Direction().Z()) < 1.e-5) {
|
||||||
|
// @todo tfk: I don't understand this. Somehow only for floor plans the
|
||||||
|
// direction of the Y offset needs to be inverted.
|
||||||
|
v_y *= -1.0;
|
||||||
|
}
|
||||||
offset_2d_ = std::make_pair(
|
offset_2d_ = std::make_pair(
|
||||||
(-size->first / 2. - v.X()) * 1000 * *scale_,
|
(-size->first / 2. - v.X()) * 1000 * *scale_,
|
||||||
(-size->second / 2. + v.Y()) * 1000 * *scale_
|
(-size->second / 2. - v_y) * 1000 * *scale_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user