Subject: CGAL users discussion list
List archive
- From: sg <>
- To:
- Subject: Re: [cgal-discuss] const_handle to non_const_handle
- Date: Mon, 21 Nov 2016 00:09:44 -0800 (PST)
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=SoftFail ; spf=None
- Ironport-phdr: 9a23:dv2wsxVttfXPYtN4vlJT/t2gO8HV8LGtZVwlr6E/grcLSJyIuqrYZReAuadThVPEFb/W9+hDw7KP9fuxAipau93b7SBKWacPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3wOgVvO+v6BJPZgdip2OCu4Z3TZBhDiCagbb9oIhi7qQvcutMIjYd8Jao91BvEr3hVcOlK2G1kIk6ekQzh7cmq5p5j9CpQu/Ml98FeVKjxYro1Q79FAjk4Km45/MLkuwXNQguJ/XscT34ZkgFUDAjf7RH1RYn+vy3nvedgwiaaPMn2TbcpWTS+6qpgVRHlhDsbOzM/7WrajNF7gqBGrxK7vxFxzY7abp+WOvV8cKPTYNwVSnZaU8lLSyBMGJizY5cTA+cDO+tTsonzp0EJrRu7HQSsH+zvwSJPi3/r0q02zfgtHRzI0QA9A94CrHrZodTuOacTUOC10KvIwS/ZYPxKwzv96Y7IfwknrPqRU7xwds/RxlMuFwPDlliQr5bqMCiO2eQJrWeX9fZvVeWqi2I/qgFxpCKvxsY2hYXTiIIV0FbJ/jh6zoYtPdC0VU92bcC+HJdOtyyXOZF6Tt4sTmxmoio3xbMLtYamcCUL1pgr3QDTZvyJfoSS/x7uWuicLS14iX9nfr+0mgy8/lK6yuLmU8m5yFZKoTRBktnLrn0N0hLS6s+dSvt+5Euh3yyA2BvI5eFAP084j7bUK5kkwrIol5oTt1rMHjPulUnrjaKaaF8o9vao5unpeLnqu5GROoFuhgzxPKkigsm/Dv45MggKUWib4+O81Lj78E3kT7VGkOE6nrTXvZzHOcgXuqC0Dg5O34Yi6ha/EzWm3M4CknYbNl5FeRSHg5DzO17SOPD4Eeu/g1O0nTh3yPDJJLnhDozQIXjCi7fuYat961VHyAco1tBe55dUCqkbL/7pW0/xssbYDh4jPACuzebnEoY164UFRGjaArOFKLiA9hiT9+c3Kq+NYpUUsXDzMb8+9vv2hDg4n1EaOqKm1J9SZHGjFel9OBakZ2HxiIIBDXsS7E15R+PjjBiOUCVYem2pGfNgt2FhVsSgUcHFT4qnhLHH1yC+WYFbY3hCA0yBVlHhcoG/Vu0SbC+OZM19imsBXLO7TNok3Bq0szjkyrd4I/Ca+yFNtJT4yNFz+9rTiRQ2vDp9Bc6Z3izWZmxxl2IMATk/2aQxq0VmxwKF2KJyh/EeE9VW47VPWwI3LobVxOFhTfr7QQPKWN6MRU2+S96rRDc4RNg1zpkQYktiXcqvhFbf0i+yB7YJmvqtDZY+9q/61n38PN50wHuD0qArhV0rBNVOOHLgmaN1sRTeApbNmlmU0YCteak61SvA73+KxmfAtltVWQJ7S7jAV2tKYEzKrNro0VjfRaSlE7UtPxFagMiLIKFOZ5CypFhDTfbnftLXZmb0mmGrGR+O2oSBaYPrf35U2izXAkwJ3ls68HOPNAx4AC6kpyfFATpiIlPpeF/l9/VJpXayT0t9yQiAZUlsmuGc9xschPjaTfoW2uE5vjw8oWB0AEqljZWRANWJo09tfb5XfMgmpgYbhDKD6Up7YtqmJqpoglNYeANy+F/j0g1zA5lN1u4jqXcRwRBsLa+EllFdb2Sd1JvqPejKLHLv9gukca/c12bUweGd/asCpvI/p1i24F/3TBF9rzts1NVYhnej7YTvICcAdK7YTWMlxTFzmLWCayhg57LFiGVmN7bslD3zyvc7D7Mr4U6xWvtQL4WoLR/XEfQIVPSpfeclklzsYhMfN/1J74Y1Odmnfr2Iwv2FJuFlySmpxTBa79olixnVr3InFMbJ3ooHhfiTmAqBAWSvxGy9u9z6zNgXLQoZGXCynHDp
Okk thanks. Its working now.
One more thing I get a face handle from this code. I add some data to this face by set_data() method. Now i want to access next face from current handle. How can I do that ?On Mon, Nov 21, 2016 at 12:49 PM, andreas.fabri [via cgal-discuss] <[hidden email]> wrote:
Well, it is not a static function.
If your arrangement object is called arr
you have to write
arr.non_const_handle(*f);
best,
andreas
On 20/11/2016 22:11, sg wrote:--
> I am implementing some code in CGAL. I made an arrangement. Now I want to add
> some data to every face in arrangement. So i access a face by below method.
> It return const handle. So i try to convert this to non_const_handle. But it
> show error that " cannot call member function without object."
>
> const Face_const_handle* f;
> if(f = boost::get<Face_const_handle>(&(it->second))){
> Arrangement_2::Face_handle fh = Arrangement_2::non_const_handle(*f);
> // ERROR HERE
> for(int i=1;i<convexPts.size();i++){
> CGAL::Gmpq temp =
> CGAL::squared_distance(convexPts[0],convexPts[i]);
> if(temp>max){
> max = temp;
> fh->set_data(max);
> }
> }
> }
>
>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/const-handle-to-non-const-handle-tp4662374.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>
Andreas Fabri, PhD
Chief Officer, GeometryFactory
Editor, The CGAL Project
phone: +33.492.954.912 skype: andreas.fabri
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
If you reply to this email, your message will be added to the discussion below:http://cgal-discuss.949826.n4.nabble.com/const-handle-to-non-const-handle-tp4662374p4662376.html
View this message in context: Re: const_handle to non_const_handle
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] const_handle to non_const_handle, sg, 11/20/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Efi Fogel, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, sg, 11/21/2016
- Re: [cgal-discuss] const_handle to non_const_handle, Andreas Fabri, 11/21/2016
Archive powered by MHonArc 2.6.18.