Jump to content

Convert polyline segments to ARCS


gsc

Recommended Posts

Hi,

 

From Clients we always receive (y,x) routes in CAD format converted from GIS software.
However the problem is that GIS imports polyline arc bends into line segments. And therefor also the export to the CAD drawing contain segments.

Is there a routine which recognizes the real arc radius of a group of segments representing bend(s) in a polyline, and changes the polyline to an arc with the correct radius?

I have attached an example

Note: sometimes the straights are also divided in segments

 

144392-XREF-0010-IAC Routes-03.dwg

Link to comment
Share on other sites

@gsc I don't know of a way to do this automatically; there would be no way to determine if the segments represented an arc or not.

 

This could be done in a program manually however by selecting the LINES that represent each arc. The process in the code would be something like:

1.) Select the polylines representing the Arc.

2.) Join the segments together into a Polyline.

3.) Convert to a fit polyline

4.) Get the halfway Parameter of the Polyline and the point at the parameter.

5.) Get the start and end points of the Polyline.

6.) Draw a 3 point Arc and delete the polyline.

 

NOTE: This method may not give accurate results depending on the amount of segments making up the polyline, but it would be close.

Edited by pkenewell
  • Like 1
Link to comment
Share on other sites

Just an idea no code get pline get co-ords so an arc is a multi segment so if we look at two things the angle of the segment and its length so can start to build a list of start pt end pt and a mid pt for me would do a break this makes 2 plines then add arc then join 3 sections back to 1 pline. 

 

This is dist and angle can see pattern.

((102.122 5.49781) 
(6.80382 5.51482) 
(5.83184 5.54884) 
(7.7753 5.57861) 
(6.80382 5.61688) 
(6.80382 5.6509) 
(6.80382 5.68492) 
(6.80382 5.71894) 
(4.85987 5.75296) 
(1.94395 5.75296) 
(6.80382 5.78698) 

 

a google ToolPac by Dotsoft has a conversion command "Segments to Arcs"

Edited by BIGAL
Link to comment
Share on other sites

11 hours ago, gsc said:

Hi,

 

From Clients we always receive (y,x) routes in CAD format converted from GIS software.
However the problem is that GIS imports polyline arc bends into line segments. And therefor also the export to the CAD drawing contain segments.

Is there a routine which recognizes the real arc radius of a group of segments representing bend(s) in a polyline, and changes the polyline to an arc with the correct radius?

I have attached an example

Note: sometimes the straights are also divided in segments

 

144392-XREF-0010-IAC Routes-03.dwg 206.8 kB · 5 downloads

Is there any min radius to be accepted as to be an arc?   Or what are the "normal" radius for CURVES . 

Link to comment
Share on other sites

Yep, radius may differ but also the segment lengths are not always constant.
 

I am looking for a way (select & convert them all) quicker than re-drawing the polylines (switching between Line and Arc)

 

These are cable routes from wind turbine to wind turbine of an offshore wind park.

The bend radii depend on the type of vessel installing the electrical cables,

but may also be a little smaller to avoid no-go zones or to make turns in the corner of an allocated wind park area

 

Depending on the size of the park this can be at least 60-150 polylines
For each wind park we receive during the tender/execution at least 6 or 7 updated routes
We import them in special routing software which relies on routes with straights and tangent bends (arcs)
 

Link to comment
Share on other sites

I have just done a bit of checking some lines, and I find that not all of the ends of the straight lines are at the tangent point. If this is so, how would you want the automatic solution to handle these discrepancies?

 

To my mind, this could be handled more confidently and accurately by hand, drawing in the straights, and using the known radii to fillet between the straights.

Link to comment
Share on other sites

1 hour ago, eldon said:

I have just done a bit of checking some lines, and I find that not all of the ends of the straight lines are at the tangent point. If this is so, how would you want the automatic solution to handle these discrepancies?

 

To my mind, this could be handled more confidently and accurately by hand, drawing in the straights, and using the known radii to fillet between the straights.


That is what I am trying to figure out.
 

Link to comment
Share on other sites

If you draw the straights as individual polylines, then when you fillet using the known radius, then the two straights and the fillet arc become one polyline.

Link to comment
Share on other sites

I think that its theoretically possible to achieve it by iterating the list of points and check for every 3 consecutive points for colinearity and bulge values (using Lee's math sub functions) if the bulge value matches the previous one, then it can be combined into one 'larger' bulge.

Link to comment
Share on other sites

1 hour ago, Dahzee said:

I don't know if the OP is willing to pay for this, but could this be the answer to their requirement?

 

http://tcicorp.com/curvefit/

 

Well we have other software where this also may be possible.
However since we receive the data in CAD (*.dwg/*.dxf) format, and I also have created an export function in CAD to export (curved) routes to the format of our routing software, my first idea was to keep this in CAD which is the most efficient.

Link to comment
Share on other sites

On 3/25/2021 at 10:34 AM, gsc said:
1 hour ago, gsc said:

 

Well we have other software where this also may be possible.
However since we receive the data in CAD (*.dwg/*.dxf) format, and I also have created an export function in CAD to export (curved) routes to the format of our routing software, my first idea was to keep this in CAD which is the most efficient.

 

$3000 u$D seem no to be a huge value for such big protect 

 

Link to comment
Share on other sites

In the short list I posted there are some odd values, as mentioned by others  TP is not where you think.  Again though could compare 3 point answers add to arc, just makes the algorithm a bit harder having to go backwards 1 vertice and check I guess also forward.

 

Using acad and 3pt arc get rad is possibly slow a better sequence would be the mathematics of 3 point arcs and get rad. Will see if can find.

 

Will need a big think about this. Circle, Cylinder, Sphere (paulbourke.net) go down to 3 point arc.

 

Edited by BIGAL
Link to comment
Share on other sites

I have to say that I don't think that each 'curved' section is necessarily a single radius.

 

Perhaps it would be useful to know how these radii were chosen, whether there is a single radius between straights, and should the radius be to the nearest 10 metres. If the rules are set down, then some sort of programme could be written.

 

I would start with the straights and see which end was nearer to the intersection of the lines. Then choose that point as the tangent point and draw the joining arc accordingly.

Link to comment
Share on other sites

Is it a change in direction ?  Like you there was a Line line line at the start of the pline I picked. Need GSC to confirm with some real plines what is actually going on need to compare to the GIS original then can do some rules. Looking at the formula link seems the way to go. The sample dwg is fine for testing. But need a list of all the curve details for at least one pline so can compare.

 

The one item may be that a straight is always longer than x. And no radius greater than Y.

 

image.png.a632e92227dbb42afab7f841e319ecc2.png

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...