Don't construct transformation from matrix, but use original data.

This commit is contained in:
aothms
2015-10-13 11:15:45 +02:00
parent 44ddc5e6dc
commit f3af39546b
2 changed files with 2 additions and 24 deletions
+1 -13
View File
@@ -40,19 +40,7 @@ void OpenCascadeBasedSerializer::write(const IfcGeom::BRepElement<double>* o) {
for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) {
gp_GTrsf gtrsf = it->Placement();
const std::vector<double>& matrix = o->transformation().matrix().data();
// Convert the matrix back into a transformation object. The tolerance values
// are taken into consideration to reconstruct the form of the transformation.
gp_Trsf o_trsf;
o_trsf.SetValues(
matrix[0], matrix[3], matrix[6], matrix[ 9],
matrix[1], matrix[4], matrix[7], matrix[10],
matrix[2], matrix[5], matrix[8], matrix[11]
#if OCC_VERSION_HEX < 0x60800
, Precision::Angular(), Precision::Confusion()
#endif
);
const gp_Trsf& o_trsf = o->transformation().data();
gtrsf.PreMultiply(o_trsf);
const TopoDS_Shape& s = it->Shape();
+1 -11
View File
@@ -217,17 +217,7 @@ void SvgSerializer::write(const IfcGeom::BRepElement<double>* o) {
for (IfcGeom::IfcRepresentationShapeItems::const_iterator it = o->geometry().begin(); it != o->geometry().end(); ++ it) {
gp_GTrsf gtrsf = it->Placement();
gp_Trsf o_trsf;
const std::vector<double>& matrix = o->transformation().matrix().data();
o_trsf.SetValues(
matrix[0], matrix[3], matrix[6], matrix[ 9],
matrix[1], matrix[4], matrix[7], matrix[10],
matrix[2], matrix[5], matrix[8], matrix[11]
#if OCC_VERSION_HEX < 0x60800
, Precision::Angular(), Precision::Confusion()
#endif
);
gtrsf.PreMultiply(o_trsf);
const gp_Trsf& o_trsf = o->transformation().data();
const TopoDS_Shape& s = it->Shape();
bool trsf_valid = false;