| 416 | } |
| 417 | |
| 418 | class almost { |
| 419 | private: |
| 420 | double v_, eps_; |
| 421 | public: |
| 422 | almost(double v, double eps = 1.e-7) |
| 423 | : v_(v) |
| 424 | , eps_(eps) |
| 425 | {} |
| 426 | |
| 427 | bool operator==(double other) const { |
| 428 | return std::fabs(other - v_) < eps_; |
| 429 | } |
| 430 | |
| 431 | bool operator!=(double other) const { |
| 432 | return !(*this == other); |
| 433 | } |
| 434 | }; |
| 435 | |
| 436 | boost::optional<box_t> box_from_compound(TopoDS_Shape& compound) { |
| 437 | /* |
no outgoing calls
no test coverage detected