Subject: CGAL users discussion list
List archive
- From: "Christian Asche" <>
- To: <>
- Subject: AW: [cgal-discuss] Global Arrangement Transformation
- Date: Wed, 8 Aug 2012 13:53:11 +0200
Thank you for your answer,
Let me show you my code snippet with two alternatives. Assume a arrangement mesh with four vertices at point coordinates (0,0), (0,1), (1,0) and (1,1). T is a scaling transformation matrix, which scales the the mesh with the factor 1000 in x- and y-direction.
// Datatype definitions typedef CGAL::Aff_transformation_2<Kernel> AffTransform2d; typedef Traits2d::Point_2 PointI;
// Snippet assert (arr->is_valid()); // works for (TMesh::Vertex_iterator vIt = this->vertices_begin(); vIt != this->vertices_end(); vIt++) { // first version Vertex_handle vh = arr->modify_vertex(vIt, vIt->point()); PointI pNew(T.transform(vh->point())); vh->point() = vh->point().transform(T);
// second version vIt->point() = vIt->point().transform(T); } assert (arr->is_valid()); // does not work
I can use both the first and the second version, but the final assertion fails with the following message:
CGAL warning: check violation! _expression_ : is_halfedge_valid File : C:\Users\asche\Programmierung\cpp\CGAL_build\include\CGAL/Arra nt_2/Arrangement_on_surface_2_impl.h Line : 4911 Explanation: Invalid halfedge. Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.h Assertion failed: this->is_valid(), file src\geometry\tmesh.cpp, line 330
The hard way to solve this in my project is writing the mesh into a proprietary file and reading it back into a „fresh“ mesh. But this takes time…
Thanks again
C.Asche
Von: [mailto:] Im Auftrag von Efi Fogel
You can change the coordinates of points as long as you don't change the topology of the arrangement. On Wed, Aug 8, 2012 at 11:13 AM, casche <> wrote: Hello,
____ _ ____ _
|
- [cgal-discuss] Global Arrangement Transformation, casche, 08/08/2012
- Re: [cgal-discuss] Global Arrangement Transformation, Efi Fogel, 08/08/2012
- AW: [cgal-discuss] Global Arrangement Transformation, Christian Asche, 08/08/2012
- Re: [cgal-discuss] Global Arrangement Transformation, Efi Fogel, 08/08/2012
- AW: [cgal-discuss] Global Arrangement Transformation, Christian Asche, 08/08/2012
- Re: [cgal-discuss] Global Arrangement Transformation, Efi Fogel, 08/08/2012
Archive powered by MHonArc 2.6.18.