mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
SVG matrix #5676
This commit is contained in:
@@ -2401,13 +2401,15 @@ namespace {
|
|||||||
std::string SvgSerializer::writeMetadata(const drawing_meta& m) {
|
std::string SvgSerializer::writeMetadata(const drawing_meta& m) {
|
||||||
gp_Trsf trsf;
|
gp_Trsf trsf;
|
||||||
trsf.SetTransformation(m.pln_3d.Position(), gp::XOY());
|
trsf.SetTransformation(m.pln_3d.Position(), gp::XOY());
|
||||||
// @todo
|
NCollection_Mat4<double> mat4;
|
||||||
std::array<std::array<double, 4>, 4> m4 = {{
|
trsf.GetMat4(mat4);
|
||||||
{{ 1, 0, 0, 0 }},
|
const auto* d = mat4.GetData();
|
||||||
{{ 0, 1, 0, 0 }},
|
std::array<std::array<double, 4>, 4> m4 = { {
|
||||||
{{ 0, 0, 1, 0 }},
|
{{ d[0], d[4], d[8], d[12] }},
|
||||||
{{ 0, 0, 0, 1 }}
|
{{ d[1], d[5], d[9], d[13] }},
|
||||||
}};
|
{{ d[2], d[6], d[10], d[14] }},
|
||||||
|
{{ d[3], d[7], d[11], d[15] }}
|
||||||
|
} };
|
||||||
return namespace_prefix_ + "plane=\""+ array_to_string(m4) +"\" " +
|
return namespace_prefix_ + "plane=\""+ array_to_string(m4) +"\" " +
|
||||||
namespace_prefix_ + "matrix3=\"" + array_to_string(m.matrix_3) + "\"";
|
namespace_prefix_ + "matrix3=\"" + array_to_string(m.matrix_3) + "\"";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user