convert a Point3d to a BoostPoint
| 322 | |
| 323 | // convert a Point3d to a BoostPoint |
| 324 | boost::tuple<double, double> boostPointFromPoint3d(const Point3d& point3d, std::vector<Point3d>& allPoints, double tol) { |
| 325 | OS_ASSERT(std::abs(point3d.z()) <= tol); |
| 326 | |
| 327 | // simple method |
| 328 | //return boost::make_tuple(point3d.x(), point3d.y()); |
| 329 | |
| 330 | // detailed method, try to combine points within tolerance |
| 331 | const Point3d resultPoint = getCombinedPoint(point3d, allPoints, tol); |
| 332 | |
| 333 | return boost::make_tuple(resultPoint.x() * scaleBy, resultPoint.y() * scaleBy); |
| 334 | } |
| 335 | |
| 336 | // convert vertices to a boost polygon, all vertices must lie on z = 0 plane |
| 337 | boost::optional<BoostPolygon> boostPolygonFromVertices(const std::vector<Point3d>& vertices, std::vector<Point3d>& allPoints, double tol) { |
no test coverage detected