Boolean operations on polygons

How to use the Boolean operations on polygons Demo

Main Functionality

- Reset application
- Creating a new window
- Reading input from DXF file
- Print
- Close the current window
- Quit the application

Editing

- Set the current active polygons (red or blue)
- Insert circular polygon
- Insert circle
- Locate polygon
- Perform a boolean operation
- Make current result blue
- Make current result red
- Refresh
- Delete all blue polygons
- Delete all red polygons

Reset application

Press Ctrl+N combination keys or go to File menu and choose "New". The points list will be erased, the window's visible area will be set to default. (-1, 1, -1, 1)

Create a new window

Press Ctrl+W combination keys or go to File menu and choose "New Window". A new window will appear, modifying the visible area to make the points list fit in the new window.

Reading input from DXF file

Press Ctrl+O combination keys or go to File menu and choose "Open DXF file". A file dialog will be opened to choose an existing input file.

Writing input to file

Press Ctrl+S combination keys or go to File menu and choose "Save" or "Save as". Clicking "Save as" will open a file dialog to enter a file name. Clicking "Save" will save the input to the last file name that was chosen, and in case there isn't one yet, a file dialog will be opened.

Print

Press Ctrl+P combination keys or go to File menu and choose "Print". The visible area on the screen will be outputed to the print device of your choice.

Close the current window

Press Ctrl+X combination keys or go to File menu and choose "Close". You may do it for any window other than the initial one, this operation will close only the one you have choosen. If you do this for the initial parent window, it will close the others too.

Quit the application

Press Ctrl+Q combination keys or go to File menu and choose "Quit". When you quit the application, all the windows you have created will be destroyed.

Perform a boolean operation

Left click on one of the boolean operations button layer (Intersection, Union, Difference between Blue and Red, Difference between Red and Blue, Symmetric Difference, Minkowsky sum, Blue Complement, Red Complement). the result polygon will be filled with orange and its boundary will be green.

Set the current active polygons (red or blue)

Toggle the radio button to Blue or Red to determine current active polygonal set, if the blue polygons is active, all inserted polygons and circles will be blue, and the point location query will be on the blue polygonal set.

Insert circular polygon

Left click on the "Insert Circular Polygon" layer. Be sure there is no layer activated in standard toolbar that eat events. To be sure, press the arrow button situated on the standard toolbar. A new vertex is inserted every time the left mouse button is pressed, if the polyline entered so far is simple. To insert a circular arc press the left mouse button while pressing the Ctrl key, and the cursor will be moved to the middle point of the current segment and moving the mouse will change the circular arc, another left click will add the circular arc if it doesn't intersect somw other edge. A right click closes the polygon, if it is simple. You can use the Escape key if you want to remove your last entered point in the polygon. The new polygon is created. To insert more than one polygon, keep doing as mentioned above without deactivating the "Insert Circular Polygon" layer. To deactivate this layer, just press the arrow button situated on the same toolbar.

Insert circle

Left click on the "Insert Circle" layer. Be sure there is no layer activated in standard toolbar that eat events. To be sure, press the arrow button situated on the standard toolbar. A left click on the mouse determines the center of the circle, moving the mouse changes its radius, another left click closes the circle. You can use the Escape key if you want to cancel currect circle before it gets inserted. To insert more than one circle, keep doing as mentioned above without deactivating the "Insert Circle" layer. To deactivate this layer, just press the arrow button situated on the same toolbar.

Locate polygon

Left click on the "Locate Polygon" layer. Be sure there is no layer activated in standard toolbar that eat events. To be sure, press the arrow button situated on the standard toolbar. Move the mouse to desired position where you want to perform the point location query and left click the mouse, if a polygon is located, its boundary will be painted yellow. To locate more than one polygon, keep doing as mentioned above without deactivating the "Locate Polygon" layer. To deactivate this layer, just press the arrow button situated on the same toolbar.

Make current result blue

Left click on the "Make Result Blue" button layer. Current result will replace the blue polygons, and the red polygons will be deleted.

Make current result red

Left click on the "Make Result Red" button layer. Current result will replace the red polygons, and the blue polygons will be deleted.

Refresh

Left click on the refresh button. All polygons will be redrawn to the widget.

Delete all blue polygons

Left click on the "Delete Blue Polygons" button layer, all blue polygons will be deleted.

Delete all red polygons

Left click on the "Delete Red Polygons" button layer, all red polygons will be deleted.

Last modified: Fri May 16 14:53:31 MEST 2003