Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Functions of 2D and 3D Geometric Kernel

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Functions of 2D and 3D Geometric Kernel


Chronological Thread 
  • From: Mael Rouxel-Labbé <>
  • To:
  • Subject: Re: [cgal-discuss] Functions of 2D and 3D Geometric Kernel
  • Date: Wed, 16 May 2018 12:25:10 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:GKiZih3hhpLy1vXSsmDT+DRfVm0co7zxezQtwd8ZseIfL/ad9pjvdHbS+e9qxAeQG9mDsLQc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q99pHPbQhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmlTkJNzA5/m/UhMJ/gq1UrxC9qBFk2YHYfJuYOeBicq7Tf94XQ3dKUMZLVyxGB4Oxd4wBAPAfMuZct4bzu1wOrQaxBAayAOPj0zlGiWXt0qIhyeMqDAbL3Ak6EN0QtHTYts/1NKAPUeG60qbIyS/Pb/dM1jjm84fHbAssof6SUrJ3dMre11UvFxnFj1Wes4PqIy+V1uMXs2mb9eZvSeWvi2s+pgx3vzOhyMAsiozTiYIUzFDJ7SN5z5wuKtKjTE50f8SoH4dXtyGfL4d5XswiTHtsuCogzb0Go5G7cS4Xw5ok3x7Sc+GLfoqL7x75WuucLy10iG95dL+9nRq+7Eetx+PkWsSwzFpGtClIn9jWunwTyhDe5NKLR/9g8kqnxD2BzRrc6vteLkAxjafbK4Auwro3lpcLrEjPBCr2mELrgKKUdEgo4O2o5P7mYrXiv5OcMJJ0ih3kPqQphMy/Af40Mg4QUGiH4ei81bvj8lPlQLhSk/E7kKrUvIrUKMkVvKK1HhNZ34Q55xqiADqr3swUnXwdI1JEfBKHgZLpO1bLIP3gCPewmUqjkDNxy/DcOb3hH5rMIWbHkLv7ebZy8VVTxxEtwt1E6JJbFLYBIPftVU/trtzZDhE5PBaozOb7D9V9zIMfVXiTDa+eNaPeqUWI6f43I+mQeI8Vvy7wJOQq5/H0iX81gEISfaiy3ZQLdXC4Be9mLl6CYXvsh9cBCX0FshA/TOzskl2CUCRca2y8X6ImtXkHD9etAo7HA4ysm7ecxzyTH5tMZ2kABErfP23vctChUvoIXxiVP99slnkgXLKrysd10BijsEngzKd3I+6S/iQSv5/L29Vy4uDPjwA8/DdoCN6MlWqKSjcnzSszWzYq0fUn8gRGwVCZ3P0g2q0KJZlo//pMFzwCG9vZxu1+Bcr1X1iYLNiET1OrXs+3Dzg6UtUr0pkFZEMvQ4z+3CCG5DKjBvour5LOHIY9qPuO0HX2Isth0WfI3aI9iEM3BMBIMD/+3/Mtx03oH4fM1n6hueOqeKAbhnCfrSGGyjPR4wddWQ90FKLYQTYYeEuQq9nltBvP

Hello,

You can read about concepts and models are here: https://doc.cgal.org/latest/Manual/tutorial_hello_world.html#intro_concept.

CGAL::Exact_predicates_exact_constructions_kernel is a class that is said to be a model of the 'Kernel' concept because it provides models for the various objects and functors concepts that are required by the concept 'Kernel' (see https://doc.cgal.org/latest/Kernel_23/classKernel.html).

In your case, Compute_squared_radius_smallest_orthogonal_circle_2 is indeed a model of the functor concept ComputeSquaredRadiusSmallestOrthogonalCircle__2, and it can be used as follows:

typedef CGAL::Exact_predicates_exact_constructions_kernel EPECK;
typedef EPECK::FT FT;
typedef EPECK::Weighted_point_2 Weighted_point;
typedef EPECK::Compute_squared_radius_smallest_orthogonal_circle_2 Smallest_circle;

EPECK kernel;
Weighted_point wp1, wp2;
Smallest_circle sc = kernel.compute_squared_radius_smallest_orthogonal_circle_2_object();
FT result = sc(wp1, wp2);

In general, kernel objects and functors are defined because there is a use for it, so if you can search the source code of CGAL to find out how they are used in practice.

On 16/05/2018 11:51, Kathi wrote:
Hello,

I don't manage to use the member functions of a 2D/3D geometric kernel as
listed on https://doc.cgal.org/latest/Kernel_23/classKernel.html .
Maybe the problem arises from the fact that I do not fully understand what a
concept, model etc is and especially how to make use of them in practice.

To make my problem specific:
I am working with the Exact_predicates_exact_constructions_kernel and want
to (for example) compute the squared radius of the smallest orthogonal
circle of two weighted points in 2D.
In the reference manual I found:
Compute_squared_radius_smallest_orthogonal_circle_2, a model of
Kernel::ComputeSquaredRadiusSmallestOrthogonalCircle_2.
But I was not able to use it. I tried CGAL::,
CGAL::Exact_predicates_exact_constructions_kernel::, etc but the function is
never found ("not a member of ...").

It would be very helpful if anybody could provide a minimum working example
which makes use of the function.

Thanks for your help,
Kathi



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/





Archive powered by MHonArc 2.6.18.

Top of Page