Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] [Arrangement_2] Undo !

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] [Arrangement_2] Undo !


Chronological Thread 
  • From: Victor Lopez <>
  • To:
  • Subject: Re: [cgal-discuss] [Arrangement_2] Undo !
  • Date: Sun, 10 Mar 2013 15:34:43 -0600

*Question 1:* Is there a "single-source-line" solution for that?

Why not use remove(arr,ch) instead of  remove_edge() and merge_edge() ?


2013/3/10 Efi Fogel <>

On Sun, Mar 10, 2013 at 8:33 PM, Tapadi <> wrote:
Hello all,

I am sequentially filling 2D arrangements with curves and I need an "undo"
feature. I mean, removing the last inserted curve and left the arrangement
in the state it had just before the insertion.

*Question 1:* Is there a "single-source-line" solution for that?

A way to do this would be to use Arrangement_with_history_2 and to remove
the curve manually with the functions remove_edge() and merge_edge() in
order to set the arrangement back to its former state, without the curve and
without the cuts it induced.

This sounds good. If you need to go back to an exact previous state, you may want to consider extending each vertex and halfedge with time stamp.
 

*Question 2:* This method needs no complete traversal of the arrangement if
the handle to the inserted curve is kept in memory, but can still involve a
lot of operations on the arrangement. Is it anyway better than using
assign() to copy the arrangement before inserting the curve? (supposing that
I know when insertions are likely to be followed by an undo, and when they
are not, so it would not require an arrangement copy for each insertion)

This, naturally, depends on the complexity of the arrangement.
Deletion should not be more time consuming than insertion.
 

Thanks in advance!
Best regards,
Hugo Loi
PhD student at Inria - Maverick Team
http://maverick.inria.fr/



--
View this message in context: http://cgal-discuss.949826.n4.nabble.com/Arrangement-2-Undo-tp4656886.html
Sent from the cgal-discuss mailing list archive at Nabble.com.

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss





--
   ____  _        ____             _
  /_____/_) o    /__________  __  //
 (____ (   (    (    (_/ (_/-(-'_(/
                         _/






Archive powered by MHonArc 2.6.18.

Top of Page