ViewDesignEngine  3.1.0
高性能 CAD 计算几何引擎
vde::foundation::ToleranceScope类 参考

局部容差作用域(RAII) 更多...

#include <tolerance.h>

Public 成员函数

 ToleranceScope (const Tolerance &tol)
 进入新的容差作用域 更多...
 
 ~ToleranceScope ()
 退出容差作用域,恢复之前的全局容差 更多...
 

详细描述

局部容差作用域(RAII)

构造时设置新的全局容差,析构时自动恢复为之前的值。 用于在特定代码块内临时修改容差。

void precise_operation() {
// 在此作用域内使用求交级精度
// ... 布尔运算 ...
} // scope 析构,自动恢复
ToleranceScope(const Tolerance &tol)
进入新的容差作用域
Definition: tolerance.h:210
static constexpr double Intersection()
求交级精度 (1e-8):精确求交、布尔运算
Definition: tolerance.h:173

在文件 tolerance.h201 行定义.

构造及析构函数说明

◆ ToleranceScope()

vde::foundation::ToleranceScope::ToleranceScope ( const Tolerance tol)
inlineexplicit

进入新的容差作用域

保存当前全局容差并设置新值。

参数
tol此作用域内使用的容差

在文件 tolerance.h210 行定义.

引用了 vde::foundation::Tolerance::set_global().

◆ ~ToleranceScope()

vde::foundation::ToleranceScope::~ToleranceScope ( )
inline

退出容差作用域,恢复之前的全局容差

在文件 tolerance.h217 行定义.

引用了 vde::foundation::Tolerance::set_global().


该类的文档由以下文件生成: