Example: Create a Line using Curved Segments

In this example we create a line made up from curvilinear geometry using the New Object Dialog. This example is a continuation of the theme of creating a line shown in the Example: Create a Line using the New Object Dialog topic.

 

This example begins as with the prior example, creating a line using straight segments.  We then will continue building the line by adding curved segments.

 

eg_newob02_00.png

As before we create a new drawing, open the drawing and then choose the Create Line tool.  

Creating a Straight Segment

We open the New Object dialog by pressing Ctrl-?.

eg_newobj02_01.png

 

We click twice into the drawing to begin creating a line by specifying the first two coordinates using a straight line segment.

Creating a Curved Segment

We now will add a segment to the line which is a curved segment, in particular a circle arc.

eg_newobj02_02.png

 

In the dialog we click on the Circle Arc tool.

 

eg_newobj02_03.png

 

The line extension continues to rubber-band to follow the cursor as we move the mouse within the drawing window.

 

eg_newobj02_04.png

 

When we click to add a coordinate a curved segment, a Circle Arc is created.   The arc is defined by the start and end coordinates plus an intermediate coordinate that appears as a dot on the arc.

 

In the dialog two new rows have appeared, one for the intermediate coordinate which is marked with a c for circle, plus the last row for the end coordinate of the arc.   

 

In addition the mode has automatically switched back to Line segment mode to add straight segments to the line.

eg_newobj02_05.png

 

We click at a different position to create a coordinate and see that a straight segment is added to the proposed line.

Editing Segments

We can edit what we have created so far.  

eg_newobj02_06.png

 To do so, in the dialog we click on the Add button to pop it out.

eg_newobj02_07.png

 

That switches our session into Edit mode.   An editing handle appears on the last coordinate we entered, the row of which is also highlighted in the dialog.

 

eg_newobj02_08.png

 

If we want to edit a different coordinate we can click on the row for that coordinate in the dialog or we could click on the coordinate in the drawing.  In either case an edit handle will appear on the coordinate selected for editing.

 

eg_newobj02_09.png

 

To move a coordinate selected for editing we click and drag on it.    As we move it the segments defined by that coordinate, either as the beginning or the end of the segment, will automatically change shape to accommodate the move. When we release the mouse button the coordinate will have been moved to a new location.

 

eg_newobj02_10.png

 

We can also edit the shape of curved segments by moving intermediate coordinates.   To do so we first choose the intermediate coordinate for editing, either by clicking on the row for that intermediate coordinate or by clicking on the intermediate coordinate in the drawing.  The c for Circle arc in the row reminds us that this is an intermediate coordinate for a circle arc.

eg_newobj02_11.png

 

When we choose an intermediate coordinate for editing an edit handle appears on it.

 

eg_newobj02_12.png

 

We can then click on that intermediate coordinate...

 

eg_newobj02_13.png

 

...and drag it to a new location to change the shape of the Circle Arc curved segment which it defines.

Adding a Spline

Circle arcs are not the only type of curved segments we can add.   As noted in the New Object Dialog topic,  we can add other types such as spline segments.

eg_newobj02_14.png

 

We will now continue adding segments to the line we are creating.   First we will click on the last segment in the line so far created.  That selects it as the new active coordinate, the anchor coordinate for any new segments that will be added to the line.

 

eg_newobj02_15.png

 

We then click on the Add button to change it from Edit mode to Add mode.

 

eg_newobj02_16.png

 

We click on the Spline tool to add a curved segment that is a spline.

 

eg_newobj02_17.png

 

When we move the mouse cursor over into the drawing the line extension now follows the cursor as we move it about before clicking to place the next coordinate.

 

eg_newobj02_18a.png

 

When we click the new end coordinate is added, thus adding a spline curved segment as well as the three intermediate coordinates that define the spline.  Each intermediate coordinate in the dialog is marked with an s for spline.   Two of the intermediate coordinates are to the right of the spline while the third intermediate coordinate is to the left of the spline, almost out of view underneath the dialog.  Note also that the dialog has automatically switched back to Line mode.

Editing a Spline Segment

We will now edit the spline segment we just added.   

 

eg_newobj02_18.png

 

We begin by clicking the Add button to pop it out to put the system into Edit mode.

 

eg_newobj02_19.png

 

The last coordinate added is selected for editing by default.    We can click on that coordinate...

 

eg_newobj02_20.png

 

... and drag it to a new position to change the shape of the spline.   

 

Changing the shape of the spline has not moved the third intermediate coordinate, to the left of the spline, further into view.  We will edit that intermediate coordinate to move it more to the right and thus more fully in view.

 

eg_newobj02_20a.png

 

To do so we click on the row for that intermediate coordinate.

 

eg_newobj02_21.png

 

That selects it for editing and the X and Y values for it have been entered into the XY box.  We can edit those values to move the coordinate.

 

eg_newobj02_22.png

 

We can edit the X value to change it from 39.5 to...

 

eg_newobj02_23.png

 

...72.   To make that change take effect we click the Set Coordinate button.

 

eg_newobj02_24.png

 

When we do so the change takes effect and the intermediate coordinate moves to the new position we specified, also changing the shape of the spline it helps to define as it moves to the new position.

 

eg_newobj02_25.png

 

We will continue editing the shape of the spline by clicking on another intermediate coordinate in the drawing, thus selecting it for editing.

 

eg_newobj02_26.png

 

We can then click and drag the intermediate coordinate to a new location, changing the shape of the spline curved segment.

 

eg_newobj02_27a.png

 

If we are done adding segments to the line and editing them we can create the line by right clicking into the drawing.

 

Creating the Line

So far we are just looking at a preview of what line would be created based upon our work.   Whenever we are happy with the preview we can create the line.   

 

eg_newobj02_27.png

 

In the dialog that pops up we choose Save Changes.   If we wanted to start over we could press Undo Changes to abandon the proposed line and all coordinates shown in the dialog would disappear.

 

eg_newobj02_28.png

 

The New Object dialog closes and we see the result, a new line object that is made up of both straight segments and curved segments.

 

Note that in the illustration above the Circle Arc segment looks like it is made up of straight line segments and is not a curve: that is an example of how the Manifold display algorithm for approximate rendering of curved segments at certain zoom levels can show an overly-schematic approximation.

 

eg_newobj02_29.png

 

If we zoom in so that the curved Circle Arc segment for the line we created fills most of the screen we can see that the curve is indeed a smooth, curved segment and is not made up of straight line segments.

Notes

Curved segments are a poor choice in GIS - It is great that Manifold can work with curved segments, but as noted in the New Object Dialog topic, curved segments are a poor choice in GIS.    Curved segments are best in CAD systems where only a single coordinate system (projection) will be used.  

 

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: 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 an Area with a Hole - Using the New Object Dialog, create an area in a drawing where the area includes one or more holes.  This is similar to how we create areas that have islands as part of the area.   

 

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.