How to use the Planar Map demo
This program demonstrates the use of planar maps with intersections and
some other CGAL libraries. There are three kind of traits for planar maps: 1.
segments planar map - consist only segments. 2. Polylines planar map -
consist only polylines which are set of connected segments 3. Conics planar
map - consist only conics which are a curve defined by (at most) two degree
equation,e.g., segment, circle, ellipse, parabola and hyperbola.
Choosing traits type for planar map
Editing
Snap Mode
Options
File Handling
Segments planar map
By default, this option is selected when starting the application. Press the
"segment traits" button from the toolbar or go to the menu bar -> options ->
segments traits.
Polylines planar map
Press the "polyline traits" button from the toolbar or go to the menu bar ->
options -> polyline traits.
Conics planar map
Press the "conic traits" button from the toolbar or go to the menu bar ->
options -> conic traits.
Insert object
First, press the "Insert" button, the type of object that can be inserted
depends on the selected traits type. Segments: left click the mouse to choose
the source point, move the mouse to determine the segment and close it with
another left click. Polyline: left click the mouse to choose the source point,
keep on moving the mouse and left click to add another middle points, right
click to close it. Conics: when the conic traits is selected there are five
options of conic curves at the toolbar (segment, circle, ellipse, circle arc,
5 points arc) segments : circle: left click the mouse to choose the center,
move the mouse to choose radius and left click to close it. Ellipse : the
ellipse is obtained by an enclosing rectangle. left click the mouse to choose
one corner and left click again to choose the opposite corner. Circle arc:
choose three non-collinear points by left clicking on the mouse. 5 points arc:
choose five points by left clicking with the mouse.
Delete
Press the delete button and left click any object at the planar map to remove
it.
Drag
Press the "drag" button, left click any object while dragging it and release
the mouse button to put it.
Point location
Press the "point location" button, and left click on any point and face
containing that point will be highlighted.
Vertical ray shooting
First, you have to choose the ray shooting direction (upwards or downwards), by
default the upward direction is selected. Left click on any point at the
planar map and a ray will be shot until hitting a curve or vertex and it
will be highlighted.
Split
Press the split button, choose a splitter segment (the same as with drawing
segments) which intersects a curve at the planar map and at the intersection,
a new vertex will be added, that is the edge will be split.
Merge
Press the merge button, chose a subcurve that can be merged by left click, it
will be painted red and stays red if its mergeable, and then choose another
neighbor sub_curve that can be merged with it, and it will be painted green
and the edge will be merged, that is the vertex between them will be removed.
Snap to point
To allow both point and grid snap modes, press the snap mode button or go to
menu bar -> Snap mode -> Snap Mode. By default the point snap mode is
activated. Snap to point allow the user to use an existed planar map point in
insertion of new curves and in the split operation.
Snap to grid
After the Snap mode button is clicked (see explanation above), you can choose
to use the grid snap mode by clicking the Grid Snap Mode button or go to menu
bar -> Snap mode -> Grid Snap Mode. Snap to grid allow the user to use the grid
points in insertion of new curves and in the split operation.
Overlay
To overlay two or more planar maps, go to menu bar -> Options -> Overlay. A
dialog box will open with a list of the current planar maps on the left side.
Drag and drop the planar maps that you want to overlay to the right side and
press OK. You can only overlay planar maps with the same traits, therefore,
after you choose the first one, you can only choose planar maps of the
same traits.
Properties
To change the properties go to menu bar -> Options -> Properties.
The properties are:
- Height - window height.
- Width - window width.
- Line width - curves width.
- Scaling factor - determines the level of the zoom in/out operations.
- Display mode - allow choosing between different or uniform colors in overlay.
- Grid cube size - change the size of the grid.
- Remove curve mode - choose between delete the original curve or the chosen
sub-curve.
- Vertex radius - change vertex size.
- Draw vertex not in intersection - allow to draw only the intersected vertices.
Show/Hide grid
Allow to see the grid without using the grid snap mode.
Background color
Allow to choose different colors for the background.
Planar map color
Allow to choose different colors for the planar map.
Ray-Shooting direction
Vertical ray-shooting can be up or down.
File format
Files have tow main formats:
- Planar map format - describe all the planar map components.
- Special format - the demo knows to read curves in a special format.
Open planar map file
Go to menu bar -> File -> Open Segment Pm File, and load a suitable file.
Opening of a polyline or a conic pm file are not supported yet.
Open special format file
Go to menu bar -> File -> Open Segment/Polyline/Conic File, and load a suitable
file.
Save file
Go to menu bar -> File -> Save/Save as.
Last
modified: 12/09/2004