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: Wed, 26 Jan 2022 08:05:54 +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=j/alUavJLCxxs/nYNNBKcBq4Uk2ULobxQePc9xiY25I=; b=UT33c+hfDvYrh2MBHOtieW0Z0AKS2BEDNv65VwdyE+j1apQ1RlvRUCQCuI6NfEAQhNUesDYI8JnqqnPNyZjde9/uMBnMq5uXoGlL48JdT1Wdg3CpZevo7MezKtcxd0vH/iPoAKlAJTlejuJpOADlZc+8gU8PLIeHxmuFJ+B+1DL5NnWCdkKRi7Gy+HiCeLV80FzVqWFAa6MrCGOVg8JyrGIih3gUGUmBuiSo1YvnAyzNuhCqaLezWz3MLms4Y+QAb1rY8jxkh2hCD2Q+kyvx2f3Q30sYrShGMydCeWymWdz35uhPZc0S9rjepbm/gxq3p8iRFyHgF+SQi6zC2dJTsw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W+2cg4mSHltiFqNX2fcoSuglgVXK54DgWiFvMuuGUINZodB4qeB5sPAUkamK6jldlk9nf+Ih2naLeKUm4Fe8RS4IX0IytM1V62mCsLIQ7S4BntTqXIqBr7x5nFQM+sCF0uA0tZB1CKXR50Iz+poAWvJZ+TLvP4zC650dJufoVKLtFb123d1Y0BvETxgQa3F0zF8f/iqBXynIGELh03Lr3s8hh46Dna697saEdkzkicR6E5KVXbO3WjaiKQQCvYZGVwHaZopUXafoiHqCfIEmsaoXIX0uQvoka0TGCNiZiY/RKTFT63WOgmdh+joqRtVpZz6H/gytYHjoTlW03bDt0w==
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
- Ironport-data: A9a23:Vje7n6LtPJQv2ae2FE+RgJAlxSXFcZb7ZxGr2PjKsXjdYENShTVTy 2UWCG+AaPzZM2rxedByYd7l/U0PusfRmNIwTlQd+CA2RRqmi+KVXIXDdh+Y0wC6d5CYEho/t 63yTvGacajYm1eF/k/F3oDJ9CU6jefRLlbFILas1hpZHGeIcw98z0Iz8wIFqtQw24LhWlnT4 YqaT/D3YTdJ5RYkagr41IrY8HuDjNyq0N/PlgFWiVhj5TcyplFNZH4tDfnZw0jQHuG4KtWHq 9Prl9lVyI92EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPqsTbJIhhUlrZzqhk/9b2 tsOjMKLSQ4UBveUgsAaSBNqHHQrVUFG0OevzXmXnPGplxGDU1a1hvJkAQcxIJES/ftxDSdW7 /sEJTsRbxeFweWr3La8TeoqjcMmRCXpFN9H/Cg4kneGS6p8KXzAa/2iCdtw2Tk9is1UNe3ff NEQLztzBPjFS0QQawhMV8pv9AuurlXifRJWhQnKnvM64nPM9VJS86DvFOOAL7RmQu0Oxx3D+ Qoq5V/RCR4TMJmTyCGO72m3rvTemDvyHoMUDryxsPBw6GB/3UQWARwSEFa8ufO2kBHmA44Fb UsJ5iApsK4+slSxScXwVAG5p3jCuQMAX91XEKsx7wTlJrfoDxixCkcuXDACUYIdtMYLfWZyz HuOhNnbCmk62FGKck61+rCRpDK0HCEaK24eeCMJJTfpBfGz/+nfaTqfEb5e/L6JYs7dR2mpn GnbxMQqr+9P3JVXiM1X6Hie22r0zqUlWDLZ8S35fwpJBCtZaYq+Zoqr6DA3Bt4YdN/DFzFtU FA5htOf6ekHZaxheQSISeQJWbyu//yKKmKE2QI1WZ486z6q5nivO5hK5y1zL1toNcBCf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BdJdeKRGMDqSwqJ7aYQrH0hMlgZ8DxSYtQ+n/x1gF80cdvIrucky yE2rTE9vGE/gufJLwfOmgMmvEKvij/TMQctbELWSAgfsB/Dfic+PX3LnE8I21yUOKVAvg7/fWm VBMifDEWar93hFZ195a5NMBj
Great, exactly what I needed! Thanks Efi Fogel.
Best,
Marco
On 26 Jan 2022, at 08:29, Efi Fogel <> wrote:
typedef boost::variant<Vertex_handle, Halfedge_handle, Face_handle> Zone_result;std::list<Zone_result> zone_elems;zone(arr, seg, std::back_inserter(zone_elems));____ _ ____ _
/_____/_) o /__________ __ //
(____ ( ( ( (_/ (_/-(-'_(/
_/
On Wed, 26 Jan 2022 at 01:14, Marco Feder <> wrote:
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?Best,
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
--
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+.