Subscribe to this thread
Home - General / All posts - Segmentise area boundaries for polar stereographic projection
#11-Jan-21 07:33

In Manifold 8, polygons and lines could easily be segmentised i.e. each edge between two points could have many redundant points added at a specified interval. This could be applied across a drawing with ease.

I am unable to find a similar function in Manifold 9. I can see that applying 'Transform > Split' can achieve a similar end for lines but not polygons. As I am dealing with many polygons, I was hoping that I would not have to change each to a line, break up the line and then reform as a polygon. I am unfamiliar how this might be done with many geom records representing polygons in the same drawing.

I would appreciate help if at all possible.

Many thanks


9,508 post(s)
#11-Jan-21 07:54

The normal rule is: give sample data, get code. Abundant help available.

#11-Jan-21 09:00

Thanks tjhb. No worries. I thought it was something obvious I had missed from transferring from 8 to 9. Will do next time.


6,358 post(s)
#11-Jan-21 08:05

Create a new drawing called Areas, and then in that drawing create three triangular areas. We'll start with those.

To get your head around how the convert template works in the Transform template, try converting the areas to lines, and then back to areas. Easy.

Here's what I did to "segmentize" those areas.

1. Use Convert to Convert areas to lines.

2. Transform Split : line coordinates, to create points in a new drawing, called Points, every 10 meters. [Note that this does not inject redundant coordinates into lines: it creates new point objects in a new layer].

3. Copy points from Points and paste into Areas.

4. Read the Normalizing Topology topic, and then run Topology : Clean (generalize). That segments the lines to the position of the points.

5. Use the Select pane to select all points in the Areas drawing, and delete them. If you alt-click on any of the triangular lines, you'll see it's now ben segmentized.

6. In the Transform pane, run Clean : normalize metric on the Areas drawing. This puts all the segmentized coordinates in sensible order.

7. Use Convert to convert lines back into areas. Done.

If you do the above a lot, you can see from the Edit Query buttons in the various steps the SQL each step uses, so you can combine all that into one big SQL query that does everything at once.

Ah... one last thing: If you love the idea of a segmentize transform here's how to get it.

#11-Jan-21 09:01

thanks Dimitri.

Very much appreciated. Your instructions are clear and straight forward. I will look in to the SQL some more as well.

Thanks also for the guidance on how to get common routines included in future versions, particularly when it was in old versions (8 in this case).

Thanks again

Best wishes

#11-Jan-21 09:38

Got it. Terrific. Thank you!!!

Result (grey areas with boundary lines) is attached.

Screen Shot 2021-01-11 at 8.37.08 pm.png


9,508 post(s)
#11-Jan-21 17:24

Brilliant instructions and guidance. Wish I could do that, blind.

Manifold User Community Use Agreement Copyright (C) 2007-2019 Manifold Software Limited. All rights reserved.