Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve
Chronological Thread
- From: Marco Feder <>
- To: "" <>
- Subject: Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve
- Date: Tue, 25 Jan 2022 23:14:31 +0000
- Accept-language: it-IT, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Mac2C/C9X9u03JnM5gaSPeZLguJFBxrTxoWa6N3+deI=; b=Ahfm+6aKrlU677s0DckdzyEGFzpO/TZsh3CGS4l3JXiicSX3hQH69c+f11iG4pQqprLS5TwZNLrXp94C87pAO7Ih/MfW42JCvdqrKZ3GB0XBQfWlN11Nz6eGglZBMwPRTGE5k6D4qspcityTZrnr3FxqqTdlyqjxkp5D6W57meefIvxunldEZYZ6wxk2HFLxzhIRtLO/rcQLsItv2cRZeBnUffEBdbjK7ilg51mKWcjyPseIx36x6Wj7pNdk3TKVo2vsj1IzeKOGzB2JfOUKkLiOwTgh7LPK+P55cb5kVEZergtwU3yZwy3zMOcyRSoux53N7+IXhW5PNCZQSPJsjw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TZ0xFunPMW42qLHIbb55KPFWgfUhSr91dZVAqihHpbow1+qhBflKPbZPF+NpXP0VnZfaOYQ5svjN4rmDpcuXd/Ag7v8QHAKT+3C2hOTxU2GXwz/Cmh5/RM+254atRPSptXTaRPJ3jDWpbzxZPFEmPEkmyjiYjxA9F/8FNY4PhffB6JrHTX+C8h1Oo81ScfMGkWaTyMYRWULfDI8ooFGUryzGrWABZul76vP0oZjG/31l3tLYaulePKvH6TIRSzZgmstVqhdK2RGAKiN/+gjjC6zapG1WxRxkobpNqms94RHWS9fCFtb0srPUxt4CbppW+Mm664aiQOxY4RNe42Fa3w==
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
- Ironport-data: A9a23:UGihOqKttFNXoDGWFE+RnpAlxSXFcZb7ZxGr2PjKsXjdYENShDACy GYeXmCOOKyCYGGmctkiOduz8xxXucKEn4VjHQQd+CA2RRqmi+KVXIXDdh+Y0wC6d5CYEho/t 63yTvGacajYm1eF/k/F3oDJ9CU6jefRLlbFILas1hpZHGeIcw98z0Iz8wIFqtQw24LhWlnQ4 YmaT/D3YTdJ5RYkagr41IrY8HuDjNyq0N/PlgFWiVhj5TcyplFNZH4tDfnZw0jQHuG4KtWHq 9Prl9lVyI92EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPqsTbJIhhUlrZzqhzswvy fZ/r5yKViwZbo3+qf8mDUVVHHQrVUFG0OevzXmXnPGplxGDTVq1hvJkAQcxIJES/ftxDSdW7 /sEJTsRbxeFweWr3La8TeoqjcMmRCXpFN9H/Cg4kneJS6l9KXzAa/2iCdtw2Tk9is1UNe3ff NEQLztzBPjFS0EXag9HV8xWcOGAgCbbMA8At2yuh/Qww3bP4xV70ebuGY+AEjCNbZ4MxR3Hz o7cxEzyDRgecdCe0jGY6WmEnf7KhSq9WYQIFbT++OQCvbGI7mkaCRlTWFyjq/aj2hbmBIkZL FEI8C0zq6R07FasUtT2Qxy/pjiDowIYXN1TVeY97Wlh15Y4/S7IGjYFbQxbaOY5n/9mZQ4bz WTXw97mUGkHXKKudVqR8bKdrDWXMCcTLHMfaSJscefjy4m8yG3UpkKQJuuPAJJZnfWpSWihm G3iQDwW3utI0pRVv0mu1Qmf22rEm3TfcuIizizrNo5Pxj14aYijbuREAnCCtaoYRGp1ZmeAs X4CkqCjAA0mCJiMkGmAR/0HE6v5v67aa3vbnEJlGIQn+3K14Xm/cItM4TZ4YkB0LsIDfjyva 0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jH1QpNUvjx wo8cm+DHu8ZjqM8JzwzzlaE5t0XX6YbFPMhAldYxOnLNahylw0E8mP/gxcAvLeNCIM+xlJyL djw8DQYnVokNYF9JLSOdvBAlgEC3/vX7CH0jrhjkkhCdyNvuCuTYHBa4kVQb+t/fnP68LA0s l7Q3GcTMGkKXP43rv847VszN6KY1SX83rVfK0e3ceuCM6eevGuGnsmNJzF4ngYBk00PlVCZ+ dwiaFGdEUEznuL5//EhLsvZMggTbtYArBA7nA6jjN+VnddLHtz4EerlC+iTqKwTn0SoWh4zG JgB5dgAGZ/q11zEKcDgL/gOzhB/vWzW
- Ironport-sdr: +jp2AFG0atAoK2N0gJIQV3hb7GNc5ZuKdsV2P6uiC9iQOgR+cVUXkTcnJiaNgYeZQHUzx7rrnr fD2zgM5lIL42px5JQBeDBme/+Sm1YPslPC2PgJX9vh34PA2gzJ0dI0lgHfoBB6eHTB/PUi3saY 46oQOr44879eLVygpDeZ6gVDKJYP3BLBaN1H7lsZCdpR9isqgJltv9bjuQ+27GupalMVNHdNMH 0T98e3OKI5bYSMCU037SrYZRPLmbDzd5cIFmSpiBXCH3u3nt8Ef6HTv3X7cn6S8oqe5tZKV+Ad FPYU8hb3lxeC7CgSHA8pvqTM
I’m sorry to post again, but I’ve not been able to find the proper way to give that OutputIterator
argument.
I was thinking to use
std::back_inserter() like this:
std::vector<?>
arr_vec;
auto
my_zone = CGAL::zone(arr,my_curve,std::back_inserter(arr_vec),pl);
The issue, again, is that I don’t know what is the correct template for arr_vec.
Which one should I use?
Marco
On 22 Jan 2022, at 14:04, Marco Feder <> wrote:
Thanks Efi Fogel,
I’m trying to cook a MWE to handle the situation I have in the attachment, but I have a hard time understanding how to give the OutputIterator argument to the CGAL::zone() function.
So far I have the following snippet, which does not compile as output_it cannot be constructed. How can I define that output iterator correctly?
#include <iostream>#include <iterator>
#include <CGAL/Arr_segment_traits_2.h>#include <CGAL/Arr_walk_along_line_point_location.h>#include <CGAL/Arrangement_2.h>#include <CGAL/Cartesian.h>#include <CGAL/MP_Float.h>#include <CGAL/Quotient.h>#include <CGAL/intersections.h>
typedef CGAL::Quotient<CGAL::MP_Float> Number_type;typedef CGAL::Cartesian<Number_type> Kernel;typedef CGAL::Arr_segment_traits_2<Kernel> Traits_2;typedef Traits_2::Point_2 Point_2;typedef Traits_2::X_monotone_curve_2 Segment_2;typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;typedef CGAL::Arr_walk_along_line_point_location<Arrangement_2> walk_pl;
int main() {Arrangement_2 arr;Segment_2 cv[3];walk_pl pl(arr);Point_2 p1(0, 0), p2(0, 4), p3(4, 0);cv[0] = Segment_2(p1, p2);cv[1] = Segment_2(p2, p3);cv[2] = Segment_2(p3, p1);CGAL::insert(arr, &cv[0], &cv[3]);
Segment_2 my_curve(Point_2(0,1), Point_2(2,2)); // curve is a segment now, it cuts the triangleinsert(arr, my_curve, pl);
// Compute the zone of the curvestd::ostream_iterator<Arrangement_2> output_it(std::cout,'\n’); // Error!auto my_zone = CGAL::zone(arr,my_curve, output_it,pl);
return 0;}
Best,Marco
On 20 Jan 2022, at 15:01, Efi Fogel <> wrote:
If you can reduce the problem to the plane (perhaps it is already in the plane), you can use the Arrangement_2 class template from the "2D Arrangement" package; see https://doc.cgal.org/latest/Arrangement_on_surface_2/index.html.Construct an arrangement of the type of curves you are interested in, then use the CGAL::zone(c) free function to compute the zone of a given curve c; see
https://doc.cgal.org/latest/Arrangement_on_surface_2/group__PkgArrangementOnSurface2Funcs.html#ga49aa156968945f5533a2b5d9897ca659
____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
On Thu, 20 Jan 2022 at 14:27, Marco Feder <> wrote:
Dear all,
I’m completely new to CGAL, and I’d like to understand if it’s possible to perform the following task:
Consider an element T of a 2D mesh, which is cut by a curve \Gamma. Is it possible to define/get the two new elements, say T_1 and T_2, induced by the cut, as showed in the attachment?
If so, could you please point me to the right examples/pages in the manual?
Best regards,Marco
<cut.jpeg>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Marco Feder, 01/20/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Efi Fogel, 01/20/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Marco Feder, 01/22/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Marco Feder, 01/26/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Efi Fogel, 01/26/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Marco Feder, 01/26/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Andreas Fabri, 01/26/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Efi Fogel, 01/26/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Marco Feder, 01/26/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Marco Feder, 01/22/2022
- Re: [cgal-discuss] Get sub-elements induced by the cut of an element with a curve, Efi Fogel, 01/20/2022
Archive powered by MHonArc 2.6.19+.