gsc Posted March 25, 2021 Posted March 25, 2021 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 Quote
pkenewell Posted March 25, 2021 Posted March 25, 2021 (edited) @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 March 25, 2021 by pkenewell 1 Quote
BIGAL Posted March 26, 2021 Posted March 26, 2021 (edited) 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 March 26, 2021 by BIGAL Quote
devitg Posted March 26, 2021 Posted March 26, 2021 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 . Quote
BIGAL Posted March 26, 2021 Posted March 26, 2021 A quick look and radius are random. Need say a minimum of 3 segments before make arc. Quote
gsc Posted March 26, 2021 Author Posted March 26, 2021 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) Quote
eldon Posted March 26, 2021 Posted March 26, 2021 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. Quote
gsc Posted March 26, 2021 Author Posted March 26, 2021 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. Quote
eldon Posted March 26, 2021 Posted March 26, 2021 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. Quote
Grrr Posted March 26, 2021 Posted March 26, 2021 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. Quote
Dahzee Posted March 26, 2021 Posted March 26, 2021 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/ Quote
gsc Posted March 26, 2021 Author Posted March 26, 2021 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. Quote
devitg Posted March 26, 2021 Posted March 26, 2021 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 Quote
Dahzee Posted March 26, 2021 Posted March 26, 2021 @gsc, I'm not certain (I don't have the software myself) but does this page indicate there is an addon for Autocad, as opposed to a stand alone version? http://tcicorp.com/buy/buy_curvefit/ Quote
BIGAL Posted March 27, 2021 Posted March 27, 2021 (edited) 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 March 27, 2021 by BIGAL Quote
eldon Posted March 27, 2021 Posted March 27, 2021 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. Quote
eldon Posted March 27, 2021 Posted March 27, 2021 And I did find a change of direction of 3½° that had no 'curve' segment. Quote
BIGAL Posted March 27, 2021 Posted March 27, 2021 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. Quote
Recommended Posts
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.