diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 78c0db355f..6f478b4954 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -156,7 +156,7 @@ bool IfcGeom::convert_openings(const Ifc2x3::IfcProduct::ptr entity, const Ifc2x const unsigned int current_size = (const unsigned int) opening_shapes.size(); for ( unsigned int i = last_size; i < current_size; ++ i ) { - opening_shapes[i].move(opening_trsf); + opening_shapes[i].prepend(opening_trsf); } last_size = current_size; } diff --git a/src/ifcgeom/IfcGeomObjects.cpp b/src/ifcgeom/IfcGeomObjects.cpp index 66abc5b650..82987f3438 100644 --- a/src/ifcgeom/IfcGeomObjects.cpp +++ b/src/ifcgeom/IfcGeomObjects.cpp @@ -442,14 +442,14 @@ IfcGeomObjects::IfcGeomShapeModelObject* create_shape_model_for_next_entity() { } if ( use_world_coords ) { for ( IfcGeom::IfcRepresentationShapeItems::iterator it = opened_shapes.begin(); it != opened_shapes.end(); ++ it ) { - it->move(trsf); + it->prepend(trsf); } trsf = gp_Trsf(); } shape = new IfcGeomObjects::IfcRepresentationShapeModel(shaperep->entity->id(),opened_shapes); } else if ( use_world_coords ) { for ( IfcGeom::IfcRepresentationShapeItems::iterator it = shapes.begin(); it != shapes.end(); ++ it ) { - it->move(trsf); + it->prepend(trsf); } trsf = gp_Trsf(); shape = new IfcGeomObjects::IfcRepresentationShapeModel(shaperep->entity->id(),shapes); diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index 6cc28af945..85ae12ece2 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -374,7 +374,7 @@ bool IfcGeom::convert(const Ifc2x3::IfcMappedItem::ptr l, IfcRepresentationShape const unsigned int previous_size = (const unsigned int) shapes.size(); bool b = IfcGeom::convert_shapes(map->MappedRepresentation(),shapes); for ( unsigned int i = previous_size; i < shapes.size(); ++ i ) { - shapes[i].move(gtrsf); + shapes[i].append(gtrsf); } return b; } diff --git a/src/ifcgeom/IfcRepresentationShapeItem.h b/src/ifcgeom/IfcRepresentationShapeItem.h index 3ecb2215b2..88ac340214 100644 --- a/src/ifcgeom/IfcRepresentationShapeItem.h +++ b/src/ifcgeom/IfcRepresentationShapeItem.h @@ -40,7 +40,8 @@ namespace IfcGeom { : shape(shape), style(style) {} IfcRepresentationShapeItem(const TopoDS_Shape& shape) : shape(shape), style(0) {} - void move(const gp_GTrsf& trsf) { placement.Multiply(trsf); } + void append(const gp_GTrsf& trsf) { placement.Multiply(trsf); } + void prepend(const gp_GTrsf& trsf) { placement.PreMultiply(trsf); } const TopoDS_Shape& Shape() const { return shape; } const gp_GTrsf& Placement() const { return placement; } bool hasStyle() const { return style != 0; }