Example: Create an Area with a Hole

How to create areas should be obvious, but creating areas that include one or more holes involves a slight nuance.   In this example we will create an area with one hole in it.

 

eg_newobj03_01.png

 

We begin by creating a new drawing.  We open the drawing and click the Create Area tool.

 

eg_newobj03_02.png

 

In the drawing we open the New Object dialog and then we begin clicking to create coordinates that define the boundary of our area using straight line segments.  We don't really need to open the dialog, but we do so for the sake of this example so we can see how coordinates at the beginning of a new branch are indicated in the dialog.

 

eg_newobj03_03.png

We click at each location we want to mark a coordinate.

 

eg_newobj03_04.png

 

With each click the proposed area boundary grows.

 

eg_newobj03_05.png

 

At the last coordinate for the area boundary we Shift-Click to mark the coordinate and to also indicate that terminates a branch in the area structure and that we intend to continue creating the area.  

 

eg_newobj03_06.png

 

We then click again to indicate the coordinate that will begin the boundary of the "hole" inside the area.  Note that in the New Object dialog an asterisk * appeared in the row for the first coordinate of the "hole" boundary.  The asterisk indicates the start of a new branch.

 

eg_newobj03_07.png

 

As before, each time we click to create a coordinate the boundary of the proposed "hole" is expanded one more segment.

 

eg_newobj03_08.png

 

At the last coordinate we click to mark the coordinate.

 

eg_newobj03_09.png

 

We then move the mouse to the New Object dialog and press Add Area to create the area object.   We also could have right-clicked into the drawing and chosen Save Changes.

 

eg_newobj03_10.png

 

The result is an area object that has a "hole" in it.  

 

If we wanted to create more than one hole within the area we could have Shift-clicked the last coordinate of the hole boundary and then clicked into the drawing again to start the next boundary for a hole.

 

This example continues into the related example topic, Example: Create an Area with Holes and Islands.

 

Notes

 

eg_newobj02_30.png

 

Zillions of digits after the decimal point - Why are the coordinate numbers in the illustrations relatively short numbers like 199.5 or 177.5 but sometimes when we try to repeat this example the numbers have many digits after the decimal point as in the illustration above?   See the Notes in the New Object Dialog topic for a discussion.

 

See Also

Drawings

 

Coordinates

 

New Object Dialog

 

Example: Draw Lines, Areas and Points - Simple example of using basic mouse moves to add points, lines and areas to a drawing.

 

Example: Trace an Area in a Map over an Image Background - In a map with a drawing layer above an image layer, create an area object in the drawing by tracing over the outlines of something seen in the image layer below.

 

Example: Create a Line using the New Object Dialog - Step by step creation of a line in a drawing using the New Object Dialog.

 

Example: Create a Line using Curved Segments - Creating a line made up from curvilinear geometry using the New Object Dialog.

 

Example: Create an Area with Holes and Islands - Using the New Object Dialog, create an area in a drawing where the area includes holes and also islands.

 

Example: Create a Multipoint - How to create multipoints using the New Object Dialog.  This topic provides two examples:  First we create a multipoint and then next we create a multipoint having two branches.  The purpose of this topic is to help teach the implementation of geometry in Manifold and other typical spatial packages using a somewhat unusual and rarely met object type, the multipoint, which combines what appear to be many separate points into a single multipoint object.