Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

[cgal-discuss] [Arrangement_2] Undo !


Chronological Thread 
  • From: Tapadi <>
  • To:
  • Subject: [cgal-discuss] [Arrangement_2] Undo !
  • Date: Sun, 10 Mar 2013 11:33:20 -0700 (PDT)

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.

*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)

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.



Archive powered by MHonArc 2.6.18.

Top of Page