Example: Create a Line using Curved Segments


ico_nb_arrow_blue.pngImportant:  This topic no longer applies to current Manifold editions.   Manifold editions no longer use the New Object dialog, and instead have introduced a new drawing editing system.  This topic will be updated when Manifold re-introduces editing for curved segments.


In this example we create a line made up from curvilinear geometry using the New Object Dialog.


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.




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-?.



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.



In the dialog we click on the Circle Arc tool.




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




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.



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.  


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



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.




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.




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.




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.



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




We can then click on that intermediate coordinate...




...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.



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.




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




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




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.




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.   




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




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




... 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.




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




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.




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




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




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.




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




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




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.   




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.




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.




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.


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.  




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





New Object Dialog


Example: Create a Line using the Record Panel - Step by step creation and modification of a line in a drawing using the Contents - Record panel's Coordinates tab.


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.