• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

measuring distances between two polylines

nicoganascia

Guest
Hello everyone,
I am new in this forum and more generally I am new to any forum for which you have patience if I will not make proper use of the tool. I have come here because I have a problem that has persecuted me for a long time and I finally believe that I have found in these pages the professionalism and the right skills to ask my question.
I come to the therefore, I have km and km of reliefs in which are reported 2 polylines 2d that run more or less parallel between them without necessarily intersecting (see attached file); my need is to measure the distance between the two polylines to certain progressive (with regular cadence e.g. every 10 cm or every m). the value of the measurements would serve me tabled in txt or xls format with a column the progressive measurement (10cm, 20cm......) and in the other the relative distance between the two polylines.
I don't know if I've been clear, if it were, there's a lisp that can help me?
let me know the alternative is to measure from time to time and transcribe measures. thanks to all also only the time dedicated to reading the above.
 

Attachments

The problem doesn't seem so linear as you exposed it, I explain:
dividing the polyline of your example every 10 units, you come to create the problem as from attached image, the line that connects the equivalent points no longer represents the distance between the polys; How do you behave in this case?
 

Attachments

  • calcolo distanza tra poly..webp
    calcolo distanza tra poly..webp
    4.7 KB · Views: 39
First of all, thank you for the celerity and availability, I understood the question that I had not actually assessed. to simplify considering that 2 polylines can start in 2 points having both x =0 and y different. said that the distance I should calculate is that measured between the 2 polylines orthogonally to the x axis starting from x=0 and making measures for x=1, x=2,...... .
I hope I explained.
 
Yes, you explained, but maybe you did not grasp what rpor has placed as a geomeric problem.
to me it seems to understand that you need to chart the gap between a theoretical polygonal (which we will call teor) and a realized polygonal (which we will call real).
both teor and real start from the same xy coordinates and each make its own track. Now we know (and hopefully) that the two polygonals do not differ much (otherwise the singer is a pure bowl), but for the purposes of the lisp this matters little. rpor is saying that if you establish a constant step on the teor polygonal, this step cannot be respected on the real polygonal if projected perpendicularly to the teor the px point on the real.
The same is true if you decide to take the step on real.
if then the two cross, the problem becomes a bit more complicated (@rpor I was thinking about a polar starting from the inclination of the segment, if you reverse in the sense of measurement is a pu a casotto)
 
the 2 poly I divide them according to the x axis and I measure the distance as a difference between y.calcolo distanza tra poly.webp1) by pointpassox command, select polylines, enter the x step, create a text file containing id polylinea, coordinate list x axis, y, repeated for the second polylinea.
2) through the imported macro, select the created text file and get the distance between y.

This is what I have understood from your explanation, not knowing what the doubts need, like those that have crystal, remain.

bye
 

Attachments

thanks rpor66 and crystal, I think rpor66 has perfectly framed the problem. tomorrow I will try the proposed solution that seems feasible to me, probably perfect (I will update you). to make clarity and to satisfy any curiosity I explain the purposes of the operation. one of the 2 polylines is the relief of the white line edge road, the other the relief of a pipe that runs along the cunetta varying from the white line for km and km. the tracks are straightened so that the 2 polylines run more or less parallel to the x axis (to understand the road does not bend). maintenance operations must be carried out near the white line and can damage the pipe. knowing the distance between the white line and the tube allows me to set a safety range under which the operation is at risk and you have to adopt particular measures for the protection of people and infrastructure. in some cases the two polylines cross, but are rare cases for which it is an exception I would manage manually. Thanks again I will update you tomorrow.
 
I forgot about a little lisp anomaly: the two polylines make sure they have y positives, you practically have to move them up.

For what you need, I think it's okay, as soon as I have time, I'll fix your little problem.

bye
 
great rpor66, really thank you. lisp and macro work egregiamente :finger:.
rode for 5-6km with relative evidence, it's fine.
Thanks again.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.

Back
Top