From fee948e406c887deb9908c0b6f2ce2844dc520cf Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Mon, 16 Dec 2013 16:19:29 +0100 Subject: [PATCH] misc (following Sebastien remarks) --- .../demo/CGAL_ipelets/circle_pencils.cpp | 9 +++++-- CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp | 8 +++++- .../lua/libCGAL_circle_pencils.lua | 4 +-- .../CGAL_ipelets/lua/libCGAL_hyperbolic.lua | 10 +++---- .../doc/CGAL_ipelets/CGAL_ipelets.txt | 27 ++++++++++--------- 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/circle_pencils.cpp b/CGAL_ipelets/demo/CGAL_ipelets/circle_pencils.cpp index e9a167117ff..e797687be53 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/circle_pencils.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/circle_pencils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2013 INRIA Sophia-Antipolis (France). +// Copyright (c) 2013 INRIA Sophia Antipolis - Mediterranee (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -63,6 +63,12 @@ void pencilIpelet::protected_run(int fn) int i=get_IpePage()->primarySelection(); + + if (i<0) { + print_error_message(("No mark or circle selected")); + return; + } + read_one_active_object(get_IpePage()->object(i),CGAL::dispatch_or_drop_output( std::back_inserter(pt_list1), std::back_inserter(cir_list1))); @@ -120,7 +126,6 @@ void pencilIpelet::protected_run(int fn) } //end of switch - std::cout<0){ draw_in_ipe(circ); diff --git a/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp b/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp index 4b685c64cc4..69d5e141acc 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp +++ b/CGAL_ipelets/demo/CGAL_ipelets/hyperbolic.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2013 INRIA Sophia-Antipolis (France). +// Copyright (c) 2013 INRIA Sophia Antipolis - Mediterranee, (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or @@ -77,6 +77,12 @@ void hyperbolicIpelet::protected_run(int fn) std::list cir_list,cir_list1; int i=get_IpePage()->primarySelection(); + + if (i<0) { + print_error_message(("No mark or circle selected")); + return; + } + read_one_active_object(get_IpePage()->object(i),CGAL::dispatch_or_drop_output( std::back_inserter(pt_list1), std::back_inserter(cir_list1))); diff --git a/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua b/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua index ac6fdfe7c10..b2359cf5139 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua +++ b/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_circle_pencils.lua @@ -17,8 +17,8 @@ function run(model, num) end methods = { - { label= "in pencil, orthogonal to one circle" }, - { label= "orthogonal to three circles" }, + { label= "Circle in pencil, orthogonal to one circle" }, + { label= "Circle orthogonal to three circles" }, { label="Help" }, } diff --git a/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua b/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua index fb53b52126b..2f6825ec089 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua +++ b/CGAL_ipelets/demo/CGAL_ipelets/lua/libCGAL_hyperbolic.lua @@ -17,11 +17,11 @@ function run(model, num) end methods = { - { label= "line" }, - { label= "segment" }, - { label= "bisector" }, - { label= "circle (center[prim. sel.], point through)" }, - { label= "circumcenter" }, + { label= "Line" }, + { label= "Segment" }, + { label= "Bisector" }, + { label= "Circle (center[prim. sel.], point through)" }, + { label= "Circumcenter" }, { label="Help" }, } diff --git a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt index 8b614c008ef..cd6217665f6 100644 --- a/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt +++ b/CGAL_ipelets/doc/CGAL_ipelets/CGAL_ipelets.txt @@ -66,11 +66,11 @@ as well as with the version 7 (at least up to version 7.10). These ipelets are a good starting point to design your own ipelet. For more details on how to compile an ipelet, please refer to the Ipe manual. -Below is the list of Ipelets provided by the Demo Ipelets +Below is the list of ipelets provided by the demo: \section Ipelets_list List of provided Ipelets -\subsection alpha_shapes_ipelet Alpha shapes +\subsection alpha_shapes_ipelet Alpha Shapes Selection should be a set of points or circles (considered as weighted points). The different values of alpha where the alpha shape changes are @@ -81,21 +81,21 @@ computed and the rank of the chosen alpha is asked in a dialog box. Selection should be segments, circles, and arcs of circles. All objects are broken at intersection points and at x extrema for circles. -\subsection bbox_restriction_ipelet Bounding box restriction +\subsection bbox_restriction_ipelet Bounding Box Restriction Replace the selection by a bounding box of the points in the selection. -\subsection circle_pencils_ipelet Pencils of circles +\subsection circle_pencils_ipelet Pencils of Circles Selection must be three circles or points (points are considered as zero radius circles).
  • In pencil, orthogonal to one circle: -This option draw the circle orthogonal to the primary +This option draws the circle orthogonal to the primary selection belonging to the pencil defined by the two other circles.
  • Orthogonal to three circles: -This option draw the circles orthogonal to the three +This option draws the circle orthogonal to the three selected circles.
@@ -115,7 +115,8 @@ The power diagram partitions the plane depending of the circle with smaller powe
  • Apollonius : Selection should be points (zero radius circles) and circles. The Apollonius diagram is computed and clipped to a box a bit larger than the selection. -The Apollonius diagram partitions the plane depending of closest circle. +The Apollonius diagram partitions the plane depending of closest +circle (also called additively weighted Voronoi diagram). \subsection generator_ipelet Generators @@ -138,7 +139,7 @@ Generate random line segments inside a square bounding the selection. Generate random circles whose centers are inside a square bounding the selection. -\subsection hilbert_sort_ipelet Hilbert sort +\subsection hilbert_sort_ipelet Hilbert Sort Sort the selected points with a space filling strategy.
    • Hilbert sorting curve, median policy: @@ -187,7 +188,7 @@ the latter being the primary selection. Selection should be a simple polygon, the maximal edge length is asked in a dialog box. A mesh of the polygon is computed and drawn. -\subsection minkowski_ipelet Minkowski sum +\subsection minkowski_ipelet Minkowski Sum
      • Minkowski Sum: Selection should be two simple polygons. @@ -197,7 +198,7 @@ Selection should be a circle and simple polygons. The Minkowski sum of the polygons with the circle is computed and drawn.
      -\subsection multi_delaunay_ipelet k order Delaunay +\subsection multi_delaunay_ipelet k Order Delaunay Selection should be a set of points. The order k Voronoi diagram or its dual the order k Delaunay is drawn.
        @@ -223,7 +224,7 @@ Farthest neighbor Voronoi diagram. k is asked in a dialog box.
      -\subsection multi_regular_ipelet k-order regular +\subsection multi_regular_ipelet k Order Regular Selection should be a set of points and circles. The order k power diagram or its dual the order k regular triangulation is drawn.
        @@ -244,7 +245,7 @@ k is asked in a dialog box. k is asked in a dialog box.
      -\subsection partition_ipelet Polygon partition +\subsection partition_ipelet Polygon Partition Selection should be simple polygons. The polygons are splitted according different algorithms.
        @@ -261,7 +262,7 @@ The polygons are splitted according different algorithms. \subsection pca_ipelet PCA A line segment giving the principal component analysis of the selection is drawn. -\subsection skeleton_ipelet Skeleton and offset +\subsection skeleton_ipelet Skeleton and Offset Selection should be a simple polygon. The straight skeleton and associated offsets of the polygon are drawn.