From 5071a59cc62e8b9c7d1d3cac846072795148a8de Mon Sep 17 00:00:00 2001 From: tobias <tobias@5a81b35b-ba03-0410-adc8-b2c5c5119f08> Date: Wed, 25 Aug 2010 10:09:09 +0000 Subject: [PATCH] fix bug in GetBounds git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2671 5a81b35b-ba03-0410-adc8-b2c5c5119f08 --- modules/geom/pymod/export_composite3.cc | 2 ++ modules/mol/base/src/impl/entity_impl.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/geom/pymod/export_composite3.cc b/modules/geom/pymod/export_composite3.cc index ed69d1ae4..df7cafa3c 100644 --- a/modules/geom/pymod/export_composite3.cc +++ b/modules/geom/pymod/export_composite3.cc @@ -162,11 +162,13 @@ scope PlaneScope = .def("GetMax", &AlignedCuboid::GetMax, return_value_policy<copy_const_reference>()) .def("GetCenter", &AlignedCuboid::GetCenter) + .def("GetSize", &AlignedCuboid::GetSize) .add_property("max", make_function(&AlignedCuboid::GetMax, return_value_policy<copy_const_reference>())) .add_property("min", make_function(&AlignedCuboid::GetMin, return_value_policy<copy_const_reference>())) .add_property("center", &AlignedCuboid::GetCenter) + .add_property("size", &AlignedCuboid::GetSize) ; } diff --git a/modules/mol/base/src/impl/entity_impl.cc b/modules/mol/base/src/impl/entity_impl.cc index 8d17d4a13..47f13dcb7 100644 --- a/modules/mol/base/src/impl/entity_impl.cc +++ b/modules/mol/base/src/impl/entity_impl.cc @@ -271,7 +271,7 @@ geom::AlignedCuboid EntityImpl::GetBounds() const mmin=mmax=it->second->GetPos(); for (++it; it!=atom_map_.end();++it) { mmin=geom::Min(mmin,it->second->GetPos()); - mmax=geom::Min(mmax,it->second->GetPos()); + mmax=geom::Max(mmax,it->second->GetPos()); } return geom::AlignedCuboid(mmin, mmax); } else { -- GitLab