Distance between point and points with iterations

How do I calculate the distance between each individual point and all the points?
Basically, I’m trying to find the elements which are not connected to each other by calculating distance between them, so I need to have some process with iteration.

Up.Load.Your.Code

I have uploaded the data outputs here. FYI I have not created any workflow yet.
Frame.gh (4.5 KB)

this is the content of your file (I have added the Panels for clarity)

if I have correctly understood the matter, you’re trying to isolate curve ends that do not fall on other curve ends

you might do something like this, which checks for curve end points which have zero distance from other curves (so they are “connected”) but the connected-curve-length-parameter at which they land is not 0 and is not 1

Frame_inno.gh (14.1 KB)

1 Like

I have a framed structured with Beams and columns (Attached Rhino & GH file).
I need to check if all members are connected to each other - (Attached Snapshot)


Connectivity.gh (22.6 KB)
Connectivity QC.3dm (51.7 KB)

you could collect first all points with a minimal distance to each , get the groups with more than one item and create a set which eliminates all identical items if the set content is bigger than one you get all points that are not similar.

find identical points.gh (31.3 KB)

white is point on curve
purple is endpoint not connected
green is connected endpoint

How to find if the points are located on other curve?

What you mean?
In your example points with no nearby points or identical one are points on curves.

Or do you need to know if they have no distance or distance.

Yes, if they have distance then the end point will not be on that curve which is a case of disconnection.

How do I filter the curves which are having disconnected ends?

you have MANY of these situations going on in your drawing, where some lines are floating on the head of other lines

I can literally pick random points, zoom, and that thing will happen

at the same time, this is also frequently happening:

where lines looks like they were supposed to meet, but they aren’t

the above is a zoom-in of in this position:

I have taken my earlier definition from the above post, input the curves that you posted, and this is the result, where I can see with my eyes that several points are missing

if you zoom in in the area with the arrow, you’ll see this .___.

so… what should we do? :slight_smile:

You can filter each single point to ( the white one) against all curves and if one distance is Zero than the point is connected otherwise the point is not connected.

I’ll have to check the other snaps which you showed but the last one is the case where member is not connected to the adjacent one.

ok, so you have two different cases to take into account

  1. if a curve-end-point does not meet anything at all
  2. if a curve-end-point meets another curve, but not at meeting-curve’s end-point

is this right?

If i use @inno snippet (nice one…why you use similar instead of equal ? I like the t 0 and 1 check for start and endpoints) to filter for zero distance point to curve than only for one point is the case true.

so all points that are not sourounded by other points are not connected to a curve except one.

Case - 1) Curve end points connecting to curve end points (Beam to Beam & Beam to Column Connection at Joint)
Case - 2) Curve End Points not connecting to curve end points but located on curve line (Beam to Beam Connection)

I can see the white points are not connected to adjacent curve. How do I calculate the distance?

usually you want to consider a certain tolerance that can be software dependant, type of drawing dependant, Rhino tolerance itself dependant… there are cases where things that are supposed to be perfectly overlapping are sharing just “n decimals” and should be considered identical even if they aren’t, so that similarity with a percentage of threshold helps in doing that, but it’s not working correctly in this particular case because distances are very different, and a % of that distance is not a fixed number

@Ameya
there are many of these situations where B2 and B3 meet at point P23, so they certainly share one common end

but there is also the beam B1, where its end P1 comes very close to P12, the distance is a matter of a fraction of unit

do you want to setup a Threshold, like “if two points come to a distance D that is under xxxx units, then you can consider them as if they were perfectly overlapping even if they aren’t” (which means we are in a scenario where you are somehow extracting data from a drawing, and you are doing some sort of interpretation of the data)

or is your a scenario where you want to just identify curve ends that have a distance D that is not a perfect match? like a distance of 0.01 units is not a perfect match?

this makes the world of difference