如何将2D CDT设置为严格拦截?

发布于 2025-02-08 20:36:13 字数 972 浏览 3 评论 0原文

我正在从没有截距可以拦截的约束的约束中更改2D CDT地形。

我更改为:

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Constrained_Delaunay_triangulation_2<K> CDT;

typedef CGAL::Exact_predicates_exact_constructions_kernel EK;
typedef CGAL::Constrained_Delaunay_triangulation_2<EK,TDS,Itag> CDT;
typedef CGAL::Constrained_triangulation_plus_2<CDT> CDTP;

全部:

typedef typedef CDT::<...> 

typedef CDTP::<...>

当我使用类点来获取一个点的坐标时:

  bool operator()(const Point & p1, const Point & p2) const
  {
    double x = p1.x();   //<--- Error on this line
    ...
  }

编译器发出错误:

没有CGAL :: lazy_exact_ntboost :: multeprecision :: mpq_rational to to cgal :: lazy_exact_ntboost :: lazy_exact_ntboost :: Double

我在此问题上进行了研究,但没有成功解决此错误。 谁能告诉我如何解决?

提前致谢

I´m changing a 2D CDT terrain from constraints that don´t intercept to constraints that can intercept.

I changed:

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Constrained_Delaunay_triangulation_2<K> CDT;

to

typedef CGAL::Exact_predicates_exact_constructions_kernel EK;
typedef CGAL::Constrained_Delaunay_triangulation_2<EK,TDS,Itag> CDT;
typedef CGAL::Constrained_triangulation_plus_2<CDT> CDTP;

and all:

typedef typedef CDT::<...> 

to

typedef CDTP::<...>

When I use the class Point to get the coordinates of a point for example:

  bool operator()(const Point & p1, const Point & p2) const
  {
    double x = p1.x();   //<--- Error on this line
    ...
  }

The compiler is issuing the error:

there is no convertion from CGAL::Lazy_exact_ntboost::multiprecision::mpq_rational to double

I did a reserch on this issue but had no success to fix this error.
Can anyone tell me how to fix it?

thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

豆芽 2025-02-15 20:36:13

ITAG是控制代码行为的参数,如果约束正在相交(请参阅 doc )。因此,如果您使用Epick没有交叉点的工作代码,则将ITAG更改为Exact_predicates_tag是唯一需要的更改。

Itag is the parameter that is controlling the behavior of the code if constraints are intersecting (see the doc). So if you have a working code without intersection using EPICK, changing Itag to Exact_predicates_tag is the only change needed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文