From 3799cfe0053925a17c1d9a0df1388dcb2ff7e752 Mon Sep 17 00:00:00 2001 From: Marco Biasini <mvbiasini@gmail.com> Date: Sat, 6 Apr 2013 09:21:24 +0200 Subject: [PATCH] no need to add bonds for bracketed within queries --- modules/mol/base/src/query_state.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/mol/base/src/query_state.cc b/modules/mol/base/src/query_state.cc index 74dac4306..64874cb82 100644 --- a/modules/mol/base/src/query_state.cc +++ b/modules/mol/base/src/query_state.cc @@ -78,11 +78,10 @@ bool QueryState::do_within(const geom::Vec3& pos, const WithinParam& p, return geom::Dot(d, d) <= p.GetRadiusSquare(); else return geom::Dot(d, d) > p.GetRadiusSquare(); - } else { - const LazilyBoundRef& r=this->GetBoundObject(p.GetRef()); - bool has_within = r.points.HasWithin(pos, sqrt(p.GetRadiusSquare())); - return op==COP_LE ? has_within : !has_within; - } + } + const LazilyBoundRef& r=this->GetBoundObject(p.GetRef()); + bool has_within = r.points.HasWithin(pos, sqrt(p.GetRadiusSquare())); + return op==COP_LE ? has_within : !has_within; } @@ -117,7 +116,8 @@ QueryState::QueryState(const QueryImpl& query, const EntityHandle& ref) r_.reset(new LazilyBoundData); r_->refs.resize(query.bracketed_expr_.size()); for (size_t i=0;i<query.bracketed_expr_.size(); ++i) { - EntityView view=ref.Select(Query(query.bracketed_expr_[i])); + EntityView view=ref.Select(Query(query.bracketed_expr_[i]), + QueryFlag::NO_BONDS); add_points_to_organizer(r_->refs[i].points, view); } } -- GitLab