nb only takes into account explicit points
| 974 | |
| 975 | // nb only takes into account explicit points |
| 976 | taxonomy::point3::ptr centroid() const { |
| 977 | Eigen::Vector3d c(0, 0, 0); |
| 978 | for (auto& e : children) { |
| 979 | if (e->start.which() == 1) { |
| 980 | c += boost::get<point3::ptr>(e->start)->ccomponents(); |
| 981 | } |
| 982 | if (e->end.which() == 1) { |
| 983 | c += boost::get<point3::ptr>(e->end)->ccomponents(); |
| 984 | } |
| 985 | } |
| 986 | c /= static_cast<double>(children.size()); |
| 987 | return make<taxonomy::point3>(c); |
| 988 | } |
| 989 | }; |
| 990 | |
| 991 | struct IFC_GEOM_API face : public collection_base<loop> { |
no test coverage detected